squad-station 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/run.js +19 -1
- package/package.json +1 -1
package/bin/run.js
CHANGED
|
@@ -43,7 +43,7 @@ function install() {
|
|
|
43
43
|
|
|
44
44
|
function installBinary() {
|
|
45
45
|
// Binary version — may differ from npm package version
|
|
46
|
-
var VERSION = '0.
|
|
46
|
+
var VERSION = '0.7.0';
|
|
47
47
|
var REPO = 'thientranhung/squad-station';
|
|
48
48
|
|
|
49
49
|
var isWindows = process.platform === 'win32';
|
|
@@ -221,6 +221,24 @@ function scaffoldProject(force) {
|
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
|
|
224
|
+
// Copy rules/ (git workflow rules)
|
|
225
|
+
var rulesSrc = path.join(srcSquad, 'rules');
|
|
226
|
+
if (fs.existsSync(rulesSrc)) {
|
|
227
|
+
var rulesDest = path.join(destSquad, 'rules');
|
|
228
|
+
fs.mkdirSync(rulesDest, { recursive: true });
|
|
229
|
+
|
|
230
|
+
var rulesFiles = fs.readdirSync(rulesSrc).filter(function(f) { return f.endsWith('.md'); });
|
|
231
|
+
rulesFiles.forEach(function(file) {
|
|
232
|
+
var dest = path.join(rulesDest, file);
|
|
233
|
+
if (fs.existsSync(dest) && !force) {
|
|
234
|
+
console.log(' \x1b[33m–\x1b[0m .squad/rules/' + file + ' \x1b[2m(exists, use --force to overwrite)\x1b[0m');
|
|
235
|
+
} else {
|
|
236
|
+
fs.copyFileSync(path.join(rulesSrc, file), dest);
|
|
237
|
+
console.log(' \x1b[32m✓\x1b[0m .squad/rules/' + file);
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
|
|
224
242
|
// Copy examples/
|
|
225
243
|
var exSrc = path.join(srcSquad, 'examples');
|
|
226
244
|
var exDest = path.join(destSquad, 'examples');
|