Skip to content

Commit 29b8cd0

Browse files
Merge pull request #866 from pattern-lab/issue/864-cli-gulpfile
Copy gulpfile.js for edition-node-gulp
2 parents 7ca86a6 + 77aaa57 commit 29b8cd0

File tree

5 files changed

+7130
-924
lines changed

5 files changed

+7130
-924
lines changed

packages/cli/bin/archive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
const fs = require('fs-promise');
2+
const fs = require('fs');
33
const path = require('path');
44
const Archiver = require('archiver');
55
const isValidConfig = require('./validate-config');

packages/cli/bin/install-edition.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,24 @@ const installEdition = (edition, config) =>
99
/**
1010
* 1. Trigger edition install
1111
* 2. Copy over the mandatory edition files to sourceDir
12-
* 3. Adjust config paths
12+
* 3. Do custom post-install procedures for different core editions:
13+
* 3.1 Copy gulpfile.js for edition-node-gulp
1314
*/
1415
const sourceDir = config.paths.source.root;
1516
yield checkAndInstallPackage(edition); // 1
1617
yield copyAsync(
1718
path.resolve('./node_modules', edition, 'source', '_meta'),
1819
path.resolve(sourceDir, '_meta')
1920
); // 2
21+
switch (edition) { // 3
22+
// 3.1
23+
case '@pattern-lab/edition-node-gulp': {
24+
yield copyAsync(
25+
path.resolve('./node_modules', edition, 'gulpfile.js'),
26+
path.resolve(sourceDir, '../', 'gulpfile.js')
27+
);
28+
}
29+
}
2030
return config;
2131
});
2232

packages/cli/bin/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
const fs = require('fs-promise');
2+
const fs = require('fs-extra');
33
const spawn = require('execa');
44
const glob = require('glob');
55
const path = require('path');

0 commit comments

Comments
 (0)