electrum-require-components
Advanced tools
Comparing version 1.7.3 to 1.8.0
@@ -37,5 +37,5 @@ 'use strict'; | ||
if (more.length === 0) { | ||
return `Electrum.wrap ('${ name }', _${ name })`; | ||
return `Electrum.wrap ('${name}', _${name})`; | ||
} else { | ||
return `Electrum.wrap ('${ name }', _${ name }, {${ more.map(x => `${ x }: _${ name }$${ x }`).join(', ') }})`; | ||
return `Electrum.wrap ('${name}', _${name}, {${more.map(x => `${x}: _${name}$${x}`).join(', ')}})`; | ||
} | ||
@@ -42,0 +42,0 @@ } |
@@ -23,3 +23,3 @@ 'use strict'; | ||
for (let file of files) { | ||
const regex = new RegExp(`${ name }\\.([a-zA-Z]+)\\.js`); | ||
const regex = new RegExp(`${name}\\.([a-zA-Z]+)\\.js`); | ||
const match = file.match(regex); | ||
@@ -26,0 +26,0 @@ if (match) { |
@@ -25,3 +25,3 @@ 'use strict'; | ||
function getImport(name, filePath) { | ||
return `import _${ upper(name) } from './${ filePath }';`; | ||
return `import _${upper(name)} from './${filePath}';`; | ||
} | ||
@@ -33,3 +33,3 @@ | ||
for (let suffix of suffixes) { | ||
list.push(getImport(`${ upper(name) }$${ suffix }`, `${ dirPath }/${ name }.${ suffix }.js`)); | ||
list.push(getImport(`${upper(name)}$${suffix}`, `${dirPath}/${name}.${suffix}.js`)); | ||
} | ||
@@ -43,5 +43,5 @@ return list; | ||
const more = suffixes; | ||
return `export const ${ Name } = ${ inject(Name, filePath, more) };`; | ||
return `export const ${Name} = ${inject(Name, filePath, more)};`; | ||
} else { | ||
return `export const ${ Name } = _${ Name };`; | ||
return `export const ${Name} = _${Name};`; | ||
} | ||
@@ -48,0 +48,0 @@ } |
{ | ||
"name": "electrum-require-components", | ||
"version": "1.7.3", | ||
"version": "1.8.0", | ||
"description": "This Electrum build tool generates a source file with a list of requires.", | ||
"main": "lib/index.js", | ||
"bin": { | ||
"electrum-require-components": "./bin/bin.js" | ||
"electrum-require-components": "./bin/electrum-require-components" | ||
}, | ||
@@ -9,0 +9,0 @@ "scripts": { |
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
32947
659