├── renovate.json ├── .gitignore ├── lerna.json ├── packages ├── plugin-utils │ ├── index.js │ ├── package.json │ ├── logging.js │ ├── README.md │ └── CHANGELOG.md ├── browserconfig │ ├── package.json │ ├── index.js │ ├── README.md │ └── CHANGELOG.md ├── vendor │ ├── package.json │ ├── README.md │ ├── index.js │ └── CHANGELOG.md ├── localtunnel │ ├── package.json │ ├── index.js │ ├── README.md │ └── CHANGELOG.md └── toast │ ├── plugin.js │ ├── package.json │ ├── index.js │ ├── index.d.ts │ ├── README.md │ └── CHANGELOG.md ├── .github └── ISSUE_TEMPLATE.md ├── .editorconfig ├── .eslintrc.js ├── package.json ├── README.md └── LICENSE.md /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "@nuxtjs" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.iml 3 | .idea 4 | *.log* 5 | packages/*/package-lock.json 6 | packages/*/yarn.lock 7 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "lerna": "0.0.0", 3 | "useWorkspaces": true, 4 | "version": "independent", 5 | "npmClient": "yarn" 6 | } 7 | -------------------------------------------------------------------------------- /packages/plugin-utils/index.js: -------------------------------------------------------------------------------- 1 | const { log, error } = require('./logging.js') 2 | 3 | module.exports = { 4 | log, 5 | error 6 | } 7 | 8 | module.exports.meta = require('./package.json') 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_size = 2 6 | indent_style = space 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /packages/browserconfig/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nuxtjs/browserconfig", 3 | "version": "0.0.13", 4 | "license": "MIT", 5 | "main": "index.js", 6 | "repository": "https://github.com/nuxt/modules", 7 | "homepage": "https://github.com/nuxt/modules/tree/master/packages/browserconfig", 8 | "dependencies": { 9 | "data2xml": "^1.3.4", 10 | "lodash": "^4.17.20" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/vendor/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nuxtjs/vendor", 3 | "version": "1.1.7", 4 | "license": "MIT", 5 | "main": "index.js", 6 | "repository": "https://github.com/nuxt/modules", 7 | "homepage": "https://github.com/nuxt/modules/tree/master/packages/vendor", 8 | "publishConfig": { 9 | "access": "public" 10 | }, 11 | "dependencies": { 12 | "fs-extra": "^8.1.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/localtunnel/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nuxtjs/localtunnel", 3 | "version": "1.1.3", 4 | "license": "MIT", 5 | "repository": "https://github.com/nuxt/modules", 6 | "homepage": "https://github.com/nuxt/modules/tree/master/packages/localtunnel", 7 | "publishConfig": { 8 | "access": "public" 9 | }, 10 | "main": "index.js", 11 | "dependencies": { 12 | "localtunnel": "^2.0.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/plugin-utils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nuxtjs/plugin-utils", 3 | "version": "0.2.4", 4 | "license": "MIT", 5 | "main": "index.js", 6 | "repository": "https://github.com/nuxt/modules", 7 | "homepage": "https://github.com/nuxt/modules/tree/master/packages/plugin-utils", 8 | "publishConfig": { 9 | "access": "public" 10 | }, 11 | "devDependencies": { 12 | "debug": "^4.3.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/toast/plugin.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Toasted from 'vue-toasted' 3 | 4 | Vue.use(Toasted, <%= serialize(options.toastOptions) %>) 5 | 6 | const globals = <%= serialize(options.register) %> 7 | if(globals) { 8 | globals.forEach(global => { 9 | Vue.toasted.register(global.name, global.message, global.options) 10 | }) 11 | } 12 | 13 | export default function (ctx, inject) { 14 | inject('toast', Vue.toasted) 15 | } 16 | -------------------------------------------------------------------------------- /packages/toast/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nuxtjs/toast", 3 | "version": "3.3.1", 4 | "license": "MIT", 5 | "main": "index.js", 6 | "types": "index.d.ts", 7 | "repository": "https://github.com/nuxt-community/community-modules", 8 | "homepage": "https://github.com/nuxt-community/community-modules/tree/master/packages/toast", 9 | "publishConfig": { 10 | "access": "public" 11 | }, 12 | "dependencies": { 13 | "vue-toasted": "^1.1.28" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/toast/index.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = function nuxtToast (moduleOptions) { 4 | const { register, ...toastOptions } = Object.assign({}, this.options.toast, moduleOptions) 5 | 6 | // Register plugin 7 | this.addPlugin({ 8 | src: path.resolve(__dirname, 'plugin.js'), 9 | ssr: false, 10 | fileName: 'toast.js', 11 | options: { 12 | register, 13 | toastOptions 14 | } 15 | }) 16 | } 17 | 18 | module.exports.meta = require('./package.json') 19 | -------------------------------------------------------------------------------- /packages/toast/index.d.ts: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import { Toasted } from 'vue-toasted' 3 | 4 | declare module '@nuxt/vue-app' { 5 | interface Context { 6 | $toast: Toasted 7 | } 8 | interface NuxtAppOptions { 9 | $toast: Toasted 10 | } 11 | } 12 | 13 | // Nuxt 2.9+ 14 | declare module '@nuxt/types' { 15 | interface Context { 16 | $toast: Toasted 17 | } 18 | interface NuxtAppOptions { 19 | $toast: Toasted 20 | } 21 | } 22 | 23 | declare module 'vue/types/vue' { 24 | interface Vue { 25 | $toast: Toasted 26 | } 27 | } 28 | 29 | declare module 'vuex/types/index' { 30 | interface Store { 31 | $toast: Toasted 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: 'babel-eslint', 4 | parserOptions: { 5 | sourceType: 'module' 6 | }, 7 | env: { 8 | browser: true, 9 | node: true 10 | }, 11 | extends: 'standard', 12 | // required to lint *.vue files 13 | plugins: [ 14 | 'html' 15 | ], 16 | // add your custom rules here 17 | rules: { 18 | // allow paren-less arrow functions 19 | 'arrow-parens': 0, 20 | // allow async-await 21 | 'generator-star-spacing': 0, 22 | // allow debugger during development 23 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, 24 | // do not allow console.logs etc... 25 | 'no-console': 2 26 | }, 27 | globals: {} 28 | } 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "lerna": "lerna", 5 | "bootstrap": "lerna bootstrap", 6 | "lint": "eslint --ext .js packages", 7 | "release": "lerna publish --conventional-commits", 8 | "force-release": "for p in packages/*; do cd $p ; npm publish ; cd ../.. ; done" 9 | }, 10 | "workspaces": [ 11 | "packages/*" 12 | ], 13 | "devDependencies": { 14 | "babel-eslint": "latest", 15 | "eslint": "latest", 16 | "eslint-config-standard": "latest", 17 | "eslint-plugin-html": "latest", 18 | "eslint-plugin-import": "latest", 19 | "eslint-plugin-node": "latest", 20 | "eslint-plugin-promise": "latest", 21 | "eslint-plugin-standard": "latest", 22 | "lerna": "latest" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nuxt Modules 2 | 3 | ⚠️ This is a mono repository for some smaller nuxt modules. 4 | 5 | **👉 You probably want to see [modules.nuxtjs.org](https://modules.nuxtjs.org) for many more ready-to-use modules.** 6 | 7 | ## Packages 8 | 9 | - [browserconfig](packages/browserconfig) 10 | - [localtunnel](packages/localtunnel) 11 | - [plugin-utils](packages/plugin-utils) 12 | - [toast](packages/toast) 13 | - [vendor](packages/vendor) 14 | 15 | ## Want to create your own module ? 16 | 17 | Just head to [Modules Guide](https://nuxtjs.org/guide/modules) or make your own module with [Module Template](https://github.com/nuxt-community/module-template) and don't forget to submit a PR in [awesome-nuxt](https://github.com/nuxt-community/awesome-nuxt) when published ;) 18 | 19 | ## License 20 | 21 | MIT License 22 | 23 | Copyright (c) [Nuxt.js](https://nuxtjs.org) 24 | -------------------------------------------------------------------------------- /packages/vendor/README.md: -------------------------------------------------------------------------------- 1 | # Vendor 2 | [![npm](https://img.shields.io/npm/dt/@nuxtjs/vendor.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/vendor) 3 | [![npm (scoped with tag)](https://img.shields.io/npm/v/@nuxtjs/vendor/latest.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/vendor) 4 | 5 | > This awesome little modules creates *junction symlinks* from `node_modules` into `static/vendor` 6 | so you can directly serve node modules inside web. Useful for runtime dependencies. 7 | 8 | ## Usage 9 | 10 | - Add `@nuxtjs/vendor` dependency using yarn or npm to your project 11 | - Add `@nuxtjs/vendor` to `modules` section of `nuxt.config.js` 12 | ```js 13 | { 14 | modules: [ 15 | '@nuxtjs/vendor', 16 | ] 17 | } 18 | ```` 19 | - Define your dependencies in `nuxt.config.json` inside `vendor` section 20 | ```js 21 | { 22 | vendor: [ 'ckeditor' ] 23 | } 24 | ``` 25 | - Add `/static/vendor` to `.gitignore` 26 | -------------------------------------------------------------------------------- /packages/plugin-utils/logging.js: -------------------------------------------------------------------------------- 1 | if (process.env.NODE_ENV === 'production') { 2 | const log = () => () => null 3 | const error = () => () => null 4 | 5 | module.exports = { log, error } 6 | } else { 7 | const Debug = require('debug') 8 | 9 | let instances = {} 10 | 11 | const log = (plugin_name) => { 12 | if (!instances['log_' + plugin_name]) { 13 | const log = Debug('plugin:' + plugin_name) 14 | log.enabled = true 15 | log.color = 5 16 | instances['log_' + plugin_name] = log 17 | } 18 | return instances['log_' + plugin_name] 19 | } 20 | 21 | const error = (plugin_name) => { 22 | if (!instances['err_' + plugin_name]) { 23 | const error = Debug('plugin:' + plugin_name) 24 | error.enabled = true 25 | error.color = 1 26 | instances['err_' + plugin_name] = error 27 | } 28 | return instances['err_' + plugin_name] 29 | } 30 | 31 | module.exports = { log, error } 32 | } 33 | -------------------------------------------------------------------------------- /packages/localtunnel/index.js: -------------------------------------------------------------------------------- 1 | const localtunnel = require('localtunnel') 2 | const { hostname } = require('os') 3 | 4 | const port = process.env.PORT || process.env.npm_package_config_nuxt_port || 3000 5 | let host = process.env.HOST || process.env.npm_package_config_nuxt_host || 'localhost' 6 | if (host === '0.0.0.0') { 7 | host = hostname() 8 | } 9 | 10 | // https://github.com/localtunnel/localtunnel 11 | 12 | module.exports = function nuxtLocaltunnel (options) { 13 | // Only include on dev mode 14 | if (!this.options.dev) { 15 | return 16 | } 17 | 18 | const opts = { 19 | subdomain: options.subdomain || process.env.npm_package_name, 20 | local_host: host, 21 | host: options.remote_host || process.env.localtunnel_host || 'https://localtunnel.me' 22 | } 23 | 24 | const tunnel = localtunnel(port, opts, (err, tunnel) => { 25 | if (err) { 26 | console.error('[nuxt][local tunnel] ' + err); 27 | return 28 | } 29 | console.log('> Open ' + tunnel.url + ' for external access') 30 | }); 31 | } 32 | 33 | module.exports.meta = require('./package.json') 34 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016-2017 [Nuxt.js](https://nuxtjs.org) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/browserconfig/index.js: -------------------------------------------------------------------------------- 1 | const _ = require('lodash') 2 | const fs = require('fs') 3 | const path = require('path') 4 | const stringify = require('data2xml')({attrProp: '@'}) 5 | 6 | // https://msdn.microsoft.com/en-us/library/dn320426 7 | 8 | const defaults = { 9 | tile: { 10 | square150x150logo: {'@': {src: 'icon.png'}}, 11 | TileColor: '#3f51b5' 12 | } 13 | } 14 | 15 | module.exports = function nuxtBrowserConfig (options) { 16 | let browserConfigData = { 17 | msapplication: _.defaultsDeep(this.options.browserconfig || options.browserconfig || {}, defaults) 18 | } 19 | 20 | // Write browserconfig.xml 21 | let browserconfigFileName = options.fileName || 'browserconfig.xml' 22 | let browserconfigFilePath = path.resolve(this.options.srcDir, 'static', browserconfigFileName) 23 | fs.writeFileSync(browserconfigFilePath, stringify('browserconfig', browserConfigData), 'utf8') 24 | 25 | // Add browserconfig meta 26 | if (!_.find(this.options.head.meta, {name: 'msapplication-config'})) { 27 | this.options.head.meta.push({name: 'msapplication-config', content: '/' + browserconfigFileName}) 28 | } 29 | } 30 | 31 | module.exports.meta = require('./package.json') 32 | -------------------------------------------------------------------------------- /packages/plugin-utils/README.md: -------------------------------------------------------------------------------- 1 | # plugin-utils 2 | [![npm](https://img.shields.io/npm/dt/@nuxtjs/plugin-utils.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/plugin-utils) 3 | [![npm (scoped with tag)](https://img.shields.io/npm/v/@nuxtjs/plugin-utils/latest.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/plugin-utils) 4 | 5 | > A helper package for nuxt plugins 6 | 7 | ### Available features: 8 | 9 | ## Logging 10 | 11 | If your nuxt plugin writes output (during build) you should import the `log` and/or `error` methods. Errors are printed in red and normal logs in purple. It is recommended to use your plugin's package name as the log identifier so users will know from which plugin the message originated. 12 | 13 | These log methods are replaced with noop handlers for production builds. 14 | 15 | #### Usage 16 | ```js 17 | module.exports.meta = require('./package.json') 18 | const log = require('@nuxtjs/plugin-utils').log(module.exports.meta.name) 19 | const error = require('@nuxtjs/plugin-utils').error(module.exports.meta.name) 20 | 21 | log('information about what the plugin is doing during build') // printed in purple 22 | error('oops, something went wrong') // printed in red 23 | ``` 24 | -------------------------------------------------------------------------------- /packages/vendor/index.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra') 2 | const path = require('path') 3 | 4 | module.exports = function nuxtVendor (moduleOptions) { 5 | if (Array.isArray(moduleOptions)) { 6 | moduleOptions = { 7 | vendor: moduleOptions 8 | } 9 | } 10 | 11 | const vendorDir = path.resolve(this.options.srcDir, 'static', 'vendor') 12 | 13 | const modulesDir = Array.isArray(this.options.modulesDir) ? this.options.modulesDir : [this.options.modulesDir] 14 | 15 | const vendor = [].concat(this.options.vendor, moduleOptions.vendor) 16 | .filter(v => v) 17 | .map(v => { 18 | for (let dir of modulesDir) { 19 | const src = path.resolve(dir, v.src || v) 20 | if (fs.existsSync(src)) { 21 | return { 22 | src, 23 | dst: v.dst || path.resolve(vendorDir, v) 24 | } 25 | } 26 | } 27 | }) 28 | .filter(v => v) 29 | 30 | if (!vendor.length) { 31 | return 32 | } 33 | 34 | // Ensure static/vendor directory exists 35 | fs.ensureDirSync(vendorDir) 36 | 37 | // Link vendors 38 | vendor.forEach(({ src, dst }) => { 39 | fs.removeSync(dst) 40 | fs.ensureSymlinkSync(src, dst, 'junction') 41 | }) 42 | } 43 | 44 | module.exports.meta = require('./package.json') 45 | -------------------------------------------------------------------------------- /packages/browserconfig/README.md: -------------------------------------------------------------------------------- 1 | # BrowserConfig 2 | [![npm](https://img.shields.io/npm/dt/@nuxtjs/browserconfig.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/browserconfig) 3 | [![npm (scoped with tag)](https://img.shields.io/npm/v/@nuxtjs/browserconfig/latest.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/browserconfig) 4 | 5 | Adds [XML browser configuration](https://msdn.microsoft.com/en-us/library/bg183312\(v=vs.85\).aspx) support. 6 | (Useful for internet explorer and Edge) 7 | 8 | > Browser configuration files (also known as browserconfig) can be used to define pinned site customizations, 9 | > such as tile backgrounds, badge updates, and tile notifications. Browser configuration files let you set 10 | > these customizations using external XML files rather than metadata within the HTML markup of a webpage. 11 | 12 | - Creates `static/browserconfig.xml` 13 | - Adds `` to pages if not exits. 14 | 15 | ## Setup 16 | - Add `@nuxtjs/browserconfig` dependency using yarn or npm to your project 17 | - Add `@nuxtjs/browserconfig` to `modules` section of `nuxt.config.js` 18 | ```js 19 | { 20 | modules: [ 21 | // Simple usage 22 | '@nuxtjs/browserconfig', 23 | 24 | // With options 25 | ['@nuxtjs/browserconfig', { TileColor: '#3f51b5' }], 26 | ], 27 | 28 | // You can optionally use global options instead of inline form 29 | browserconfig: { 30 | TileColor: '#3f51b5', 31 | square150x150logo: {'@':{src:'icon.png'}} 32 | } 33 | } 34 | ```` 35 | -------------------------------------------------------------------------------- /packages/plugin-utils/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. 5 | 6 | ## [0.2.4](https://github.com/nuxt/modules/compare/@nuxtjs/plugin-utils@0.2.3...@nuxtjs/plugin-utils@0.2.4) (2019-05-28) 7 | 8 | 9 | ### Bug Fixes 10 | 11 | * correct homepage URLs ([#282](https://github.com/nuxt/modules/issues/282)) ([960f933](https://github.com/nuxt/modules/commit/960f933)) 12 | 13 | 14 | 15 | 16 | 17 | ## [0.2.3](https://github.com/nuxt/modules/compare/@nuxtjs/plugin-utils@0.2.2...@nuxtjs/plugin-utils@0.2.3) (2019-01-11) 18 | 19 | **Note:** Version bump only for package @nuxtjs/plugin-utils 20 | 21 | 22 | 23 | 24 | 25 | 26 | ## [0.2.2](https://github.com/nuxt/modules/compare/@nuxtjs/plugin-utils@0.2.1...@nuxtjs/plugin-utils@0.2.2) (2018-12-19) 27 | 28 | 29 | ### Bug Fixes 30 | 31 | * **deps:** update all non-major dependencies ([#231](https://github.com/nuxt/modules/issues/231)) ([345418b](https://github.com/nuxt/modules/commit/345418b)) 32 | 33 | 34 | 35 | 36 | 37 | 38 | ## [0.2.1](https://github.com/nuxt/modules/compare/@nuxtjs/plugin-utils@0.2.0...@nuxtjs/plugin-utils@0.2.1) (2018-10-01) 39 | 40 | **Note:** Version bump only for package @nuxtjs/plugin-utils 41 | 42 | 43 | 44 | 45 | 46 | 47 | # [0.2.0](https://github.com/nuxt/modules/compare/@nuxtjs/plugin-utils@0.1.1...@nuxtjs/plugin-utils@0.2.0) (2017-11-20) 48 | 49 | 50 | ### Features 51 | 52 | * upgrade dependencies ([52f3572](https://github.com/nuxt/modules/commit/52f3572)) 53 | 54 | 55 | 56 | 57 | 58 | ## 0.1.1 (2017-10-05) 59 | -------------------------------------------------------------------------------- /packages/localtunnel/README.md: -------------------------------------------------------------------------------- 1 | # Local Tunnel 2 | [![npm](https://img.shields.io/npm/dt/@nuxtjs/localtunnel.svg?style=flat-square)](https://www.npmjs.com/package/@nuxtjs/localtunnel) 3 | [![npm (scoped with tag)](https://img.shields.io/npm/v/@nuxtjs/localtunnel/latest.svg?style=flat-square)](https://www.npmjs.com/package/@nuxtjs/localtunnel) 4 | 5 | > localtunnel exposes your localhost to the world for easy testing and sharing! 6 | No need to mess with DNS or deploy just to have others test out your changes. [learn more](https://github.com/localtunnel/localtunnel) 7 | 8 | **Features** 9 | 10 | - Secure https for all tunnels 11 | - Show your work to anyone 12 | - Use the API to test web hooks 13 | - Test your UI in cloud browsers 14 | 15 | **Note** This module is only enabled in dev mode. 16 | 17 | ## Setup 18 | - Add `@nuxtjs/localtunnel` dependency using yarn or npm to your project 19 | - Add `@nuxtjs/localtunnel` to `modules` section of `nuxt.config.js` 20 | ```js 21 | modules: [ 22 | // Simple usage 23 | '@nuxtjs/localtunnel', 24 | 25 | // With options 26 | ['@nuxtjs/localtunnel', { subdomain: 'foobar' }], 27 | ] 28 | ```` 29 | 30 | ## Usage 31 | (For more information see [here](https://github.com/localtunnel/localtunnel)) 32 | 33 | On next dev, you will something like this in terminal that can be shared with the world: 34 | ``` 35 | > Open http://127.0.0.1:3000 36 | > Open https://starter.localtunnel.me for external access 37 | ``` 38 | 39 | ## Options 40 | 41 | ### `subdomain` 42 | - Default: `process.env.npm_package_name` 43 | 44 | Request a named subdomain on the localtunnel server (default is random characters) 45 | 46 | ### `local_host` 47 | - Default: nuxt listening ip (auto detected) 48 | 49 | Proxy to a hostname other than localhost 50 | 51 | ### `remote_host` 52 | - Default: https://localtunnel.me 53 | 54 | Use another localtunnel server, instead of localtunnel.me 55 | -------------------------------------------------------------------------------- /packages/toast/README.md: -------------------------------------------------------------------------------- 1 | # Toast 2 | [![npm](https://img.shields.io/npm/dt/@nuxtjs/toast.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/toast) 3 | [![npm (scoped with tag)](https://img.shields.io/npm/v/@nuxtjs/toast/latest.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/toast) 4 | 5 | > 😍 Responsive Touch Compatible Toast plugin for Nuxt.js using [vue-toasted](https://github.com/shakee93/vue-toasted) 6 | 7 | ## Setup 8 | - Add `@nuxtjs/toast` dependency using yarn or npm to your project 9 | - Add `@nuxtjs/toast` to `compilerOptions`/`types` section of `tsconfig.json` to add typescript support [optional] 10 | - Add `@nuxtjs/toast` to `modules` section of `nuxt.config.js` 11 | 12 | ```js 13 | { 14 | modules: [ 15 | '@nuxtjs/toast', 16 | ], 17 | 18 | toast: { 19 | position: 'top-center', 20 | register: [ // Register custom toasts 21 | { 22 | name: 'my-error', 23 | message: 'Oops...Something went wrong', 24 | options: { 25 | type: 'error' 26 | } 27 | } 28 | ] 29 | } 30 | } 31 | ``` 32 | 33 | If you need material icons, you have to manually install `material-design-icons` dependency too. 34 | 35 | ## Usage 36 | You can use **$toast** (instead of `$toasted`) in almost any context using `app.$toast` or `this.$toast` (Including store actions). 37 | 38 | See [toasted official docs](https://github.com/shakee93/vue-toasted) for more usage information. 39 | 40 | ```js 41 | export default { 42 | methods:{ 43 | async login() { 44 | try { 45 | this.$toast.show('Logging in...') 46 | await this.$axios.$post('auth/login') 47 | this.$toast.success('Successfully authenticated') 48 | } catch(e){ 49 | this.$toast.global.my_error() //Using custom toast 50 | this.$toast.error('Error while authenticating') 51 | } 52 | } 53 | } 54 | } 55 | ``` 56 | -------------------------------------------------------------------------------- /packages/browserconfig/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. 5 | 6 | ## [0.0.13](https://github.com/nuxt/modules/compare/@nuxtjs/browserconfig@0.0.12...@nuxtjs/browserconfig@0.0.13) (2020-07-14) 7 | 8 | **Note:** Version bump only for package @nuxtjs/browserconfig 9 | 10 | 11 | 12 | 13 | 14 | ## [0.0.12](https://github.com/nuxt/modules/compare/@nuxtjs/browserconfig@0.0.11...@nuxtjs/browserconfig@0.0.12) (2019-10-07) 15 | 16 | **Note:** Version bump only for package @nuxtjs/browserconfig 17 | 18 | 19 | 20 | 21 | 22 | ## [0.0.11](https://github.com/nuxt/modules/compare/@nuxtjs/browserconfig@0.0.10...@nuxtjs/browserconfig@0.0.11) (2019-05-28) 23 | 24 | 25 | ### Bug Fixes 26 | 27 | * correct homepage URLs ([#282](https://github.com/nuxt/modules/issues/282)) ([960f933](https://github.com/nuxt/modules/commit/960f933)) 28 | 29 | 30 | 31 | 32 | 33 | 34 | ## [0.0.10](https://github.com/nuxt/modules/compare/@nuxtjs/browserconfig@0.0.9...@nuxtjs/browserconfig@0.0.10) (2018-12-19) 35 | 36 | **Note:** Version bump only for package @nuxtjs/browserconfig 37 | 38 | 39 | 40 | 41 | 42 | 43 | ## [0.0.9](https://github.com/nuxt/modules/compare/@nuxtjs/browserconfig@0.0.8...@nuxtjs/browserconfig@0.0.9) (2018-10-01) 44 | 45 | **Note:** Version bump only for package @nuxtjs/browserconfig 46 | 47 | 48 | 49 | 50 | 51 | 52 | ## [0.0.8](https://github.com/nuxt/modules/compare/@nuxtjs/browserconfig@0.0.7...@nuxtjs/browserconfig@0.0.8) (2018-04-27) 53 | 54 | 55 | 56 | 57 | **Note:** Version bump only for package @nuxtjs/browserconfig 58 | 59 | 60 | ## [0.0.7](https://github.com/nuxt/modules/compare/@nuxtjs/browserconfig@0.0.6...@nuxtjs/browserconfig@0.0.7) (2017-11-20) 61 | 62 | 63 | 64 | 65 | **Note:** Version bump only for package @nuxtjs/browserconfig 66 | 67 | 68 | ## [0.0.6](https://github.com/nuxt/modules/compare/@nuxtjs/browserconfig@0.0.5...@nuxtjs/browserconfig@0.0.6) (2017-09-02) 69 | 70 | 71 | ### Bug Fixes 72 | 73 | * **browserconfig:** use `srcDir` instead of `rootDir` ([1ea5c34](https://github.com/nuxt/modules/commit/1ea5c34)) 74 | 75 | 76 | 77 | 78 | 79 | ## [0.0.4](https://github.com/nuxt/modules/compare/@nuxtjs/browserconfig@0.0.3...@nuxtjs/browserconfig@0.0.4) (2017-06-06) 80 | 81 | 82 | 83 | 84 | 85 | ## [0.0.3](https://github.com/nuxt/modules/compare/@nuxtjs/browserconfig@0.0.2...@nuxtjs/browserconfig@0.0.3) (2017-05-31) 86 | 87 | 88 | 89 | 90 | 91 | ## [0.0.2](https://github.com/nuxt/modules/compare/@nuxtjs/browserconfig@0.0.1...@nuxtjs/browserconfig@0.0.2) (2017-05-30) 92 | 93 | 94 | 95 | 96 | 97 | ## 0.0.1 (2017-05-29) 98 | -------------------------------------------------------------------------------- /packages/vendor/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. 5 | 6 | ## [1.1.7](https://github.com/nuxt/modules/compare/@nuxtjs/vendor@1.1.6...@nuxtjs/vendor@1.1.7) (2020-02-26) 7 | 8 | **Note:** Version bump only for package @nuxtjs/vendor 9 | 10 | 11 | 12 | 13 | 14 | ## [1.1.6](https://github.com/nuxt/modules/compare/@nuxtjs/vendor@1.1.5...@nuxtjs/vendor@1.1.6) (2019-05-28) 15 | 16 | 17 | ### Bug Fixes 18 | 19 | * correct homepage URLs ([#282](https://github.com/nuxt/modules/issues/282)) ([960f933](https://github.com/nuxt/modules/commit/960f933)) 20 | 21 | 22 | 23 | 24 | 25 | 26 | ## [1.1.5](https://github.com/nuxt/modules/compare/@nuxtjs/vendor@1.1.4...@nuxtjs/vendor@1.1.5) (2018-10-01) 27 | 28 | **Note:** Version bump only for package @nuxtjs/vendor 29 | 30 | 31 | 32 | 33 | 34 | 35 | ## [1.1.4](https://github.com/nuxt/modules/compare/@nuxtjs/vendor@1.1.3...@nuxtjs/vendor@1.1.4) (2018-03-05) 36 | 37 | 38 | 39 | 40 | **Note:** Version bump only for package @nuxtjs/vendor 41 | 42 | 43 | ## [1.1.3](https://github.com/nuxt/modules/compare/@nuxtjs/vendor@1.1.2...@nuxtjs/vendor@1.1.3) (2017-12-07) 44 | 45 | 46 | 47 | 48 | **Note:** Version bump only for package @nuxtjs/vendor 49 | 50 | 51 | ## [1.1.2](https://github.com/nuxt/modules/compare/@nuxtjs/vendor@1.1.0...@nuxtjs/vendor@1.1.2) (2017-11-27) 52 | 53 | 54 | 55 | 56 | **Note:** Version bump only for package @nuxtjs/vendor 57 | 58 | 59 | ## [1.1.1](https://github.com/nuxt/modules/compare/@nuxtjs/vendor@1.1.0...@nuxtjs/vendor@1.1.1) (2017-11-25) 60 | 61 | 62 | 63 | 64 | **Note:** Version bump only for package @nuxtjs/vendor 65 | 66 | 67 | # [1.1.0](https://github.com/nuxt/modules/compare/@nuxtjs/vendor@1.0.3...@nuxtjs/vendor@1.1.0) (2017-11-20) 68 | 69 | 70 | ### Features 71 | 72 | * upgrade dependencies ([52f3572](https://github.com/nuxt/modules/commit/52f3572)) 73 | 74 | 75 | 76 | 77 | 78 | ## [1.0.3](https://github.com/nuxt/modules/compare/@nuxtjs/vendor@1.0.2...@nuxtjs/vendor@1.0.3) (2017-08-14) 79 | 80 | 81 | 82 | 83 | 84 | ## [1.0.2](https://github.com/nuxt/modules/compare/@nuxtjs/vendor@1.0.0...@nuxtjs/vendor@1.0.2) (2017-05-29) 85 | 86 | 87 | ### Bug Fixes 88 | 89 | * **vendor:** migrate vendor module ([139998a](https://github.com/nuxt/modules/commit/139998a)) 90 | 91 | 92 | 93 | 94 | 95 | ## [1.0.1](https://github.com/nuxt/modules/compare/@nuxtjs/vendor@1.0.0...@nuxtjs/vendor@1.0.1) (2017-05-26) 96 | 97 | 98 | ### Bug Fixes 99 | 100 | * **vendor:** migrate vendor module ([139998a](https://github.com/nuxt/modules/commit/139998a)) 101 | 102 | 103 | 104 | 105 | 106 | # 1.0.0 (2017-05-26) 107 | 108 | 109 | ### Features 110 | 111 | * initial migration to 1.0.0-alpha1 ([05c1b7a](https://github.com/nuxt/modules/commit/05c1b7a)) 112 | 113 | 114 | ### BREAKING CHANGES 115 | 116 | * New modules system is backward incompatible with nuxt-helpers style modules 117 | 118 | 119 | 120 | 121 | 122 | ## 0.0.1 (2017-05-10) 123 | -------------------------------------------------------------------------------- /packages/localtunnel/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. 5 | 6 | ## [1.1.3](https://github.com/nuxt/modules/compare/@nuxtjs/localtunnel@1.1.2...@nuxtjs/localtunnel@1.1.3) (2019-10-07) 7 | 8 | **Note:** Version bump only for package @nuxtjs/localtunnel 9 | 10 | 11 | 12 | 13 | 14 | ## [1.1.2](https://github.com/nuxt/modules/compare/@nuxtjs/localtunnel@1.1.1...@nuxtjs/localtunnel@1.1.2) (2019-07-13) 15 | 16 | **Note:** Version bump only for package @nuxtjs/localtunnel 17 | 18 | 19 | 20 | 21 | 22 | ## [1.1.1](https://github.com/nuxt/modules/compare/@nuxtjs/localtunnel@1.1.0...@nuxtjs/localtunnel@1.1.1) (2019-05-28) 23 | 24 | 25 | ### Bug Fixes 26 | 27 | * correct homepage URLs ([#282](https://github.com/nuxt/modules/issues/282)) ([960f933](https://github.com/nuxt/modules/commit/960f933)) 28 | 29 | 30 | 31 | 32 | 33 | 34 | # [1.1.0](https://github.com/nuxt/modules/compare/@nuxtjs/localtunnel@1.0.3...@nuxtjs/localtunnel@1.1.0) (2018-12-19) 35 | 36 | 37 | ### Features 38 | 39 | * **localtunnel:** remote_host option ([#229](https://github.com/nuxt/modules/issues/229)) ([b78ee53](https://github.com/nuxt/modules/commit/b78ee53)) 40 | 41 | 42 | 43 | 44 | 45 | 46 | ## [1.0.3](https://github.com/nuxt/modules/compare/@nuxtjs/localtunnel@1.0.2...@nuxtjs/localtunnel@1.0.3) (2018-10-01) 47 | 48 | **Note:** Version bump only for package @nuxtjs/localtunnel 49 | 50 | 51 | 52 | 53 | 54 | 55 | ## [1.0.2](https://github.com/nuxt/modules/compare/@nuxtjs/localtunnel@1.0.1...@nuxtjs/localtunnel@1.0.2) (2018-04-27) 56 | 57 | 58 | 59 | 60 | **Note:** Version bump only for package @nuxtjs/localtunnel 61 | 62 | 63 | ## [1.0.1](https://github.com/nuxt/modules/compare/@nuxtjs/localtunnel@1.0.0...@nuxtjs/localtunnel@1.0.1) (2017-11-20) 64 | 65 | 66 | 67 | 68 | **Note:** Version bump only for package @nuxtjs/localtunnel 69 | 70 | 71 | ## [0.1.4](https://github.com/nuxt/modules/compare/@nuxtjs/localtunnel@0.1.3...@nuxtjs/localtunnel@0.1.4) (2017-06-10) 72 | 73 | 74 | ### Bug Fixes 75 | 76 | * handle 0.0.0.0 host ([610e0f5](https://github.com/nuxt/modules/commit/610e0f5)) 77 | 78 | 79 | 80 | 81 | 82 | ## [0.1.3](https://github.com/nuxt/modules/compare/@nuxtjs/localtunnel@0.1.2...@nuxtjs/localtunnel@0.1.3) (2017-06-09) 83 | 84 | 85 | ### Bug Fixes 86 | 87 | * **localtunnel:** default host to 'localhost' ([54a37a6](https://github.com/nuxt/modules/commit/54a37a6)) 88 | 89 | 90 | 91 | 92 | 93 | ## [0.1.2](https://github.com/nuxt/modules/compare/@nuxtjs/localtunnel@0.1.1...@nuxtjs/localtunnel@0.1.2) (2017-06-06) 94 | 95 | 96 | 97 | 98 | 99 | ## [0.1.1](https://github.com/nuxt/modules/compare/@nuxtjs/localtunnel@0.1.0...@nuxtjs/localtunnel@0.1.1) (2017-05-31) 100 | 101 | 102 | ### Bug Fixes 103 | 104 | * **localtunnel:** handle err ([5d774ad](https://github.com/nuxt/modules/commit/5d774ad)) 105 | 106 | 107 | 108 | 109 | 110 | # 0.1.0 (2017-05-31) 111 | 112 | 113 | ### Features 114 | 115 | * localtunnel ([c518d4c](https://github.com/nuxt/modules/commit/c518d4c)) 116 | -------------------------------------------------------------------------------- /packages/toast/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. 5 | 6 | ## [3.3.1](https://github.com/nuxt/modules/compare/@nuxtjs/toast@3.3.0...@nuxtjs/toast@3.3.1) (2020-07-14) 7 | 8 | **Note:** Version bump only for package @nuxtjs/toast 9 | 10 | 11 | 12 | 13 | 14 | # [3.3.0](https://github.com/nuxt/modules/compare/@nuxtjs/toast@3.2.1...@nuxtjs/toast@3.3.0) (2019-11-01) 15 | 16 | 17 | ### Features 18 | 19 | * **toast:** add `$toast` type definition to vuex context and application options ([#326](https://github.com/nuxt/modules/issues/326)) ([936d0a2](https://github.com/nuxt/modules/commit/936d0a2)) 20 | 21 | 22 | 23 | 24 | 25 | ## [3.2.1](https://github.com/nuxt/modules/compare/@nuxtjs/toast@3.2.0...@nuxtjs/toast@3.2.1) (2019-05-28) 26 | 27 | 28 | ### Bug Fixes 29 | 30 | * correct homepage URLs ([#282](https://github.com/nuxt/modules/issues/282)) ([960f933](https://github.com/nuxt/modules/commit/960f933)) 31 | 32 | 33 | 34 | 35 | 36 | # [3.2.0](https://github.com/nuxt/modules/compare/@nuxtjs/toast@3.1.0...@nuxtjs/toast@3.2.0) (2019-05-18) 37 | 38 | 39 | ### Features 40 | 41 | * **toast:** add typescript definitions ([#272](https://github.com/nuxt/modules/issues/272)) ([00d881f](https://github.com/nuxt/modules/commit/00d881f)) 42 | 43 | 44 | 45 | 46 | 47 | # [3.1.0](https://github.com/nuxt/modules/compare/@nuxtjs/toast@3.0.2...@nuxtjs/toast@3.1.0) (2019-04-15) 48 | 49 | 50 | ### Features 51 | 52 | * **toast:** add ability to register custom toasts ([#271](https://github.com/nuxt/modules/issues/271)) ([b9ecbbd](https://github.com/nuxt/modules/commit/b9ecbbd)) 53 | 54 | 55 | 56 | 57 | 58 | 59 | ## [3.0.2](https://github.com/nuxt/modules/compare/@nuxtjs/toast@3.0.1...@nuxtjs/toast@3.0.2) (2018-12-19) 60 | 61 | 62 | ### Bug Fixes 63 | 64 | * **deps:** update all non-major dependencies ([#231](https://github.com/nuxt/modules/issues/231)) ([345418b](https://github.com/nuxt/modules/commit/345418b)) 65 | 66 | 67 | 68 | 69 | 70 | 71 | ## [3.0.1](https://github.com/nuxt/modules/compare/@nuxtjs/toast@3.0.0...@nuxtjs/toast@3.0.1) (2018-04-27) 72 | 73 | 74 | 75 | 76 | **Note:** Version bump only for package @nuxtjs/toast 77 | 78 | 79 | # [3.0.0](https://github.com/nuxt/modules/compare/@nuxtjs/toast@2.3.3...@nuxtjs/toast@3.0.0) (2018-03-05) 80 | 81 | 82 | ### misc 83 | 84 | * **toast:** use default toast options. fixes [#186](https://github.com/nuxt/modules/issues/186). ([9fd9b61](https://github.com/nuxt/modules/commit/9fd9b61)) 85 | 86 | 87 | ### BREAKING CHANGES 88 | 89 | * **toast:** some default options are changed back to their original values 90 | 91 | 92 | 93 | 94 | 95 | ## [2.3.3](https://github.com/nuxt/modules/compare/@nuxtjs/toast@2.3.1...@nuxtjs/toast@2.3.3) (2017-11-27) 96 | 97 | 98 | 99 | 100 | **Note:** Version bump only for package @nuxtjs/toast 101 | 102 | 103 | ## [2.3.2](https://github.com/nuxt/modules/compare/@nuxtjs/toast@2.3.1...@nuxtjs/toast@2.3.2) (2017-11-27) 104 | 105 | 106 | 107 | 108 | **Note:** Version bump only for package @nuxtjs/toast 109 | 110 | 111 | ## [2.3.1](https://github.com/nuxt/modules/compare/@nuxtjs/toast@2.3.0...@nuxtjs/toast@2.3.1) (2017-11-20) 112 | 113 | 114 | 115 | 116 | **Note:** Version bump only for package @nuxtjs/toast 117 | 118 | 119 | # [2.3.0](https://github.com/nuxt/modules/compare/@nuxtjs/toast@2.2.1...@nuxtjs/toast@2.3.0) (2017-09-06) 120 | 121 | 122 | ### Features 123 | 124 | * **toast:** remove material-design-icons dependency ([5554a2d](https://github.com/nuxt/modules/commit/5554a2d)), closes [#134](https://github.com/nuxt/modules/issues/134) 125 | 126 | 127 | 128 | 129 | 130 | ## [2.2.1](https://github.com/nuxt/modules/compare/@nuxtjs/toast@2.2.0...@nuxtjs/toast@2.2.1) (2017-09-04) 131 | 132 | 133 | ### Bug Fixes 134 | 135 | * **toast:** correct options serialization ([3efc32a](https://github.com/nuxt/modules/commit/3efc32a)) 136 | 137 | 138 | 139 | 140 | 141 | # [2.2.0](https://github.com/nuxt/modules/compare/@nuxtjs/toast@2.1.0...@nuxtjs/toast@2.2.0) (2017-09-04) 142 | 143 | 144 | ### Features 145 | 146 | * **toast:** provide default options ([31ca728](https://github.com/nuxt/modules/commit/31ca728)) 147 | 148 | 149 | 150 | 151 | 152 | # [2.1.0](https://github.com/nuxt/modules/compare/@nuxtjs/toast@2.0.0...@nuxtjs/toast@2.1.0) (2017-09-04) 153 | 154 | 155 | ### Features 156 | 157 | * **toast:** inject $toast ([5736456](https://github.com/nuxt/modules/commit/5736456)) 158 | 159 | 160 | 161 | 162 | 163 | # [2.0.0](https://github.com/nuxt/modules/compare/@nuxtjs/toast@1.0.2...@nuxtjs/toast@2.0.0) (2017-09-04) 164 | 165 | 166 | ### Features 167 | 168 | * **toast:** use vue-toasted ([5f1b7c5](https://github.com/nuxt/modules/commit/5f1b7c5)) 169 | 170 | 171 | ### BREAKING CHANGES 172 | 173 | * **toast:** api has been changed 174 | 175 | 176 | 177 | 178 | 179 | ## [1.0.2](https://github.com/nuxt/modules/compare/@nuxtjs/toast@1.0.1...@nuxtjs/toast@1.0.2) (2017-06-10) 180 | 181 | 182 | 183 | 184 | 185 | ## [1.0.1](https://github.com/nuxt/modules/compare/@nuxtjs/toast@1.0.0...@nuxtjs/toast@1.0.1) (2017-05-29) 186 | 187 | 188 | 189 | 190 | 191 | # 1.0.0 (2017-05-26) 192 | 193 | 194 | ### Features 195 | 196 | * initial migration to 1.0.0-alpha1 ([05c1b7a](https://github.com/nuxt/modules/commit/05c1b7a)) 197 | 198 | 199 | ### BREAKING CHANGES 200 | 201 | * New modules system is backward incompatible with nuxt-helpers style modules 202 | 203 | 204 | 205 | 206 | 207 | ## 0.0.1 (2017-05-10) 208 | --------------------------------------------------------------------------------