Skip to content

Commit

Permalink
chore: remove module build step
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Parsa committed Nov 10, 2017
1 parent 5d870c2 commit 3445ba8
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 19 deletions.
8 changes: 4 additions & 4 deletions src/index.js → lib/module.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { resolve } = require('path')
const merge = require('lodash/merge')

export default function module (moduleOptions) {
module.exports = function (moduleOptions) {
// Apply defaults
const defaults = {
login: {
Expand Down Expand Up @@ -30,11 +30,11 @@ export default function module (moduleOptions) {
const options = merge(defaults, moduleOptions, this.options.auth)

// Plugin
this.addPlugin({ src: resolve(__dirname, '../templates/auth.plugin.js'), fileName: 'auth.plugin.js' })
this.addPlugin({ src: resolve(__dirname, './templates/auth.plugin.js'), fileName: 'auth.plugin.js' })

// Middleware
this.addTemplate({ src: resolve(__dirname, '../templates/auth.middleware.js'), fileName: 'auth.middleware.js', options })
this.addTemplate({ src: resolve(__dirname, './templates/auth.middleware.js'), fileName: 'auth.middleware.js', options })

// Store
this.addTemplate({ src: resolve(__dirname, '../templates/auth.store.js'), fileName: 'auth.store.js', options })
this.addTemplate({ src: resolve(__dirname, './templates/auth.store.js'), fileName: 'auth.store.js', options })
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,19 @@
"name": "Herberts Cruz <[email protected]>"
}
],
"main": "dist/index.js",
"main": "lib/module.js",
"repository": "https://github.com/nuxt-community/auth-module",
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "nuxt-module",
"watch": "nuxt-module --watch",
"lint": "eslint lib src test",
"lint-fix": "eslint --fix lib src test",
"test": "NODE_ENV=test npm run build && npm run lint && jest",
"release": "standard-version && git push --follow-tags && npm publish",
"prepare": "npm run build"
"test": "npm run lint && jest",
"release": "standard-version && git push --follow-tags && npm publish"
},
"eslintIgnore": [
"*.template.*"
"lib/templates"
],
"files": [
"lib",
Expand Down
2 changes: 1 addition & 1 deletion test/fixture/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
resourceHints: false
},
modules: [
['~/../..', {}],
['@@', {}],
'@nuxtjs/axios'
]
}
37 changes: 30 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
# yarn lockfile v1


"@nuxtjs/axios@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@nuxtjs/axios/-/axios-4.0.0.tgz#8d99d253671aa5a2042dcfada7f2f1343594c5ad"
"@nuxtjs/axios@^4.0.1":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@nuxtjs/axios/-/axios-4.4.0.tgz#33f1b00a3d32978a51c370ec48fd7844c6b40f89"
dependencies:
axios "^0.16.2"
chalk "^2.1.0"
debug "^3.0.1"
nuxt "^1.0.0-rc8"
whatwg-url "^6.1.0"
debug "^3.1.0"
whatwg-url "^6.3.0"

"@nuxtjs/[email protected]":
version "3.0.2"
Expand Down Expand Up @@ -1880,6 +1879,12 @@ debug@^3.0.1:
dependencies:
ms "2.0.0"

debug@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
dependencies:
ms "2.0.0"

debug@~0.7.4:
version "0.7.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39"
Expand Down Expand Up @@ -4495,7 +4500,7 @@ nuxt-module-builder@latest:
rollup-plugin-node-resolve "^3.0.0"
standard-version "^4.2.0"

nuxt@^1.0.0-rc6, nuxt@^1.0.0-rc8:
nuxt@^1.0.0-rc6:
version "1.0.0-rc8"
resolved "https://registry.yarnpkg.com/nuxt/-/nuxt-1.0.0-rc8.tgz#e073f1b0ce8938b4d0552b1ef68ea70a28d77945"
dependencies:
Expand Down Expand Up @@ -5517,6 +5522,10 @@ punycode@^1.2.4, punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"

punycode@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d"

q@^1.1.2, q@^1.4.1:
version "1.5.0"
resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1"
Expand Down Expand Up @@ -6457,6 +6466,12 @@ tough-cookie@>=2.3.0, tough-cookie@^2.3.2, tough-cookie@~2.3.0:
dependencies:
punycode "^1.4.1"

tr46@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09"
dependencies:
punycode "^2.1.0"

tr46@~0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
Expand Down Expand Up @@ -6863,6 +6878,14 @@ whatwg-url@^6.1.0:
tr46 "~0.0.3"
webidl-conversions "^4.0.1"

whatwg-url@^6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.3.0.tgz#597ee5488371abe7922c843397ddec1ae94c048d"
dependencies:
lodash.sortby "^4.7.0"
tr46 "^1.0.0"
webidl-conversions "^4.0.1"

whet.extend@~0.9.9:
version "0.9.9"
resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1"
Expand Down

0 comments on commit 3445ba8

Please sign in to comment.