Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade ember-cli to 2.14 #606

Merged
merged 1 commit into from
Apr 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,10 @@
/coverage/*
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
4 changes: 1 addition & 3 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

let App;

App = Ember.Application.extend({
const App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
Expand Down
28 changes: 14 additions & 14 deletions config/environment.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
module.exports = function(environment) {
var deployTarget = process.env.DEPLOY_TARGET;
var rootURL = process.env.TWIDDLE_ROOT_URL || '/';
var host = process.env.GH_API_HOST || 'https://api.github.com';
var toriiGHEBaseURL = process.env.TORII_GHE_OAUTH || null;
var toriiProvider = process.env.TORII_PROVIDER || 'github-oauth2';
var githubOauthURL = process.env.GATEKEEPER_URL || 'http://localhost:9999/authenticate/';
var assetsHost = process.env.TWIDDLE_ASSET_HOST || '/';
var githubApiKey = process.env.GH_API_KEY || '2b84ab967ef8266ca0dc'
let deployTarget = process.env.DEPLOY_TARGET;
let rootURL = process.env.TWIDDLE_ROOT_URL || '/';
let host = process.env.GH_API_HOST || 'https://api.github.com';
let toriiGHEBaseURL = process.env.TORII_GHE_OAUTH || null;
let toriiProvider = process.env.TORII_PROVIDER || 'github-oauth2';
let githubOauthURL = process.env.GATEKEEPER_URL || 'http://localhost:9999/authenticate/';
let assetsHost = process.env.TWIDDLE_ASSET_HOST || '/';
let githubApiKey = process.env.GH_API_KEY || '2b84ab967ef8266ca0dc'

var ENV = {
let ENV = {
modulePrefix: 'ember-twiddle',
environment: environment,
environment,
rootURL: rootURL,
locationType: 'auto',
host: host,
host,
githubOauthUrl: githubOauthURL,
githubApiKey: githubApiKey,
githubApiKey,
addonUrl: 'https://emw2ujz4u1.execute-api.us-east-1.amazonaws.com/canary/addon',
assetsHost: assetsHost,
assetsHost,
maxNumFilesInitiallyExpanded: 12,
toriiProvider: toriiProvider,
toriiProvider,
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
Expand Down
90 changes: 45 additions & 45 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
module.exports = function(defaults) {
process.env.FASTBOOT_DISABLED = true;

var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var funnel = require('broccoli-funnel');
var concat = require('broccoli-concat');
var mergeTrees = require('broccoli-merge-trees');
var babelTranspiler = require('broccoli-babel-transpiler');
var browserify = require('browserify');
var path = require('path');
var fs = require('fs');

var env = EmberApp.env();
var deployTarget = process.env.DEPLOY_TARGET;
var isProductionLikeBuild = ['production', 'staging'].indexOf(env) > -1;
var isFastboot = process.env.EMBER_CLI_FASTBOOT;
var prepend = null;
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const funnel = require('broccoli-funnel');
const concat = require('broccoli-concat');
const mergeTrees = require('broccoli-merge-trees');
const babelTranspiler = require('broccoli-babel-transpiler');
const browserify = require('browserify');
const path = require('path');
const fs = require('fs');

const env = EmberApp.env();
const deployTarget = process.env.DEPLOY_TARGET;
const isProductionLikeBuild = ['production', 'staging'].indexOf(env) > -1;
const isFastboot = process.env.EMBER_CLI_FASTBOOT;
let prepend = null;

if (isProductionLikeBuild) {
if (deployTarget === 'production') {
Expand All @@ -26,9 +26,9 @@ module.exports = function(defaults) {
}
}

var blueprintsCode = getEmberCLIBlueprints();
const blueprintsCode = getEmberCLIBlueprints();

var app = new EmberApp(defaults, {
let app = new EmberApp(defaults, {
SRI: {
runsIn: "production"
},
Expand Down Expand Up @@ -83,7 +83,7 @@ module.exports = function(defaults) {
});

if (isFastboot) {
var b = browserify();
let b = browserify();
b.add(require.resolve('babel-core/browser-polyfill'));
b.bundle(function(err, buf) {
fs.writeFileSync('vendor/polyfill.js', buf);
Expand All @@ -102,46 +102,46 @@ module.exports = function(defaults) {
app.import('vendor/bootstrap-dropdown-submenu-fix.css');
app.import('vendor/hint.css');

var loaderTree = funnel(path.dirname(require.resolve('loader.js')), {
let loaderTree = funnel(path.dirname(require.resolve('loader.js')), {
files: ['loader.js'],
destDir: '/assets'
});

var testLoaderTree = funnel("node_modules/ember-cli-test-loader/addon-test-support", {
let testLoaderTree = funnel("node_modules/ember-cli-test-loader/addon-test-support", {
files: ['index.js'],
getDestinationPath: function() {
return "assets/test-loader.js";
}
});
testLoaderTree = babelTranspiler(testLoaderTree, babelOpts());

var emberDataShims = funnel('vendor', {
let emberDataShims = funnel('vendor', {
files: ['ember-data-shims.js']
});

var bowerTree = funnel('bower_components');
var shimsTree = funnel('node_modules/ember-cli-shims/vendor/ember-cli-shims' , {
let bowerTree = funnel('bower_components');
let shimsTree = funnel('node_modules/ember-cli-shims/vendor/ember-cli-shims' , {
destDir: 'ember-cli-shims'
});

var baseResolverTree = funnel('node_modules/ember-resolver/addon', {
let baseResolverTree = funnel('node_modules/ember-resolver/addon', {
destDir: 'ember-resolver'
});

var transpiledResolverTree = babelTranspiler(baseResolverTree, babelOpts());
let transpiledResolverTree = babelTranspiler(baseResolverTree, babelOpts());

var baseInitializersTree = funnel('node_modules/ember-load-initializers/addon', {
let baseInitializersTree = funnel('node_modules/ember-load-initializers/addon', {
destDir: 'ember-load-initializers'
});

var transpiledInitializersTree = babelTranspiler(baseInitializersTree, babelOpts());
let transpiledInitializersTree = babelTranspiler(baseInitializersTree, babelOpts());

var finalQUnitTree = buildAddonTree('ember-qunit');
var finalTestHelpersTree = buildAddonTree('ember-test-helpers');
let finalQUnitTree = buildAddonTree('ember-qunit');
let finalTestHelpersTree = buildAddonTree('ember-test-helpers');

var mergedDepsTree = mergeTrees([bowerTree, shimsTree, transpiledInitializersTree, transpiledResolverTree, emberDataShims]);
let mergedDepsTree = mergeTrees([bowerTree, shimsTree, transpiledInitializersTree, transpiledResolverTree, emberDataShims]);

var twiddleVendorTree = concat(mergedDepsTree, {
let twiddleVendorTree = concat(mergedDepsTree, {
inputFiles: [
'ember-cli-shims/app-shims.js',
'ember-load-initializers/**/*.js',
Expand All @@ -155,16 +155,16 @@ module.exports = function(defaults) {
};

