Skip to content

Commit 0b70d75

Browse files
Fixed issue where project setup not happening on window machine and dependencies not getting installed
1 parent 849a2fe commit 0b70d75

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

utils/constants.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ const reservedDir = {
1515
MODULES: 'modules'
1616
};
1717

18+
const ignoreDirs = ['modules', '.vscode'];
19+
1820
const appConstants = {
1921
UNIVERSAL_REACT: 'universal-react',
2022
PACKAGE_JSON: 'package.json',
@@ -92,5 +94,6 @@ module.exports = {
9294
featureScope,
9395
appTypes,
9496
reservedDir,
95-
apiEndpoints
97+
apiEndpoints,
98+
ignoreDirs
9699
};

utils/helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const { format } = require('date-and-time');
2-
const { featureScope, reservedDir } = require('./constants');
2+
const { featureScope, ignoreDirs } = require('./constants');
33

44
const currentDateTime = (date) => format(date, 'MM/DD/YYYY HH:mm:ssA [GMT]Z');
55

@@ -19,7 +19,7 @@ function arrayUnique(array) {
1919
return a;
2020
}
2121

22-
const inRservedDirs = (dir) => Object.values(reservedDir).includes(dir);
22+
const inRservedDirs = (dir) => ignoreDirs.includes(dir);
2323

2424
// setup assumes that a dir inside templates/optionalFeatures exists with the same name as the value below
2525
const optionalFeatures = [

utils/install.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function installPackages(commandType) {
2323
);
2424
spinnerInit.start();
2525

26-
const installDependencies = spawn(`${commandType}`, ['install']);
26+
const installDependencies = spawn(`${commandType}`, ['install'], { shell: true });
2727

2828
installDependencies.stdout.on('data', (data) => {
2929
console.info(`[${chalk.green(currentDateTime(new Date()))}] - ${data}`);

0 commit comments

Comments
 (0)