ember-cli-rails-addon
Advanced tools
Comparing version 0.0.7 to 0.0.8
49
index.js
@@ -6,39 +6,2 @@ var fs = require('fs'); | ||
name: 'ember-cli-rails-addon', | ||
/* | ||
This fixes an issue with the ember-cli Builder.prototype.build | ||
implementation for 0.1.3 and 0.1.4. The bug was fixed in | ||
https://github.com/stefanpenner/ember-cli/pull/2792 and will be | ||
availabe in 0.1.5. Once that version is published and in normal | ||
usage this monkey patch can be removed. | ||
*/ | ||
monkeyPatchBuilderBuild: function() { | ||
var emberCLIVersion = this.project.emberCLIVersion(); | ||
var portions = emberCLIVersion.split('.').map(function(input) { | ||
return parseInt(input, 10); | ||
}); | ||
if (portions[1] === 1 && portions[2] > 2 && portions[2] < 5) { | ||
var Builder = this.project.require('ember-cli/lib/models/builder'); | ||
// this is the ember-cli implementation as of: | ||
// https://github.com/stefanpenner/ember-cli/pull/2792. | ||
Builder.prototype.build = function() { | ||
var self = this; | ||
var args = []; | ||
for (var i = 0, l = arguments.length; i < l; i++) { | ||
args.push(arguments[i]); | ||
} | ||
return this.processAddonBuildSteps('preBuild') | ||
.then(function() { | ||
return self.builder.build.apply(self.builder, args); | ||
}) | ||
.then(this.processBuildResult.bind(this)) | ||
.then(this.processAddonBuildSteps.bind(this, 'postBuild')); | ||
}; | ||
} | ||
}, | ||
warnMissingDependencyChecker: function() { | ||
@@ -53,3 +16,2 @@ var dependencies = this.project.dependencies(); | ||
init: function() { | ||
this.monkeyPatchBuilderBuild(); | ||
this.warnMissingDependencyChecker(); | ||
@@ -65,6 +27,11 @@ }, | ||
if (process.env.SUPPRESS_JQUERY === 'true') { | ||
var index = app.legacyFilesToAppend.indexOf(app.bowerDirectory + '/jquery/dist/jquery.js'); | ||
if (process.env.EXCLUDE_EMBER_ASSETS) { | ||
var excludeEmberAssets = process.env.EXCLUDE_EMBER_ASSETS; | ||
var excludeRegex = new RegExp("(?:" + excludeEmberAssets.replace(",", "|") + ")\\.js$"); | ||
var excludeAssets = app.legacyFilesToAppend.filter(function(asset){ return excludeRegex.test(asset); }); | ||
app.legacyFilesToAppend.splice(index, 1); | ||
excludeAssets.forEach(function(asset){ | ||
var index = app.legacyFilesToAppend.indexOf(asset); | ||
app.legacyFilesToAppend.splice(index, 1); | ||
}); | ||
} | ||
@@ -71,0 +38,0 @@ }, |
{ | ||
"name": "ember-cli-rails-addon", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Addon for configuring ember-cli-rails (the ruby gem) with the ember app(s) it wraps.", | ||
"repository": "https://github.com/rondale-sc/ember-cli-rails-addon", | ||
"main": "index.js", | ||
@@ -6,0 +7,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
2548
42
5