Skip to content

Commit

Permalink
update electron, move native deps out of main
Browse files Browse the repository at this point in the history
moving the native module dependencies to only be in the 'app'. updating electron and the node version to use and changing the native module require to import so babel resolves it instead of node/webpack and adds the babel resolve plugin to hande that on tests
  • Loading branch information
krystophv committed Mar 10, 2017
1 parent be464a2 commit 0a0818a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 14 deletions.
1 change: 1 addition & 0 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
},
"test": {
"plugins": [
["resolver", { "resolveDirs": [ "app/node_modules" ]}],
["webpack-loaders", { "config": "webpack.config.test.js", "verbose": false }],
"babel-plugin-rewire",
["transform-define", {
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ before_install:
- sleep 3

install:
- nvm install 6.3.0
- nvm install 7.4.0
- npm install -g npm@latest
- npm install

Expand Down
5 changes: 1 addition & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ os: unstable

environment:
matrix:
- nodejs_version: 6.3.0
- nodejs_version: 7
- nodejs_version: 7.4.0

cache:
- node_modules -> package.json
Expand All @@ -20,8 +19,6 @@ platform:

matrix:
fast_finish: true
allow_failures:
- nodejs_version: 7

build: off

Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ machine:
environment:
CXX: g++-4.8
node:
version: 6.3.0
version: 7.4.0
dependencies:
pre:
- sudo apt-get install g++-4.8 libusb-1.0-0-dev icnsutils
Expand Down
2 changes: 1 addition & 1 deletion lib/hidDevice.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* == BSD2 LICENSE ==
*/
var _ = require('lodash');
var hid = require('node-hid');
import * as hid from 'node-hid';

var debug = require('./bows')('HidDevice');

Expand Down
2 changes: 1 addition & 1 deletion lib/serialDevice.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

var _ = require('lodash');
var async = require('async');
var SerialPort = require('serialport');
import * as SerialPort from 'serialport';

var debug = console.log; //TODO: require('./bows')('SerialDevice');

Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scripts": {
"build-docs": "./scripts/update-gh-pages.sh",
"serve-docs": "./node_modules/.bin/gitbook serve",
"test": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 electron-mocha --retries 2 --compilers js:babel-register --recursive --require ./test/setup.js test/**/*.js",
"test": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 electron-mocha --renderer --retries 2 --compilers js:babel-register --recursive test/**/*.js",
"test-debug": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 mocha --retries 2 --compilers js:babel-register --recursive --require ./test/setup.js test/**/*.js --inspect --debug-brk",
"test-all": "npm run lint && npm run test && npm run build",
"test-watch": "npm test -- --watch",
Expand All @@ -25,7 +25,7 @@
"build-dev": "npm run build-main-dev && npm run build-renderer-dev",
"start": "cross-env NODE_ENV=production electron ./app/",
"start-hot": "cross-env HOT=1 NODE_ENV=development electron -r babel-register -r babel-polyfill ./app/main.development",
"postinstall": "concurrently \"install-app-deps\" \"node node_modules/fbjs-scripts/node/check-dev-engines.js package.json\" && electron-rebuild --force",
"postinstall": "concurrently \"install-app-deps\" \"node node_modules/fbjs-scripts/node/check-dev-engines.js package.json\" && electron-rebuild --force --module-dir app",
"dev": "npm run hot-server -- --start-hot",
"package": "npm run build && build --publish never",
"package-dev": "npm run build-dev && build --publish never",
Expand Down Expand Up @@ -111,6 +111,7 @@
"babel-loader": "6.2.10",
"babel-plugin-add-module-exports": "0.2.1",
"babel-plugin-dev-expression": "0.2.1",
"babel-plugin-resolver": "1.1.0",
"babel-plugin-rewire": "1.0.0",
"babel-plugin-tcomb": "0.3.24",
"babel-plugin-transform-class-properties": "6.22.0",
Expand All @@ -133,11 +134,11 @@
"css-loader": "0.26.1",
"d3": "3.5.16",
"devtron": "1.4.0",
"electron": "1.4.15",
"electron": "1.6.2",
"electron-builder": "12.2.2",
"electron-devtools-installer": "2.0.1",
"electron-mocha": "3.3.0",
"electron-rebuild": "^1.5.7",
"electron-rebuild": "1.5.7",
"enzyme": "2.7.1",
"eslint": "3.14.0",
"eslint-config-airbnb": "14.0.0",
Expand All @@ -163,7 +164,6 @@
"merge-stream": "1.0.0",
"minimist": "1.2.0",
"mocha": "3.2.0",
"node-hid": "0.5.4",
"object-invariant-test-helper": "0.1.1",
"open": "0.0.5",
"phantomjs-prebuilt": "2.1.7",
Expand All @@ -173,7 +173,6 @@
"redux-logger": "2.7.4",
"redux-mock-store": "1.1.2",
"salinity": "0.0.8",
"serialport": "4.0.7",
"sinon": "1.17.7",
"sinon-chai": "2.8.0",
"spectron": "3.4.1",
Expand Down

0 comments on commit 0a0818a

Please sign in to comment.