Nw/pty fixes (#1353)

* changed pty package and update references

* fixed linting issues

* added npm clean script
This commit is contained in:
Nathan White 2017-01-09 19:37:46 -07:00 committed by Guillermo Rauch
parent 67cefc50a8
commit 470d02dbfd
3 changed files with 5 additions and 4 deletions

View file

@ -23,7 +23,7 @@
"mkdirp": "0.5.1", "mkdirp": "0.5.1",
"ms": "0.7.1", "ms": "0.7.1",
"node-fetch": "1.6.3", "node-fetch": "1.6.3",
"pty.js": "https://github.com/Tyriar/pty.js/tarball/c75c2dcb6dcad83b0cb3ef2ae42d0448fb912642", "node-pty": "0.4.1",
"semver": "5.3.0", "semver": "5.3.0",
"shell-env": "0.2.0", "shell-env": "0.2.0",
"uuid": "3.0.0", "uuid": "3.0.0",

View file

@ -8,11 +8,11 @@ const {getDecoratedEnv} = require('./plugins');
const {productName, version} = require('./package'); const {productName, version} = require('./package');
const config = require('./config'); const config = require('./config');
const createPtyJsError = () => new Error('`pty.js` failed to load. Typically this means that it was built incorrectly. Please check the `README.me` to more info.'); const createPtyJsError = () => new Error('`node-pty` failed to load. Typically this means that it was built incorrectly. Please check the `README.me` to more info.');
let spawn; let spawn;
try { try {
spawn = require('pty.js').spawn; spawn = require('node-pty').spawn;
} catch (err) { } catch (err) {
throw createPtyJsError(); throw createPtyJsError();
} }

View file

@ -10,7 +10,8 @@
"prepush": "npm test", "prepush": "npm test",
"postinstall": "install-app-deps", "postinstall": "install-app-deps",
"pack": "npm run build && build --dir && cross-env BABEL_ENV=production babel --out-file app/dist/bundle.js --no-comments --minified app/dist/bundle.js", "pack": "npm run build && build --dir && cross-env BABEL_ENV=production babel --out-file app/dist/bundle.js --no-comments --minified app/dist/bundle.js",
"dist": "npm run build && build" "dist": "npm run build && build",
"clean": "npm cache clear && rm -rf node_modules && rm -rf app/node_modules && rm -rf app/dist"
}, },
"xo": { "xo": {
"extends": "xo-react", "extends": "xo-react",