Comparing version 0.0.3 to 0.0.4
@@ -59,3 +59,2 @@ 'use strict'; | ||
output: subcommand.output, | ||
basedir: config.basedir, | ||
args: Object.assign({}, cliParams.args, { input: cliParams.input }) | ||
@@ -62,0 +61,0 @@ }); |
@@ -15,6 +15,2 @@ 'use strict'; | ||
var _getScriptPath = require('./getScriptPath'); | ||
var _getScriptPath2 = _interopRequireDefault(_getScriptPath); | ||
var _path = require('path'); | ||
@@ -26,4 +22,4 @@ | ||
function createOutputFilePath(template, output, basedir) { | ||
var args = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3]; | ||
function createOutputFilePath(template, output) { | ||
var args = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; | ||
@@ -38,3 +34,3 @@ var name = template.name || _path2.default.parse(template.src).base; | ||
var file = output && output.dir ? output.dir + '/' + name : name; | ||
var outputPath = _path2.default.relative(process.cwd(), (0, _getScriptPath2.default)(basedir, file)); | ||
var outputPath = _path2.default.relative(process.cwd(), file); | ||
return outputPath; | ||
@@ -44,3 +40,3 @@ } | ||
function writeTemplate(params) { | ||
var outputPath = createOutputFilePath(params.template, params.output, params.basedir, params.args); | ||
var outputPath = createOutputFilePath(params.template, params.output, params.args); | ||
_mkdirp2.default.sync(_path2.default.parse(outputPath).dir); | ||
@@ -47,0 +43,0 @@ _fs2.default.writeFileSync(outputPath, params.content); |
{ | ||
"name": "hia", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Easy and customizable generator system for creating template.", | ||
@@ -5,0 +5,0 @@ "bin": { "hia": "bin/hia.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
42057
828