function buildAddonTree(addonName) {
var funnel = require('broccoli-funnel');
var concat = require('broccoli-concat');
var babelTranspiler = require('broccoli-babel-transpiler');
var path = require('path');
const funnel = require('broccoli-funnel');
const concat = require('broccoli-concat');
const babelTranspiler = require('broccoli-babel-transpiler');
const path = require('path');

var baseTree = funnel(path.dirname(require.resolve(addonName)), {
let baseTree = funnel(path.dirname(require.resolve(addonName)), {
include: ['**/*.js']
});

var transpiledTree = babelTranspiler(baseTree, babelOpts());
let transpiledTree = babelTranspiler(baseTree, babelOpts());

return concat(transpiledTree, {
inputFiles: ['**/*.js'],
Expand All @@ -189,11 +189,11 @@ function babelOpts() {
// app/lib/blueprints so we don't have to maintain our
// own blueprints
function getEmberCLIBlueprints() {
var fs = require('fs');
var path = require('path');
var fileMap = {};
const fs = require('fs');
const path = require('path');
let fileMap = {};

var blueprintFiles = {
let blueprintFiles = {
"cliBlueprintFiles": {
"path": "node_modules/ember-cli",
"files": {
Expand Down Expand Up @@ -224,11 +224,11 @@ function getEmberCLIBlueprints() {
}
};

for (var list in blueprintFiles) {
var blueprintPath = blueprintFiles[list].path;
var files = blueprintFiles[list].files;
for (var blueprintName in files) {
var filePath = blueprintPath + '/blueprints/' + files[blueprintName];
for (let list in blueprintFiles) {
let blueprintPath = blueprintFiles[list].path;
let files = blueprintFiles[list].files;
for (let blueprintName in files) {
let filePath = blueprintPath + '/blueprints/' + files[blueprintName];
fileMap[blueprintName] = fs.readFileSync(filePath).toString();
}
}
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"ember-ajax": "^3.0.0",
"ember-api-actions": "~0.1.8",
"ember-autoresize": "~0.6.1",
"ember-cli": "2.13.3",
"ember-cli": "2.14.2",
"ember-cli-app-version": "^3.0.0",
"ember-cli-babel": "^6.12.0",
"ember-cli-bootstrap-sassy": "~0.5.8",
Expand All @@ -43,7 +43,7 @@
"ember-cli-eslint": "^4.2.3",
"ember-cli-fastboot": "^1.0.0",
"ember-cli-file-creator": "~0.4.0",
"ember-cli-htmlbars": "^1.3.4",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "~0.4.4",
"ember-cli-inject-live-reload": "^1.7.0",
"ember-cli-jstree": "^1.0.9",
Expand Down Expand Up @@ -72,7 +72,7 @@
"ember-resolver": "^4.0.0",
"ember-responsive": "^2.0.8",
"ember-route-action-helper": "^2.0.6",
"ember-source": "~2.13.3",
"ember-source": "~2.14.1",
"ember-test-helpers": "~0.6.3",
"eslint-plugin-ember": "^5.1.0",
"ivy-codemirror": "^2.1.0",
Expand Down
Loading