Skip to content

Commit

Permalink
Merge pull request #9 from lukemelia/configurable-output-path
Browse files Browse the repository at this point in the history
Allow outputPath to be configurable
  • Loading branch information
Aaron Chambers committed May 29, 2015
2 parents 86847e8 + 7d0c29b commit 21949dd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module.exports = {
var project = deployment.project;
var config = deployment.config[this.name] || {};

var outputPath = 'dist';
var outputPath = config.outputPath;
var buildEnv = config.buildEnv || 'production';

var Builder = require('ember-cli/lib/models/builder');
Expand Down
4 changes: 2 additions & 2 deletions lib/utilities/validate-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ module.exports = function(ui, config) {

var defaultConfig = {
buildEnv: 'production',
buildPath: 'tmp/dist-deploy'
outputPath: 'dist'
};
['buildEnv', 'buildPath'].forEach(function(propName){
['buildEnv', 'outputPath'].forEach(function(propName){
applyDefaultConfigIfNecessary(config, propName, defaultConfig, ui);
});

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/index-nodetest.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('build plugin', function() {
config: {
build: {
buildEnv: 'development',
buildPath: 'tmp/dist-deploy',
outputPath: 'tmp/dist-deploy',
}
}
}
Expand All @@ -80,7 +80,7 @@ describe('build plugin', function() {
return assert.isFulfilled(plugin.build.call(plugin, context))
.then(function(result) {
assert.deepEqual(result, {
distDir: 'dist',
distDir: 'tmp/dist-deploy',
distFiles: [
'assets/dummy.css',
'assets/dummy.js',
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/lib/utilities/validate-config-nodetest.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('validate-config', function() {
return assert.isFulfilled(subject(mockUi, config))
.then(function() {
assert.isDefined(config.buildEnv);
assert.isDefined(config.buildPath);
assert.isDefined(config.outputPath);
});
});

Expand All @@ -52,11 +52,11 @@ describe('validate-config', function() {
});
});

describe('with a buildEnv and buildPath provided', function () {
describe('with a buildEnv and outputPath provided', function () {
beforeEach(function() {
config = {
buildEnv: 'development',
buildPath: 'tmp/dist-deploy'
outputPath: 'tmp/dist-deploy'
};
});
it('does not warns about missing optional config', function() {
Expand Down

0 comments on commit 21949dd

Please sign in to comment.