Skip to content

Commit

Permalink
Upgrade shelljs to latest version
Browse files Browse the repository at this point in the history
`cp -R` no longer creates missing directories, so add a new option to
the builder to create destination directories in advance.
  • Loading branch information
Rob--W committed Aug 31, 2016
1 parent 16c694c commit 5236855
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion external/builder.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* jshint node:true */
/* globals cp, ls, test */
/* globals cp, ls, mkdir, test */

'use strict';

Expand Down Expand Up @@ -274,13 +274,18 @@ exports.preprocessCSS = preprocessCSS;
* Simplifies common build steps.
* @param {object} setup
* .defines defines for preprocessors
* .mkdirs array of directories to be created before copying/processing.
* .copy array of arrays of source and destination pairs of files to copy
* .preprocess array of arrays of source and destination pairs of files
* run through preprocessor.
*/
function build(setup) {
var defines = setup.defines;

(setup.mkdirs || []).forEach(function(directory) {
mkdir('-p', directory);
});

setup.copy.forEach(function(option) {
var source = option[0];
var destination = option[1];
Expand Down
4 changes: 3 additions & 1 deletion make.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ function getBuildConfig(options) {
OPERA: false,
WEB: false,
},
mkdirs: [
dest_dir + 'icons',
],
copy: [
[SRC_DIR + 'lib', dest_dir],
[SRC_DIR + 'icons/*.png', dest_dir + 'icons']
Expand Down Expand Up @@ -134,7 +137,6 @@ target.web = function() {
},
copy: [
[SRC_DIR + 'search-worker.js', dest_dir],
[SRC_DIR + '*.css', dest_dir],
[SRC_DIR + 'lib', dest_dir],
[SRC_DIR + 'chrome-platform-info.js', dest_dir],
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"private": true,
"devDependencies": {
"less": "^2.7.1",
"shelljs": "0.2.6"
"shelljs": "^0.7.4"
}
}

0 comments on commit 5236855

Please sign in to comment.