Comparing version 3.1.1 to 3.1.2
15
bin.js
@@ -66,2 +66,8 @@ #!/usr/bin/env node | ||
} else if (stat.isDirectory() && dest && fs.statSync(dest).isDirectory()) { | ||
const cjsDest = path.resolve(process.cwd(), dest); | ||
process.on('exit', () => { | ||
const cjsPackage = path.join(cjsDest, 'package.json'); | ||
if (!fs.existsSync(cjsPackage)) | ||
fs.writeFileSync(cjsPackage, JSON.stringify({type: 'commonjs'})); | ||
}); | ||
const mkdir = dir => { | ||
@@ -76,7 +82,2 @@ try{ fs.mkdirSync(dir); } | ||
}; | ||
const cjsFolder = path.resolve(process.cwd(), dest); | ||
const cjsPackage = path.join(cjsFolder, 'package.json'); | ||
if (!fs.existsSync(cjsPackage)) | ||
fs.writeFileSync(cjsPackage, JSON.stringify({type: 'commonjs'})); | ||
fs.writeFileSync(dest, ascjs(source)); | ||
(function walkThrough(source, dest) { | ||
@@ -114,3 +115,3 @@ fs.readdir(source, (err, files) => { | ||
path.resolve(process.cwd(), source), | ||
cjsFolder | ||
cjsDest | ||
)); | ||
@@ -129,2 +130,2 @@ } else { | ||
}); | ||
} | ||
} |
{ | ||
"name": "ascjs", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "ES2015 to CommonJS import/export transformer", | ||
@@ -5,0 +5,0 @@ "bin": "bin.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
304
14795