Skip to content

Commit

Permalink
wip rollup configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
rosskevin committed Dec 30, 2015
1 parent fcb183e commit ff95eb2
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 3 deletions.
3 changes: 2 additions & 1 deletion grunt/configBridge.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"radio.js",
"radioInline.js",
"file.js",
"bootstrapMaterialDesign.js"
"bootstrapMaterialDesign.js",
"index.js"
]
},
"docs": {
Expand Down
9 changes: 8 additions & 1 deletion js/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
// main entry point
/*
* This is the main entry point for your package.
*
* You can import other modules here, including external packages. When
* bundling using rollup you can mark those modules as external and have them
* excluded or, if they have a jsnext:main entry in their package.json (like
* this package does), let rollup bundle them into your dist file.
*/

/* eslint-disable no-unused-vars */
import BaseInput from './baseInput'
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
},
"style": "dist/css/bootstrap-material-design.css",
"sass": "scss/bootstrap-material-design.scss",
"main": "./dist/js/npm",
"main": "dist/js/common.js",
"jsnext:main": "dist/rollup.es6.js",
"repository": {
"type": "git",
"url": "https://github.com/FezVrasta/bootstrap-material-design.git"
Expand Down Expand Up @@ -70,6 +71,8 @@
"markdown-it": "^5.0.0",
"mq4-hover-shim": "^0.3.0",
"npm-shrinkwrap": "^200.1.0",
"rollup": "^0.22",
"rollup-plugin-babel": "^2.3",
"time-grunt": "^1.2.1"
},
"engines": {
Expand Down
6 changes: 6 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import babel from 'rollup-plugin-babel';

export default {
entry: 'js/src/index.js',
plugins: [babel()]
};
6 changes: 6 additions & 0 deletions rollup.es6.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import config from './rollup.config';

config.format = 'es6';
config.dest = 'dist/rollup.es6.config.js';

export default config;
8 changes: 8 additions & 0 deletions rollup.umd.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

import config from './rollup.config';

config.format = 'umd';
config.dest = 'dist/rollup.umd.config.js';
config.moduleName = 'bootstrapMaterialDesign';

export default config;

0 comments on commit ff95eb2

Please sign in to comment.