Comparing version 1.0.10 to 1.0.11
var fs = require('fs'); | ||
var rm = require("rimraf").sync; | ||
var chalk = require('chalk'); | ||
var figlet = require('figlet'); | ||
var download = require('./download'); | ||
var serve = require('./serve'); | ||
var tsc = require('./tsc'); | ||
@@ -31,7 +34,6 @@ exports.init = init; | ||
console.log('Creating ' + options.app + ' application'); | ||
download(options.baseUrl + options.app, "./", {}, function(err){ | ||
if(err){ | ||
download(options.baseUrl + options.app, "./", {}, function (err) { | ||
if (err) { | ||
console.log('Unable to download.' + err); | ||
} | ||
else { | ||
} else { | ||
console.log(options.app + ' application created successfully'); | ||
@@ -42,2 +44,4 @@ } | ||
global.serve = function (options) { | ||
if(options.tsc === 'true') | ||
tsc(); | ||
serve(options); | ||
@@ -55,11 +59,13 @@ } | ||
baseUrl: 'karthickthangasamy/', | ||
tsc: false || opts.tsc, | ||
availableSeed: ['ngEmpty', 'ngButton', 'ngTab'] | ||
} | ||
console.log(JSON.stringify(this.options)); | ||
if (process.argv.length > 2) { | ||
command = (process.argv[2]).toString().trim(); | ||
if (process.argv.length > 3) { | ||
appName = (process.argv[3]).toLowerCase().toString().trim(); | ||
appName = (process.argv[3]).toLowerCase().toString().trim(); | ||
if (this.options.availableSeed.customIndexOf(appName) > -1) | ||
this.options.app = (process.argv[3]); | ||
else { | ||
else if(!(appName.indexOf("--")) > -1 { | ||
console.log("The template application '" + appName + "' is not availabe"); | ||
@@ -71,4 +77,19 @@ process.exit(); | ||
global[command](this.options); | ||
} else { | ||
console.log( | ||
chalk.yellow( | ||
figlet.textSync('ej-cli', { | ||
horizontalLayout: 'full' | ||
}) | ||
) | ||
); | ||
console.log(chalk.green('Available commands: \n\n create - ej create <appName> - To create application \n serve - ej serve - To serve and launch application in browser')); | ||
console.log(chalk.yellow('\n\n Available templates : \n\n') + chalk.blue(' Syncfusion AngularJS - ej create <appName> - ngEmpty, ngButton, ngTab')); | ||
console.log(chalk.blue(' Syncfusion JavaScript - ej create <appName> - empty, button, tab')); | ||
console.log(chalk.blue(' Syncfusion KnockOut - ej create <appName> - koEmpty, koButton, koTab')); | ||
console.log(chalk.blue(' Syncfusion Typescript - ej create <appName> - tsEmpty, tsButton, tsTab')); | ||
} | ||
} |
{ | ||
"name": "ej-cli", | ||
"version": "1.0.10", | ||
"version": "1.0.11", | ||
"description": "", | ||
@@ -16,3 +16,5 @@ "main": "lib/cli.js", | ||
"dependencies": { | ||
"chalk": "^1.1.3", | ||
"download": "^5.0.2", | ||
"figlet": "^1.2.0", | ||
"fs": "0.0.1-security", | ||
@@ -19,0 +21,0 @@ "git-clone": "^0.1.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9844
12
266
8
3
+ Addedchalk@^1.1.3
+ Addedfiglet@^1.2.0
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedfiglet@1.8.0(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)