diff --git a/build/Gruntfile.coffee b/build/Gruntfile.coffee index 5596473be..9241b7857 100644 --- a/build/Gruntfile.coffee +++ b/build/Gruntfile.coffee @@ -1,6 +1,7 @@ fs = require 'fs' path = require 'path' os = require 'os' +babelOptions = require '../static/babelrc' # This is the main Gruntfile that manages building N1 distributions. # The reason it's inisde of the build/ folder is so everything can be @@ -127,7 +128,7 @@ module.exports = (grunt) -> ext: '.js' babelConfig = - options: require './config/babel.json' + options: babelOptions dist: files: [{ expand: true diff --git a/build/config/babel.json b/build/config/babel.json deleted file mode 100644 index 4687bc4f4..000000000 --- a/build/config/babel.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["es2015", "react", "stage-0"] -} diff --git a/build/package.json b/build/package.json index a9985c5ae..c17318703 100644 --- a/build/package.json +++ b/build/package.json @@ -18,7 +18,7 @@ "fs-plus": "2.x", "github-releases": "~0.3.0", "grunt": "~0.4.1", - "grunt-babel": "^6.0.0", + "grunt-babel": "^5.0.1", "grunt-cli": "~0.1.9", "grunt-coffee-react": "^2.1.0", "grunt-coffeelint": "git+https://github.com/atom/grunt-coffeelint.git#cfb99aa99811d52687969532bd5a98011ed95bfe", @@ -35,7 +35,7 @@ "grunt-peg": "~1.1.0", "grunt-shell": "~0.3.1", "handlebars": "^3.0.2", - "harmony-collections": "~0.3.8", + "harmony-collections": "git+https://github.com/Benvie/harmony-collections.git#0adbd738fccecd88cdd45b68077a718bcf7f3e3b", "highlight.js": "^8.8.0", "json-front-matter": "^1.0.0", "legal-eagle": "~0.9.0", diff --git a/package.json b/package.json index 0c489eb89..d3c06ec1c 100644 --- a/package.json +++ b/package.json @@ -16,10 +16,7 @@ "asar": "^0.5.0", "async": "^0.9", "atom-keymap": "5.1.11", - "babel-core": "^6.0.20", - "babel-preset-es2015": "^6.0.15", - "babel-preset-react": "^6.0.15", - "babel-preset-stage-0": "^6.0.15", + "babel-core": "^5.8.21", "bluebird": "^2.9", "classnames": "1.2.1", "clear-cut": "0.4.0", @@ -77,10 +74,6 @@ "vm-compatibility-layer": "0.1.0" }, "devDependencies": { - "babel-eslint": "^4.1.3", - "eslint": "^1.5.1", - "eslint-config-airbnb": "^0.1.0", - "eslint-plugin-react": "^3.4.2", "nock": "^2", "grunt": "^0.4.5", "grunt-serve": "^0.1.6", diff --git a/src/flux/stores/account-store.coffee b/src/flux/stores/account-store.coffee index ca30e8562..d5bff9c52 100644 --- a/src/flux/stores/account-store.coffee +++ b/src/flux/stores/account-store.coffee @@ -47,7 +47,6 @@ class AccountStore windowMenu = _.find atom.menu.template, ({label}) -> MenuHelpers.normalizeLabel(label) is 'Window' return unless windowMenu submenu = _.reject windowMenu.submenu, (item) -> item.account - console.log(submenu) return unless submenu idx = _.findIndex submenu, ({type}) -> type is 'separator' return unless idx > 0 diff --git a/static/babelrc.json b/static/babelrc.json new file mode 100644 index 000000000..26b70dc41 --- /dev/null +++ b/static/babelrc.json @@ -0,0 +1,7 @@ +{ + "breakConfig": true, + "sourceMap": "inline", + "blacklist": ["es6.forOf", "useStrict"], + "optional": ["asyncToGenerator"], + "stage": 0 +} diff --git a/static/index.js b/static/index.js index 5cec2e9af..9bf47b1d8 100644 --- a/static/index.js +++ b/static/index.js @@ -16,11 +16,8 @@ function registerRuntimeTranspilers(hotreload) { require('coffee-react/register'); } // This redefines require.extensions - require('babel-core/register')({ - sourceMaps: true, - presets: ['es2015', 'react', 'stage-0'], - extensions: ['.es6', '.es', '.jsx'], - }); + babelOptions = require('./babelrc.json'); + require('babel-core/register')(babelOptions); } window.onload = function() {