mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +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": [
|
||||
"bin"
|
||||
],
|
||||
"bin": {
|
||||
"nuxt-legacy": "bin/nuxt-legacy.js"
|
||||
},
|
||||
"bin": "bin/nuxt-legacy.js",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.1.6",
|
||||
"@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": [
|
||||
"bin",
|
||||
"dist"
|
||||
],
|
||||
"main": "dist/nuxt-start.js",
|
||||
"bin": "bin/nuxt-start.js",
|
||||
"dependencies": {
|
||||
"@nuxt/cli": "^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": [
|
||||
"bin",
|
||||
"dist"
|
||||
],
|
||||
"main": "dist/nuxt.js",
|
||||
"bin": "bin/nuxt.js",
|
||||
"scripts": {
|
||||
"postinstall": "opencollective || exit 0"
|
||||
},
|
||||
|
@ -9,7 +9,7 @@
|
||||
],
|
||||
"main": "dist/cli.js",
|
||||
"bin": {
|
||||
"nuxt": "bin/nuxt.js"
|
||||
"nuxt-cli": "bin/nuxt-cli.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nuxt/config": "^2.2.0",
|
||||
|
@ -8,7 +8,7 @@ const rootDir = resolve(__dirname, '..', 'fixtures/cli')
|
||||
|
||||
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 close = async (nuxtInt) => {
|
||||
|
Loading…
Reference in New Issue
Block a user