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

Update ember-cli-babel and remove deprecated broccoli plugin #12

Merged
merged 3 commits into from
Dec 4, 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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ install:
- bower install

script:
- ember try $EMBER_TRY_SCENARIO test && mocha tests/**/*-test-node.js
- ember try $EMBER_TRY_SCENARIO test && npm run test-mocha
33 changes: 17 additions & 16 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ var fs = require('fs');
var path = require('path');
var util = require('util');

var renameFiles = require('broccoli-rename-files');
var mergeTrees = require('broccoli-merge-trees');
var funnel = require('broccoli-funnel');
var removeFiles = require('broccoli-file-remover');
var replaceString = require('broccoli-string-replace');
var replaceString = require('broccoli-replace');

var assign = require('object-assign');
var colors = require('colors');
Expand Down Expand Up @@ -99,13 +97,12 @@ module.exports = {

if (this.options.enabled && type === 'all') {
if (this.options.output) {
renamedIndexTree = renameFiles(funnel(tree, {
renamedIndexTree = funnel(tree, {
srcDir: '.',
files: ['index.html'],
destDir: this.options.destDir || '.'
}), {
transformFilename: function() {
return this.options.output;
destDir: this.options.destDir || '.',
getDestinationPath: function() {
return this.options.output;
}.bind(this)
});
}
Expand All @@ -130,19 +127,23 @@ module.exports = {

renamedIndexTree = replaceString(renamedIndexTree, {
files: file,
pattern: {
match: content.includeInOutput ? markersRegExp : injectedContentRegExp,
replacement: ''
}
patterns: [
{
match: content.includeInOutput ? markersRegExp : injectedContentRegExp,
replacement: ''
}
]
});
}

indexTree = replaceString(indexTree, {
files: indexFiles,
pattern: {
match: content.includeInIndexHtml ? markersRegExp : injectedContentRegExp,
replacement: ''
}
patterns: [
{
match: content.includeInIndexHtml ? markersRegExp : injectedContentRegExp,
replacement: ''
}
]
});

}, this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function findEmberIndex(app) {
describe('Addon', function () {
var builder;

this.timeout(15000);
this.timeout(60000);

afterEach(function () {
if (builder) {
Expand Down
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"start": "ember server",
"build": "ember build",
"test": "ember try:testall && npm run test-mocha",
"test-mocha": "mocha tests/**/*-test-node.js"
"test-mocha": "mocha mocha-tests"
},
"repository": "https://github.com/ramybenaroya/ember-index",
"engines": {
Expand All @@ -23,18 +23,18 @@
"broccoli-asset-rev": "^2.2.2",
"chai": "^3.0.0",
"ember-cli": "1.13.12",
"ember-cli-app-version": "^1.0.0",
"ember-cli-app-version": "^3.2.0",
"ember-cli-dependency-checker": "^1.1.0",
"ember-cli-htmlbars": "1.0.1",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-htmlbars-inline-precompile": "^0.4.0",
"ember-cli-ic-ajax": "0.2.4",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-qunit": "1.0.4",
"ember-cli-release": "0.2.8",
"ember-cli-uglify": "^1.0.1",
"ember-disable-prototype-extensions": "^1.0.0",
"ember-disable-proxy-controllers": "^1.0.1",
"ember-export-application-global": "^1.0.4",
"ember-export-application-global": "^2.0.0",
"ember-try": "~0.0.8",
"mocha": "^2.2.5"
},
Expand All @@ -43,13 +43,11 @@
"index"
],
"dependencies": {
"broccoli-file-remover": "^0.3.1",
"broccoli-funnel": "^1.1.0",
"broccoli-merge-trees": "^0.2.1",
"broccoli-rename-files": "0.0.3",
"broccoli-string-replace": "^0.1.2",
"broccoli-replace": "^0.12.0",
"colors": "^1.1.2",
"ember-cli-babel": "^5.1.5",
"ember-cli-babel": "^6.16.0",
"object-assign": "^3.0.0"
},
"ember-addon": {
Expand Down