create-jqwidgets-react-app
Advanced tools
Comparing version 0.0.1 to 0.0.2
14
index.js
@@ -7,6 +7,6 @@ #! /usr/bin/env node | ||
const path = require('path'); | ||
let ncp = require('ncp').ncp; | ||
const ncp = require('ncp').ncp; | ||
ncp.limit = 16; | ||
const projectName = process.argv.slice(2); | ||
const projectName = process.argv[2]; | ||
@@ -20,4 +20,4 @@ const dir = './' + projectName; | ||
const srcPath = path.join(path.dirname(process.argv[1]), '/node_modules/create-jqwidgets-react-app'); | ||
const destPath = process.cwd() + '\\' + projectName; | ||
const srcPath = path.join(path.resolve(__dirname), 'node_modules', 'create-jqwidgets-react-app');; | ||
const destPath = path.join(process.cwd(), projectName); | ||
@@ -29,9 +29,9 @@ ncp(srcPath, destPath, function (err) { | ||
replace({ | ||
regex: "create-jqwidgets-react-app", | ||
regex: 'create-jqwidgets-react-app', | ||
replacement: projectName, | ||
paths: [ | ||
destPath + '\\package.json' | ||
path.join(destPath, 'package.json') | ||
], | ||
recursive: true, | ||
silent: true, | ||
silent: true | ||
}); | ||
@@ -38,0 +38,0 @@ console.log('\x1b[36m%s\x1b[0m', 'Project ' + projectName + ' Created!'); |
{ | ||
"name": "create-jqwidgets-react-app", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"preferGlobal": true, | ||
@@ -24,4 +24,4 @@ "repository": { | ||
"widget", | ||
"Angular", | ||
"Angular CLI" | ||
"React", | ||
"create-react-app" | ||
], | ||
@@ -28,0 +28,0 @@ "author": { |
2372