Skip to content

Commit

Permalink
Merge pull request #3149 from strongloop/fix/es6-in-phantomjs
Browse files Browse the repository at this point in the history
Enable ES6/ES2015 goodness
  • Loading branch information
bajtos authored Jan 30, 2017
2 parents 1d02e04 + be8dd0d commit 5607460
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"extends": "loopback",
"parserOptions": {
"ecmaVersion": 5
},
"rules": {
"max-len": ["error", 100, 4, {
"ignoreComments": true,
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* loopback ~ public api
*/

var loopback = module.exports = require('./lib/loopback');
var datasourceJuggler = require('loopback-datasource-juggler');
const loopback = module.exports = require('./lib/loopback');
const datasourceJuggler = require('loopback-datasource-juggler');

/**
* Connectors
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
"ejs": "^2.3.1",
"express": "^4.14.0",
"inflection": "^1.6.0",
"isemail": "^1.2.0",
"loopback-connector-remote": "^3.0.0",
"loopback-datasource-juggler": "^3.0.0",
"isemail": "^1.2.0",
"loopback-phase": "^1.2.0",
"nodemailer": "^2.5.0",
"nodemailer-stub-transport": "^1.0.0",
Expand All @@ -60,11 +60,12 @@
"underscore.string": "^3.0.3"
},
"devDependencies": {
"babel-preset-es2015": "^6.22.0",
"babelify": "^7.3.0",
"browserify": "^13.1.0",
"chai": "^3.5.0",
"cookie-parser": "^1.3.4",
"dirty-chai": "^1.2.2",
"es5-shim": "^4.1.0",
"eslint-config-loopback": "^7.0.1",
"express-session": "^1.14.0",
"grunt": "^1.0.1",
Expand All @@ -78,6 +79,7 @@
"karma": "^1.1.2",
"karma-browserify": "^4.4.2",
"karma-chrome-launcher": "^1.0.1",
"karma-es6-shim": "^1.0.0",
"karma-firefox-launcher": "^1.0.0",
"karma-html2js-preprocessor": "^1.0.0",
"karma-junit-reporter": "~1.0.0",
Expand Down
8 changes: 5 additions & 3 deletions test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ module.exports = function(config) {
basePath: '../',

// testing framework to use (jasmine/mocha/qunit/...)
frameworks: ['mocha', 'browserify'],
frameworks: ['es6-shim', 'browserify', 'mocha'],

// list of files / patterns to load in the browser
files: [
'node_modules/es5-shim/es5-shim.js',
'test/loopback.test.js',
'test/model.test.js',
// [rfeng] Browserified common/models/application.js
Expand Down Expand Up @@ -63,6 +62,7 @@ module.exports = function(config) {
// Which plugins to enable
plugins: [
'karma-browserify',
'karma-es6-shim',
'karma-mocha',
'karma-phantomjs-launcher',
'karma-chrome-launcher',
Expand Down Expand Up @@ -104,7 +104,9 @@ module.exports = function(config) {
'superagent',
'supertest',
],
// transform: ['coffeeify'],
transform: [
['babelify', {presets: 'es2015'}],
],
debug: true,
// noParse: ['jquery'],
watch: true,
Expand Down

0 comments on commit 5607460

Please sign in to comment.