Skip to content

Commit

Permalink
Update dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
SBoudrias committed May 28, 2019
1 parent 07b6233 commit c35e6a2
Show file tree
Hide file tree
Showing 8 changed files with 2,208 additions and 1,823 deletions.
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
sudo: false
language: node_js
node_js:
- 6
- 8
- node
cache:
yarn: true
- 10
- 12
after_script:
- cat ./coverage/lcov.info | coveralls
1 change: 1 addition & 0 deletions __tests__/commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe('#commit()', () => {
while (i--) {
filesystem.writeFileSync(path.join(fixtureDir, 'file-' + i + '.txt'), 'foo');
}

fs.copy(fixtureDir + '/**', output);
rimraf(output, done);
});
Expand Down
1 change: 1 addition & 0 deletions lib/actions/commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ function write(file) {
if (!fs.existsSync(dir)) {
mkdirp.sync(dir);
}

fs.writeFileSync(file.path, file.contents, {
mode: file.stat ? file.stat.mode : null
});
Expand Down
1 change: 1 addition & 0 deletions lib/actions/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ exports._copySingle = function (from, to, options, context, tplSettings) {
if (options.process) {
contents = applyProcessingFunc(options.process, file.contents, file.path);
}

if (context) {
to = ejs.render(to, context, tplSettings);
}
Expand Down
1 change: 1 addition & 0 deletions lib/actions/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = function (paths, options) {
if (!Array.isArray(paths)) {
paths = [paths];
}

paths = paths.map(function (filePath) {
return path.resolve(filePath);
});
Expand Down
3 changes: 3 additions & 0 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ exports.globify = function (filePath) {
if (glob.hasMagic(filePath)) {
return filePath;
}

if (!fs.existsSync(filePath)) {
// The target of a pattern who's not a glob and doesn't match an existing
// entity on the disk is ambiguous. As such, match both files and directories.
Expand All @@ -49,8 +50,10 @@ exports.globify = function (filePath) {
if (fsStats.isFile()) {
return filePath;
}

if (fsStats.isDirectory()) {
return path.join(filePath, '**');
}

throw new Error('Only file path or directory path are supported.');
};

0 comments on commit c35e6a2

Please sign in to comment.