Skip to content
This repository was archived by the owner on May 15, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions bin/create-zeix-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,17 @@ const ncp = require('ncp').ncp;
const fs = require('fs');
const nodePath = process.argv[0];
const newFolder = process.argv[2];
const pathBoilerplate = path.join(nodePath, '../..', 'lib/node_modules/zeix-react-redux-boilerplate/boilerplate');
const newProjectPath = path.join(process.env.PWD, newFolder);

var pathBoilerplate, newProjectPath = null;
var isWindows = /^win/.test(process.platform);

if (isWindows) {
pathBoilerplate = path.join(process.env.APPDATA, 'npm/node_modules/zeix-react-redux-boilerplate/boilerplate');
newProjectPath = path.join(process.cwd(), newFolder);
} else {
pathBoilerplate = path.join(nodePath, '../..', 'lib/node_modules/zeix-react-redux-boilerplate/boilerplate');
newProjectPath = path.join(process.env.PWD, newFolder);
}


if (typeof newFolder === typeof undefined) {
Expand Down