gen-idea-libs
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -16,7 +16,3 @@ 'use strict'; | ||
module.exports = function generate( | ||
packages, | ||
projectDir, | ||
imlPath | ||
) { | ||
module.exports = function generate(packages, projectDir, imlPath) { | ||
const libTemplate = fs.readFileSync( | ||
@@ -39,3 +35,3 @@ path.join(__dirname, './libTemplate.xml'), | ||
iml = fs.readFileSync(_imlPath, 'utf8'); | ||
} catch(e) { | ||
} catch (e) { | ||
_imlPath = path.join( | ||
@@ -49,4 +45,4 @@ projectDir, | ||
Object.keys(packages).forEach(name => { | ||
const pkg = packages[name] | ||
const classes = path.relative(projectDir, path.join(pkg, '..')) | ||
const pkg = packages[name]; | ||
const classes = path.relative(projectDir, path.join(pkg, '..')); | ||
fs.writeFile( | ||
@@ -59,6 +55,6 @@ path.join(projectDir, `.idea/libraries/${name.replace(/-/g, '_')}.xml`), | ||
if (!iml.includes(dep)) { | ||
iml = iml.replace(/(\n\s+)<\/component>/, `$1 ${dep}$&`) | ||
iml = iml.replace(/(\n\s+)<\/component>/, `$1 ${dep}$&`); | ||
} | ||
}) | ||
}); | ||
fs.writeFile(_imlPath, iml); | ||
}; |
{ | ||
"name": "gen-idea-libs", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Generate IntelliJ Idea libs config from given npm kotlinJs dependencies", | ||
@@ -5,0 +5,0 @@ "main": "generate", |
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
2185
52