Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
fix default library type
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljoppi committed Jan 14, 2016
1 parent 6687a26 commit 95a2d82
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,13 @@ module.exports = (scriptPath, format) => {
let script = fs.readFileSync(filePath, 'utf8'),
name = path.basename(filePath, '.js'),
prefix = name.substr(0, 2).toLowerCase(),
type = $TYPES[prefix] || 'library',
type = $TYPES[prefix],
id = (type ? name.substr(3) : name).replace(/[ ;:+=\|\\]/g, '_');

if (!type) {
type = 'library';
}

let nsId = ($RE_ID.test(script) ? $RE_ID.exec(script)[2] : id).replace('customscript', ''),
nsObj = {
id: nsId,
Expand Down

0 comments on commit 95a2d82

Please sign in to comment.