Comparing version 1.3.0 to 2.0.0
@@ -36,3 +36,3 @@ const Reset = "\x1b[0m"; | ||
function exportStatement(fromPath) { | ||
return `export * from './${fromPath}';`; | ||
return `export * from './${fromPath.replace(/^\//, '')}';`; | ||
} | ||
@@ -39,0 +39,0 @@ |
@@ -13,3 +13,3 @@ #!/usr/bin/env node | ||
{ | ||
alias: {'c': 'create', 'b': 'barrel', 'v': 'version', 'h': 'help'}, | ||
alias: {'b': 'barrel', 'v': 'version', 'h': 'help'}, | ||
boolean: ['version', 'help'], | ||
@@ -21,3 +21,3 @@ default: {barrel: 'index.ts'} | ||
if (config.version) { | ||
console.log("1.3.0"); | ||
console.log("2.0.0"); | ||
process.exit(0); | ||
@@ -29,3 +29,6 @@ } | ||
Usage: | ||
ng g c foo | ngb [options] | ||
ng g c foo | ngb [create-path] [options] | ||
Arguments: | ||
[create-path] define path to put barrel file, relative to created .ts files | ||
@@ -35,4 +38,3 @@ Options: | ||
-v, --version show version info and exit | ||
-c, --create define path to put index file | ||
-b, --barrel define barrel file name`); | ||
-b, --barrel define barrel file name, default: index.ts`); | ||
process.exit(0); | ||
@@ -71,2 +73,7 @@ } | ||
const isPathProvidedWithoutOption = config["_"] && !!config["_"][0]; | ||
if (isPathProvidedWithoutOption) { | ||
config.create = config["_"][0]; | ||
} | ||
if (config.create !== undefined) { | ||
@@ -73,0 +80,0 @@ const p = path.join(directory, config.create); |
{ | ||
"name": "ng-barrel", | ||
"version": "1.3.0", | ||
"version": "2.0.0", | ||
"description": "CLI tool to add generated Angular files to barrel files", | ||
@@ -5,0 +5,0 @@ "main": "ng-barrel.js", |
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
8988
133