Browse Source

Added ability to link in development

master
Leo Lamprecht 7 years ago
parent
commit
c7535de719
  1. 11
      link/link.js
  2. 9
      link/package.json
  3. 3
      package.json

11
link/link.js

@ -0,0 +1,11 @@
#!/usr/bin/env node
try {
// eslint-disable-next-line import/no-unassigned-import
require('../dist/now.js')
} catch (err) {
if (err.code === 'ENOENT' && err.syscall === 'uv_cwd') {
console.error(`Current path doesn't exist!`)
process.exit(1)
}
}

9
link/package.json

@ -0,0 +1,9 @@
{
"name": "now",
"license": "MIT",
"description": "The command line interface for Now",
"repository": "zeit/now",
"bin": {
"now": "link.js"
}
}

3
package.json

@ -10,7 +10,8 @@
"postinstall": "node download/install.js",
"prepublish": "in-install || (npm run prepare && cp /dev/null download/dist/now)",
"pack": "pkg dist/now.js -c package.json -o packed/now",
"prepare": "webpack --context download --config download/webpack.config.js"
"prepare": "webpack --context download --config download/webpack.config.js",
"link": "cd link && yarn link"
},
"lint-staged": {
"*.js": [

Loading…
Cancel
Save