Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #43 from Financial-Times/build
Browse files Browse the repository at this point in the history
Add build task — breaks saucelabs (again) — sorry @aintgoin2goa
  • Loading branch information
matthew-andrews committed Apr 1, 2015
2 parents 63261ab + 10c7a69 commit 6cdd50e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bin/next-build-tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var clean = require('../tasks/clean');
var configure = require('../tasks/configure');
var provision = require('../tasks/provision');
var verify = require('../tasks/verify');
var build = require('../tasks/build');
var verifyLayoutDeps = require('../tasks/verify-layout-deps');
var destroy = require('../tasks/destroy');
var nightwatch = require('../tasks/nightwatch');
Expand Down Expand Up @@ -114,6 +115,13 @@ program
]).catch(exit);
});

program
.command('build')
.description('build javascript and css')
.action(function() {
build().catch(exit);
});

program
.command('destroy [app]')
.description('deletes the app from heroku')
Expand Down
14 changes: 14 additions & 0 deletions tasks/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

var denodeify = require('denodeify');
var exec = denodeify(require('child_process').exec, function(err, stdout, stderr) {
if (err) {
console.log(stdout);
console.log(stderr);
}
return [err];
});

module.exports = function() {
return exec('origami-build-tools build --js=./client/main.js --sass=./client/main.scss --buildCss=main.css --buildJs=main.js --buildFolder=./public/');
};

0 comments on commit 6cdd50e

Please sign in to comment.