Skip to content

Commit

Permalink
Merge pull request #171 from cibernox/update-to-latest-ember-cli-beta
Browse files Browse the repository at this point in the history
Parse ES2017 by default
  • Loading branch information
rwjblue committed May 1, 2017
2 parents f6e86ba + 56a3b48 commit 2ea7d00
Show file tree
Hide file tree
Showing 16 changed files with 5,678 additions and 68 deletions.
14 changes: 0 additions & 14 deletions .editorconfig
Expand Up @@ -13,22 +13,8 @@ insert_final_newline = true
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2

[*.hbs]
insert_final_newline = false
indent_style = space
indent_size = 2

[*.css]
indent_style = space
indent_size = 2

[*.html]
indent_style = space
indent_size = 2

[*.{diff,md}]
trim_trailing_whitespace = false
4 changes: 1 addition & 3 deletions .eslintrc.js
@@ -1,9 +1,7 @@
'use strict';

module.exports = {
root: true,
parserOptions: {
ecmaVersion: 6,
ecmaVersion: 2017,
sourceType: 'module'
},
extends: 'eslint:recommended',
Expand Down
16 changes: 16 additions & 0 deletions .npmignore
@@ -0,0 +1,16 @@
/bower_components
/config/ember-try.js
/dist
/tests
/tmp
**/.gitkeep
.bowerrc
.editorconfig
.ember-cli
.gitignore
.eslintrc.js
.watchmanconfig
.travis.yml
bower.json
ember-cli-build.js
testem.js
14 changes: 6 additions & 8 deletions .travis.yml
Expand Up @@ -7,18 +7,16 @@ node_js:
- "stable"

cache:
directories:
- $HOME/.npm
- $HOME/.cache # includes bowers cache
yarn: true

before_install:
# if npm version is less than 3.0.0, upgrade to 3
- if [[ $(npm -v | cut -d '.' -f 1) -lt 3 ]]; then npm i -g npm@^3; fi
- npm install -g bower phantomjs-prebuilt
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH
- yarn global add phantomjs-prebuilt
- phantomjs --version

install:
- npm install
- bower install
- yarn install --no-lockfile

deploy:
provider: npm
Expand Down
2 changes: 1 addition & 1 deletion blueprints/ember-cli-eslint/files/.eslintrc.js
@@ -1,7 +1,7 @@
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 6,
ecmaVersion: 2017,
sourceType: 'module'
},
extends: 'eslint:recommended',
Expand Down
14 changes: 7 additions & 7 deletions blueprints/ember-cli-eslint/index.js
Expand Up @@ -26,19 +26,19 @@ function synchronize(items, cb) {
module.exports = {
name: 'ember-cli-eslint',

normalizeEntityName: function() {
normalizeEntityName() {
// this prevents an error when the entityName is
// not specified (since that doesn't actually matter
// to us
},

afterInstall: function() {
afterInstall() {
var removeJSHintDep;
if (this.removePackageFromProject && 'ember-cli-jshint' in this.project.dependencies()) {
removeJSHintDep = this.removePackageFromProject('ember-cli-jshint');
} else {
removeJSHintDep = Promise.resolve();
}
}

var removeJSHintConfig = this._removeJSHintConfig.bind(this);

Expand All @@ -52,7 +52,7 @@ module.exports = {
*
* @return {RSVP.Promise}
*/
_removeJSHintConfig: function() {
_removeJSHintConfig() {
var promptRemove = this._promptRemove.bind(this);
var removeFile = this._removeFile.bind(this);
var ui = this.ui;
Expand Down Expand Up @@ -116,7 +116,7 @@ module.exports = {
*
* @return {Promise->string[]} found file names
*/
_findJSHintConfigFiles: function() {
_findJSHintConfigFiles() {
var projectRoot = this.project.root;
var ui = this.ui;

Expand All @@ -143,7 +143,7 @@ module.exports = {
* @param {string} filePath the path to the file
* @return {RSVP.Promise}
*/
_promptRemove: function(filePath) {
_promptRemove(filePath) {
var removeFile = this._removeFile.bind(this);
var message = 'Should I remove `' + filePath + '`?';

Expand Down Expand Up @@ -172,7 +172,7 @@ module.exports = {
* @param {string} filePath the relative path (from the project root) to remove
* @return {RSVP.Promise}
*/
_removeFile: function(filePath) {
_removeFile(filePath) {
var projectRoot = this.project.root;
var fullPath = resolve(projectRoot, filePath);

Expand Down
4 changes: 0 additions & 4 deletions bower.json

This file was deleted.

3 changes: 1 addition & 2 deletions config/environment.js
@@ -1,6 +1,5 @@
'use strict';

/* eslint-env node */
'use strict';

module.exports = function(/* environment, appConfig */) {
return { };
Expand Down
24 changes: 7 additions & 17 deletions ember-cli-build.js
@@ -1,12 +1,8 @@
'use strict';

/* eslint-env node */

var path = require('path');
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function (defaults) {
let options = {
var options = {
eslint: {},
};

Expand All @@ -16,18 +12,12 @@ module.exports = function (defaults) {

var app = new EmberAddon(defaults, options);

// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
// should be the asset to use in that environment.
//
// If the library that you are including contains AMD or ES6
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
/*
This build file specifies the options for the dummy test app of this
addon, located in `/tests/dummy`
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
*/

return app.toTree();
};
11 changes: 5 additions & 6 deletions package.json
Expand Up @@ -43,19 +43,18 @@
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"chai": "^3.5.0",
"ember-cli": "2.12.2",
"ember-cli-babel": "^6.0.0-beta.7",
"ember-cli": "2.13.0",
"ember-cli-babel": "^6.0.0",
"ember-cli-blueprint-test-helpers": "^0.17.1",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-htmlbars": "^1.1.1",
"ember-cli-htmlbars-inline-precompile": "^0.4.0-beta.2",
"ember-cli-htmlbars-inline-precompile": "^0.4.0",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-qunit": "^3.1.0",
"ember-cli-shims": "^1.0.2",
"ember-cli-qunit": "^4.0.0-beta.1",
"ember-cli-shims": "^1.1.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-disable-prototype-extensions": "^1.1.0",
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.0.0",
Expand Down
3 changes: 0 additions & 3 deletions testem.js
@@ -1,7 +1,4 @@
'use strict';

/* eslint-env node */

module.exports = {
"test_page": "tests/index.html?hidepassed",
"disable_watching": true,
Expand Down
3 changes: 2 additions & 1 deletion tests/dummy/app/router.js
Expand Up @@ -2,7 +2,8 @@ import Ember from 'ember';
import config from './config/environment';

const Router = Ember.Router.extend({
location: config.locationType
location: config.locationType,
rootURL: config.rootURL
});

Router.map(function() {
Expand Down
6 changes: 4 additions & 2 deletions tests/dummy/config/environment.js
@@ -1,5 +1,3 @@
'use strict';

/* eslint-env node */

module.exports = function(environment) {
Expand All @@ -12,6 +10,10 @@ module.exports = function(environment) {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-controller': true
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false
}
},

Expand Down
10 changes: 10 additions & 0 deletions tests/dummy/config/targets.js
@@ -0,0 +1,10 @@
/* eslint-env node */

module.exports = {
browsers: [
'ie 9',
'last 1 Chrome versions',
'last 1 Firefox versions',
'last 1 Safari versions'
]
};
2 changes: 2 additions & 0 deletions tests/test-helper.js
Expand Up @@ -2,5 +2,7 @@ import resolver from './helpers/resolver';
import {
setResolver
} from 'ember-qunit';
import { start } from 'ember-cli-qunit';

setResolver(resolver);
start();

0 comments on commit 2ea7d00

Please sign in to comment.