first docs
This commit is contained in:
35
.yarn/unplugged/metalsmith-npm-2.5.1-131e5add51/node_modules/metalsmith/bin/metalsmith
generated
vendored
Executable file
35
.yarn/unplugged/metalsmith-npm-2.5.1-131e5add51/node_modules/metalsmith/bin/metalsmith
generated
vendored
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
const spawn = require('cross-spawn')
|
||||
const resolve = require('path').resolve
|
||||
|
||||
/**
|
||||
* Resolve.
|
||||
*/
|
||||
|
||||
const args = process.argv.slice(2)
|
||||
|
||||
/**
|
||||
* If we're not talking about a sub-command, fall back on `_metalsmith`.
|
||||
*/
|
||||
|
||||
args.unshift(resolve(__dirname, '_metalsmith'))
|
||||
|
||||
/**
|
||||
* Spawn.
|
||||
*/
|
||||
|
||||
const proc = spawn(process.execPath, args, { stdio: 'inherit' })
|
||||
|
||||
/**
|
||||
* Exit.
|
||||
*/
|
||||
|
||||
proc.on('exit', function (code) {
|
||||
// eslint-disable-next-line no-process-exit
|
||||
process.exit(code)
|
||||
})
|
||||
Reference in New Issue
Block a user