Comparing version 1.3.1 to 1.4.0
22
index.js
@@ -22,9 +22,9 @@ #!/usr/bin/env node | ||
* @param {string|string[]} inputPaths The file or files to convert, can be in | ||
* glob paths (``*.jsx`) or regular paths | ||
* that point to files, not directories | ||
* (`/path/to/script.jsx`) | ||
* @param {string|string[]} outputPath The output file or output directory, | ||
* or an array of output files | ||
* glob paths (``*.jsx`) or regular paths that point to files, | ||
* not directories (`/path/to/script.jsx`) | ||
* @param {string|string[]} [outputPath] The output file or output directory, | ||
* or an array of output files. If not given, the files will be created | ||
* in the same location as the input file(s) | ||
* @return {Promise} A Promise that returns an array of file paths to the | ||
* converted files | ||
* converted files | ||
*/ | ||
@@ -49,2 +49,5 @@ function jsxbin( inputPaths, outputPath ) { | ||
output = getOutputPaths( input, outputPath ) | ||
if ( outputPath === undefined ) { | ||
outputPath = output[ 0 ] | ||
} | ||
log.verbose( 'Converting', input, 'to', output ) | ||
@@ -122,2 +125,9 @@ } ) | ||
if ( outputPath === undefined ) { | ||
return inputPaths.map( filePath => { | ||
const extension = path.extname( filePath ) | ||
return filePath.replace( extension, '.jsxbin' ) | ||
} ) | ||
} | ||
// Check if outputPath is directory | ||
@@ -124,0 +134,0 @@ if ( !/\.jsxbin$/.test( outputPath ) ) { |
{ | ||
"name": "jsxbin", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "Convert jsx ExtendScript files into jsxbin files using ExtendScript Toolkit", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
15298
380