Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bundle): to UMD format #1098

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ webpack.config.js
*.js.map
!/bundles/*.js.map
!*.d.ts
!*.metadata.json
make.js
/components/**/*.ts
!/components/**/*.d.ts

Expand Down
37 changes: 37 additions & 0 deletions make.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
var pkg = require('./package.json');
var path = require('path');
var Builder = require('systemjs-builder');
var name = pkg.name;

var builder = new Builder();
var config = {
baseURL: '.',
transpiler: 'typescript',
typescriptOptions: {
module: 'cjs'
},
map: {
'typescript': './node_modules/typescript/lib/typescript.js',
'@angular': './node_modules/@angular',
'rxjs': './node_modules/rxjs',
'moment': './node_modules/moment/moment.js'
},
paths: {
'*': '*.js'
},
meta: {
'./node_modules/@angular/*': { build: false },
'./node_modules/rxjs/*': { build: false }
}
};

builder.config(config);

builder
.buildStatic(name, path.resolve(__dirname, 'bundles/', name + '.js'), {format: 'umd'})
.then(function() {
console.log('Build complete.');
})
.catch(function(err) {
console.log('Error', err);
});
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng2-bootstrap",
"version": "1.1.11",
"version": "1.1.13-1",
"description": "angular2 bootstrap components",
"scripts": {
"typedoc": "typedoc",
Expand Down Expand Up @@ -104,4 +104,4 @@
"wallaby-webpack": "0.0.24",
"zone.js": "0.6.25"
}
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
"./ng2-bootstrap.ts"
],
"atom": { "rewriteTsconfig": false }
}
}