Skip to content

Commit

Permalink
Allow configuring minification, update readme and bump version.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjrv committed Sep 8, 2017
1 parent dc00bd8 commit 39be979
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,23 @@ Run `npm run cbuild -- --help` to see the command line options:
-h, --help output usage information
```

The `--builder-config` option accepts a JSON file containing
[SystemJS builder bundle options](https://github.com/systemjs/builder/blob/master/docs/api.md#bundle-options) and
[SystemJS configuration options](https://github.com/systemjs/systemjs/blob/master/docs/config-api.md#configuration-api)
structured like:

```JavaScript
{
// Bundle options, for example:
"minify": true,

"config": {
// Configuration options, for example:
"buildCSS": false
}
}
```

API
===
Docs generated using [`docts`](https://github.com/charto/docts)
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cbuild",
"version": "0.1.4",
"version": "0.1.5",
"description": "Use SystemJS with npm instead of jspm",
"main": "dist/cbuild.js",
"typings": "dist/cbuild.d.ts",
Expand All @@ -27,14 +27,14 @@
"dependencies": {
"@types/bluebird": "^3.5.8",
"@types/commander": "^2.9.2",
"@types/node": "^8.0.25",
"@types/node": "^8.0.26",
"bluebird": "^3.5.0",
"browser-resolve": "~1.11.2",
"commander": "~2.11.0",
"systemjs-builder": "~0.16.10"
},
"devDependencies": {
"tslint": "^5.7.0",
"typescript": "^2.4.2"
"typescript": "^2.5.2"
}
}
2 changes: 1 addition & 1 deletion src/cbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ export function build(basePath: string, options: BuildOptions = {}) {
const buildArguments: any[] = [ sourceUrl ];

if(bundlePath) buildArguments.push(bundlePath);
buildArguments.push({ config: builderPath ? require(builderPath) : null });
if(builderPath) buildArguments.push(require(builderPath));

// Call systemjs-builder.
built = makeBundle.apply(builder, buildArguments);
Expand Down

0 comments on commit 39be979

Please sign in to comment.