mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix(distributions): add bin to all distributions (#4336)
This commit is contained in:
parent
ae8dc96669
commit
c9459e7aa9
@ -24,4 +24,4 @@ register({
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
require('@nuxt/cli/bin/nuxt.js')
|
require('@nuxt/cli').run()
|
||||||
|
@ -42,9 +42,7 @@
|
|||||||
"files": [
|
"files": [
|
||||||
"bin"
|
"bin"
|
||||||
],
|
],
|
||||||
"bin": {
|
"bin": "bin/nuxt-legacy.js",
|
||||||
"nuxt-legacy": "bin/nuxt-legacy.js"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.1.6",
|
"@babel/core": "^7.1.6",
|
||||||
"@babel/polyfill": "^7.0.0",
|
"@babel/polyfill": "^7.0.0",
|
||||||
|
5
distributions/nuxt-start/bin/nuxt-start.js
Executable file
5
distributions/nuxt-start/bin/nuxt-start.js
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
const { name } = require('../package.json')
|
||||||
|
const isEdge = name.indexOf('-edge') !== -1
|
||||||
|
const cli = require(isEdge ? '@nuxt/cli-edge' : '@nuxt/cli')
|
||||||
|
cli.run()
|
@ -40,9 +40,11 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"files": [
|
"files": [
|
||||||
|
"bin",
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"main": "dist/nuxt-start.js",
|
"main": "dist/nuxt-start.js",
|
||||||
|
"bin": "bin/nuxt-start.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/cli": "^2.2.0",
|
"@nuxt/cli": "^2.2.0",
|
||||||
"@nuxt/common": "^2.2.0",
|
"@nuxt/common": "^2.2.0",
|
||||||
|
5
distributions/nuxt/bin/nuxt.js
Executable file
5
distributions/nuxt/bin/nuxt.js
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
const { name } = require('../package.json')
|
||||||
|
const isEdge = name.indexOf('-edge') !== -1
|
||||||
|
const cli = require(isEdge ? '@nuxt/cli-edge' : '@nuxt/cli')
|
||||||
|
cli.run()
|
@ -39,9 +39,11 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"files": [
|
"files": [
|
||||||
|
"bin",
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"main": "dist/nuxt.js",
|
"main": "dist/nuxt.js",
|
||||||
|
"bin": "bin/nuxt.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "opencollective || exit 0"
|
"postinstall": "opencollective || exit 0"
|
||||||
},
|
},
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"main": "dist/cli.js",
|
"main": "dist/cli.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"nuxt": "bin/nuxt.js"
|
"nuxt-cli": "bin/nuxt-cli.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nuxt/config": "^2.2.0",
|
"@nuxt/config": "^2.2.0",
|
||||||
|
@ -8,7 +8,7 @@ const rootDir = resolve(__dirname, '..', 'fixtures/cli')
|
|||||||
|
|
||||||
const url = route => 'http://localhost:' + port + route
|
const url = route => 'http://localhost:' + port + route
|
||||||
|
|
||||||
const nuxtBin = resolve(__dirname, '../../packages/cli/bin/nuxt.js')
|
const nuxtBin = resolve(__dirname, '../../packages/cli/bin/nuxt-cli.js')
|
||||||
const spawnNuxt = (command, opts) => spawn(nuxtBin, [command, rootDir], opts)
|
const spawnNuxt = (command, opts) => spawn(nuxtBin, [command, rootDir], opts)
|
||||||
|
|
||||||
const close = async (nuxtInt) => {
|
const close = async (nuxtInt) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user