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