mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-10 19:57:13 +03:00
rollup is generating files, still failing on uglify
This commit is contained in:
parent
ff95eb2495
commit
9139136e07
140
Gruntfile.js
140
Gruntfile.js
|
@ -123,30 +123,30 @@ module.exports = function (grunt) {
|
|||
docs: 'docs/dist'
|
||||
},
|
||||
|
||||
babel: {
|
||||
options: {
|
||||
sourceMap: true,
|
||||
presets: ['es2015'] // the following is the es2015 preset minus the commonjs requirement
|
||||
},
|
||||
core: {
|
||||
files: coreFileMap('dist/js/demoduled/', 'js/src/')
|
||||
},
|
||||
docs: {
|
||||
files: docsFileMap()
|
||||
},
|
||||
systemjs: {
|
||||
options: {
|
||||
plugins: ['transform-es2015-modules-systemjs']
|
||||
},
|
||||
files: coreFileMap('dist/js/systemjs/', 'js/src/')
|
||||
},
|
||||
umd: {
|
||||
options: {
|
||||
plugins: ['transform-es2015-modules-umd']
|
||||
},
|
||||
files: coreFileMap('dist/js/umd/', 'js/src/')
|
||||
}
|
||||
},
|
||||
//babel: {
|
||||
// options: {
|
||||
// sourceMap: true,
|
||||
// presets: ['es2015'] // the following is the es2015 preset minus the commonjs requirement
|
||||
// },
|
||||
// core: {
|
||||
// files: coreFileMap('dist/js/demoduled/', 'js/src/')
|
||||
// },
|
||||
// docs: {
|
||||
// files: docsFileMap()
|
||||
// },
|
||||
// systemjs: {
|
||||
// options: {
|
||||
// plugins: ['transform-es2015-modules-systemjs']
|
||||
// },
|
||||
// files: coreFileMap('dist/js/systemjs/', 'js/src/')
|
||||
// },
|
||||
// umd: {
|
||||
// options: {
|
||||
// plugins: ['transform-es2015-modules-umd']
|
||||
// },
|
||||
// files: coreFileMap('dist/js/umd/', 'js/src/')
|
||||
// }
|
||||
//},
|
||||
|
||||
eslint: {
|
||||
options: {
|
||||
|
@ -187,20 +187,20 @@ module.exports = function (grunt) {
|
|||
}
|
||||
},
|
||||
|
||||
concat: {
|
||||
options: {
|
||||
stripBanners: false,
|
||||
sourceMap: true
|
||||
},
|
||||
systemjs: {
|
||||
src: coreFileArray('dist/js/systemjs/'),
|
||||
dest: 'dist/js/system-all.js'
|
||||
},
|
||||
commonjs: {
|
||||
src: coreFileArray('dist/js/umd/'),
|
||||
dest: 'dist/js/common-all.js'
|
||||
}
|
||||
},
|
||||
//concat: {
|
||||
// options: {
|
||||
// stripBanners: false,
|
||||
// sourceMap: true
|
||||
// },
|
||||
// systemjs: {
|
||||
// src: coreFileArray('dist/js/systemjs/'),
|
||||
// dest: 'dist/js/system-all.js'
|
||||
// },
|
||||
// commonjs: {
|
||||
// src: coreFileArray('dist/js/umd/'),
|
||||
// dest: 'dist/js/common-all.js'
|
||||
// }
|
||||
//},
|
||||
uglify: {
|
||||
options: {
|
||||
compress: {
|
||||
|
@ -209,14 +209,30 @@ module.exports = function (grunt) {
|
|||
mangle: false,
|
||||
preserveComments: /^!|@preserve|@license|@cc_on/i
|
||||
},
|
||||
'systemjs-all': {
|
||||
src: 'dist/js/system-all.js',
|
||||
dest: 'dist/js/system-all.min.js'
|
||||
},
|
||||
'commonjs-all': {
|
||||
src: 'dist/js/common-all.js',
|
||||
dest: 'dist/js/common-all.min.js'
|
||||
},
|
||||
|
||||
dist: {
|
||||
files: {
|
||||
'dist/js/bootstrap-material-design.es6.min.js': 'dist/js/bootstrap-material-design.es6.js',
|
||||
'dist/js/bootstrap-material-design.umd.min.js': 'dist/js/bootstrap-material-design.umd.js'
|
||||
}
|
||||
}
|
||||
//'systemjs-all': {
|
||||
// src: 'dist/js/system-all.js',
|
||||
// dest: 'dist/js/system-all.min.js'
|
||||
//},
|
||||
//'commonjs-all': {
|
||||
// src: 'dist/js/common-all.js',
|
||||
// dest: 'dist/js/common-all.min.js'
|
||||
//},
|
||||
|
||||
//'systemjs-all': {
|
||||
// src: 'dist/js/system-all.js',
|
||||
// dest: 'dist/js/system-all.min.js'
|
||||
//},
|
||||
//'commonjs-all': {
|
||||
// src: 'dist/js/common-all.js',
|
||||
// dest: 'dist/js/common-all.min.js'
|
||||
//},
|
||||
// docs: {
|
||||
// options: {
|
||||
// compress: false
|
||||
|
@ -495,14 +511,13 @@ module.exports = function (grunt) {
|
|||
exec: {
|
||||
npmUpdate: {
|
||||
command: 'npm update'
|
||||
},
|
||||
'rollup-umd': {
|
||||
command: 'rollup -c rollup.umd.config.js'
|
||||
},
|
||||
'rollup-es6': {
|
||||
command: 'rollup -c rollup.es6.config.js'
|
||||
}
|
||||
//,
|
||||
//'jekyll-clean': {
|
||||
// command: 'jekyll clean'
|
||||
//},
|
||||
//'jekyll-build': {
|
||||
// command: 'jekyll build'
|
||||
//}
|
||||
},
|
||||
|
||||
buildcontrol: {
|
||||
|
@ -594,15 +609,18 @@ module.exports = function (grunt) {
|
|||
grunt.registerTask('dist-js', [
|
||||
'clean:dist-js',
|
||||
'eslint',
|
||||
'babel:umd',
|
||||
'babel:systemjs',
|
||||
'commonjs',
|
||||
'systemjs',
|
||||
'concat:commonjs',
|
||||
'concat:systemjs',
|
||||
'exec:rollup-umd',
|
||||
'exec:rollup-es6',
|
||||
//'babel:umd',
|
||||
//'babel:systemjs',
|
||||
//'commonjs',
|
||||
//'systemjs',
|
||||
//'concat:commonjs',
|
||||
//'concat:systemjs',
|
||||
'stamp',
|
||||
'uglify:commonjs-all',
|
||||
'uglify:systemjs-all',
|
||||
//'uglify:commonjs-all',
|
||||
//'uglify:systemjs-all',
|
||||
'uglify:dist',
|
||||
'copy:dist-to-docs'
|
||||
]);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import BaseSelection from './baseSelection'
|
|||
import Text from './text'
|
||||
import File from './file'
|
||||
import Radio from './radio'
|
||||
import Textarea from './textare'
|
||||
import Textarea from './textarea'
|
||||
import Select from './select'
|
||||
import Util from './util'
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import Checkbox from './checkbox'
|
|||
import Radio from './radio'
|
||||
import Switch from './switch'
|
||||
import Text from './text'
|
||||
import Textarea from './textare'
|
||||
import Textarea from './textarea'
|
||||
import Select from './select'
|
||||
import Util from './util'
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import File from './file'
|
|||
import Radio from './radio'
|
||||
import Switch from './switch'
|
||||
import Text from './text'
|
||||
import Textarea from './textare'
|
||||
import Textarea from './textarea'
|
||||
import Util from './util'
|
||||
|
||||
const Select = (($) => {
|
||||
|
|
|
@ -3,7 +3,7 @@ import Checkbox from './checkbox'
|
|||
import File from './file'
|
||||
import Radio from './radio'
|
||||
import Switch from './switch'
|
||||
import Textarea from './textare'
|
||||
import Textarea from './textarea'
|
||||
import Select from './select'
|
||||
import Util from './util'
|
||||
|
||||
|
|
12
package.json
12
package.json
|
@ -22,8 +22,8 @@
|
|||
},
|
||||
"style": "dist/css/bootstrap-material-design.css",
|
||||
"sass": "scss/bootstrap-material-design.scss",
|
||||
"main": "dist/js/common.js",
|
||||
"jsnext:main": "dist/rollup.es6.js",
|
||||
"main": "dist/js/bootstrap-material-design.umd.js",
|
||||
"jsnext:main": "dist/bootstrap-material-design.es6.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/FezVrasta/bootstrap-material-design.git"
|
||||
|
@ -35,18 +35,14 @@
|
|||
"devDependencies": {
|
||||
"autoprefixer": "^6.0.3",
|
||||
"babel-eslint": "^4.1.6",
|
||||
"babel-plugin-transform-es2015-modules-systemjs": "^6.0",
|
||||
"babel-plugin-transform-es2015-modules-umd": "^6.0",
|
||||
"babel-polyfill": "^6.0",
|
||||
"babel-preset-es2015": "^6.0",
|
||||
"babel-preset-es2015-rollup": "^1.0.0",
|
||||
"btoa": "~1.1.2",
|
||||
"glob": "~6.0.1",
|
||||
"grunt": "~0.4.5",
|
||||
"grunt-babel": "^6.0",
|
||||
"grunt-build-control": "~0.6.0",
|
||||
"grunt-contrib-clean": "~0.7.0",
|
||||
"grunt-contrib-compress": "~0.14.0",
|
||||
"grunt-contrib-concat": "~0.5.1",
|
||||
"grunt-contrib-connect": "~0.11.2",
|
||||
"grunt-contrib-copy": "~0.8.1",
|
||||
"grunt-contrib-cssmin": "~0.14.0",
|
||||
|
@ -64,7 +60,6 @@
|
|||
"grunt-sass": "^1.0.0",
|
||||
"grunt-saucelabs": "~8.6.1",
|
||||
"grunt-scss-lint": "^0.3.8",
|
||||
"grunt-sed": "~0.1.1",
|
||||
"grunt-stamp": "^0.1.0",
|
||||
"is-travis": "^1.0.0",
|
||||
"load-grunt-tasks": "~3.3.0",
|
||||
|
@ -73,6 +68,7 @@
|
|||
"npm-shrinkwrap": "^200.1.0",
|
||||
"rollup": "^0.22",
|
||||
"rollup-plugin-babel": "^2.3",
|
||||
"rollup-plugin-multi-entry": "^1.0",
|
||||
"time-grunt": "^1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import babel from 'rollup-plugin-babel';
|
||||
|
||||
//var external = Object.keys( require( './package.json' ).dependencies );
|
||||
|
||||
export default {
|
||||
entry: 'js/src/index.js',
|
||||
plugins: [babel()]
|
||||
//external: external
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import config from './rollup.config';
|
||||
|
||||
config.format = 'es6';
|
||||
config.dest = 'dist/rollup.es6.config.js';
|
||||
config.dest = 'dist/js/bootstrap-material-design.es6.js';
|
||||
|
||||
export default config;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import config from './rollup.config';
|
||||
|
||||
config.format = 'umd';
|
||||
config.dest = 'dist/rollup.umd.config.js';
|
||||
config.moduleName = 'bootstrapMaterialDesign';
|
||||
config.dest = 'dist/js/bootstrap-material-design.umd.js';
|
||||
|
||||
export default config;
|
||||
|
|
Loading…
Reference in New Issue
Block a user