mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-02-09 08:10:39 +03:00
- moved babel generated files to dist
- concat the babel generated files instead of the source es6 (not sure if this is the exactly right thing to do yet for general consumption, but seems correct) - allow local runs of docs to see the mdb js babel files so we can better debug sources
This commit is contained in:
parent
ea3a520b11
commit
f272a49ee0
54
Gruntfile.js
54
Gruntfile.js
|
@ -100,18 +100,15 @@ module.exports = function (grunt) {
|
|||
modules: 'ignore'
|
||||
},
|
||||
files: {
|
||||
'js/dist/util.js': 'js/src/util.js',
|
||||
'js/dist/ripples.js': 'js/src/ripples.js',
|
||||
'js/dist/autofill.js': 'js/src/autofill.js',
|
||||
'js/dist/input.js': 'js/src/input.js',
|
||||
'js/dist/checkbox.js': 'js/src/checkbox.js',
|
||||
'js/dist/togglebutton.js': 'js/src/togglebutton.js',
|
||||
'js/dist/radio.js': 'js/src/radio.js',
|
||||
'js/dist/fileinput.js': 'js/src/fileInput.js',
|
||||
'js/dist/bootstrapMaterialDesign.js': 'js/src/bootstrapMaterialDesign.js',
|
||||
//'js/dist/tab.js' : 'js/src/tab.js',
|
||||
//'js/dist/tooltip.js' : 'js/src/tooltip.js',
|
||||
//'js/dist/popover.js' : 'js/src/popover.js'
|
||||
'dist/js/babel/util.js': 'js/src/util.js',
|
||||
'dist/js/babel/ripples.js': 'js/src/ripples.js',
|
||||
'dist/js/babel/autofill.js': 'js/src/autofill.js',
|
||||
'dist/js/babel/input.js': 'js/src/input.js',
|
||||
'dist/js/babel/checkbox.js': 'js/src/checkbox.js',
|
||||
'dist/js/babel/togglebutton.js': 'js/src/togglebutton.js',
|
||||
'dist/js/babel/radio.js': 'js/src/radio.js',
|
||||
'dist/js/babel/fileInput.js': 'js/src/fileInput.js',
|
||||
'dist/js/babel/bootstrapMaterialDesign.js': 'js/src/bootstrapMaterialDesign.js',
|
||||
}
|
||||
},
|
||||
docs: {
|
||||
|
@ -144,11 +141,8 @@ module.exports = function (grunt) {
|
|||
'dist/js/umd/checkbox.js': 'js/src/checkbox.js',
|
||||
'dist/js/umd/togglebutton.js': 'js/src/togglebutton.js',
|
||||
'dist/js/umd/radio.js': 'js/src/radio.js',
|
||||
'dist/js/umd/fileinput.js': 'js/src/fileInput.js',
|
||||
'dist/js/umd/fileInput.js': 'js/src/fileInput.js',
|
||||
'dist/js/umd/bootstrapMaterialDesign.js': 'js/src/bootstrapMaterialDesign.js',
|
||||
//'dist/js/umd/tab.js' : 'js/src/tab.js',
|
||||
//'dist/js/umd/tooltip.js' : 'js/src/tooltip.js',
|
||||
//'dist/js/umd/popover.js' : 'js/src/popover.js'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -195,22 +189,20 @@ module.exports = function (grunt) {
|
|||
|
||||
concat: {
|
||||
options: {
|
||||
stripBanners: false
|
||||
stripBanners: false,
|
||||
sourceMap: true
|
||||
},
|
||||
bootstrap: {
|
||||
src: [
|
||||
'js/src/util.js',
|
||||
'js/src/ripples.js',
|
||||
'js/src/autofill.js',
|
||||
'js/src/input.js',
|
||||
'js/src/checkbox.js',
|
||||
'js/src/togglebutton.js',
|
||||
'js/src/radio.js',
|
||||
'js/src/fileInput.js',
|
||||
'js/src/bootstrapMaterialDesign.js',
|
||||
//'js/src/tab.js',
|
||||
//'js/src/tooltip.js',
|
||||
//'js/src/popover.js'
|
||||
'dist/js/babel/util.js',
|
||||
'dist/js/babel/ripples.js',
|
||||
'dist/js/babel/autofill.js',
|
||||
'dist/js/babel/input.js',
|
||||
'dist/js/babel/checkbox.js',
|
||||
'dist/js/babel/togglebutton.js',
|
||||
'dist/js/babel/radio.js',
|
||||
'dist/js/babel/fileInput.js',
|
||||
'dist/js/babel/bootstrapMaterialDesign.js',
|
||||
],
|
||||
dest: 'dist/js/<%= pkg.name %>.js'
|
||||
}
|
||||
|
@ -581,9 +573,9 @@ module.exports = function (grunt) {
|
|||
grunt.registerTask('docs-css', ['sass:docs', 'postcss:docs', 'postcss:examples', 'csscomb:docs', 'csscomb:examples', 'cssmin:docs']);
|
||||
grunt.registerTask('docs-js', ['babel:docs', 'uglify:docsJs']);
|
||||
grunt.registerTask('lint-docs-js', ['jscs:assets']);
|
||||
grunt.registerTask('docs-copy-bootstrap', ['copy:bs-docs-scss', 'copy:bs-docs-components', 'copy:bs-docs-content']);
|
||||
grunt.registerTask('docs-copy-bootstrap-docs', ['copy:bs-docs-scss', 'copy:bs-docs-components', 'copy:bs-docs-content']);
|
||||
|
||||
grunt.registerTask('docs', ['docs-copy-bootstrap', 'docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs']);
|
||||
grunt.registerTask('docs', ['clean:docs', 'docs-copy-bootstrap-docs', 'docs-css', 'docs-js', 'lint-docs-js', 'copy:docs']);
|
||||
|
||||
grunt.registerTask('prep-release', ['dist', 'docs', 'jekyll:github', 'htmlmin', 'compress']);
|
||||
|
||||
|
|
|
@ -25,13 +25,13 @@
|
|||
|
||||
{% if site.github %}
|
||||
<script src="{{ site.baseurl }}/dist/js/{{ site.data.name }}.min.js"></script>
|
||||
{% else %}
|
||||
<script src="{{ site.baseurl }}/dist/js/{{ site.data.name }}.js"></script>
|
||||
{% endif %}
|
||||
|
||||
{% if site.github %}
|
||||
<script src="{{ site.baseurl }}/assets/js/docs.min.js"></script>
|
||||
{% else %}
|
||||
<!--<script src="{{ site.baseurl }}/dist/js/{{ site.data.name }}.js"></script>-->
|
||||
{% for file in site.data.configBridge.paths.coreJs %}
|
||||
<script src="{{ site.baseurl }}/{{ file }}"></script>
|
||||
{% endfor %}
|
||||
|
||||
{% for file in site.data.configBridge.paths.docsJs %}
|
||||
<script src="{{ site.baseurl }}/{{ file }}"></script>
|
||||
{% endfor %}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
DO NOT edit files in this folder EXCEPT docs.scss.
|
||||
|
||||
These files are copied using
|
||||
grunt docs-copy-bootstrap
|
||||
grunt docs-copy-bootstrap-docs
|
||||
|
||||
This is done to keep samples in sync with the upstream bs4.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This is the only customized file in this immediate directory, the rest are copied with:
|
||||
// grunt docs-copy-bootstrap
|
||||
// grunt docs-copy-bootstrap-docs
|
||||
// (perhaps add customizations in subdirectories)
|
||||
|
||||
/*!
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
DO NOT edit files in this folder.
|
||||
|
||||
These files are copied using
|
||||
grunt docs-copy-bootstrap
|
||||
grunt docs-copy-bootstrap-docs
|
||||
|
||||
This is done to keep samples in sync with the upstream bs4.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
DO NOT edit files in this folder.
|
||||
|
||||
These files are copied using
|
||||
grunt docs-copy-bootstrap
|
||||
grunt docs-copy-bootstrap-docs
|
||||
|
||||
This is done to keep samples in sync with the upstream bs4.
|
||||
|
|
|
@ -6,6 +6,18 @@
|
|||
"../assets/js/vendor/holder.min.js",
|
||||
"../assets/js/dist/style.js",
|
||||
"../assets/js/dist/application.js"
|
||||
],
|
||||
|
||||
"coreJs": [
|
||||
"../dist/js/babel/autofill.js",
|
||||
"../dist/js/babel/bootstrapMaterialDesign.js",
|
||||
"../dist/js/babel/checkbox.js",
|
||||
"../dist/js/babel/fileInput.js",
|
||||
"../dist/js/babel/input.js",
|
||||
"../dist/js/babel/radio.js",
|
||||
"../dist/js/babel/ripples.js",
|
||||
"../dist/js/babel/togglebutton.js",
|
||||
"../dist/js/babel/util.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user