Skip to content

Commit

Permalink
:trollface: Version: 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
VandeurenGlenn committed Feb 25, 2017
1 parent d644e24 commit 5e53edf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
30 changes: 15 additions & 15 deletions bin/backed.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ class Builder {
if (config.format && typeof config.format === 'object') {
const formats = config.format;
for (let format of formats) {
this.bundle(config, format);
let dest = config.dest;
if (format !== 'iffe') {
switch (format) {
case 'cjs':
dest = dest.replace('.js', '-node.js');
break;
case 'es':
case 'amd':
dest = dest.replace('.js', `-${format}.js`);
break;
}
}
this.bundle(config, dest, format);
}
} else {
this.bundle(config, config.format);
this.bundle(config, config.dest, config.format);
}
}

bundle(config, format) {
let dest = config.dest;
if (format !== 'iffe') {
switch (format) {
case 'cjs':
dest = dest.replace('.js', '-node.js');
break;
case 'es':
case 'amd':
dest = dest.replace('.js', `-${format}.js`);
break;
}
}
bundle(config, dest, format) {
rollup({
entry: `${process.cwd()}/${config.src}`,
// Use the previous bundle as starting point.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backed-cli",
"version": "0.0.1",
"version": "0.1.0",
"description": "The official command line interface for Backed",
"homepage": "https://github.com/vandeurenglenn/backed-cli",
"author": {
Expand Down

0 comments on commit 5e53edf

Please sign in to comment.