mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-25 19:14:09 +03:00
working on gulp 4 integration
This commit is contained in:
parent
8f4ec7c96c
commit
560af73402
|
@ -4,7 +4,8 @@
|
||||||
"extends": "eslint:recommended",
|
"extends": "eslint:recommended",
|
||||||
"env": {
|
"env": {
|
||||||
"browser": true,
|
"browser": true,
|
||||||
"jquery": true
|
"jquery": true,
|
||||||
|
"es6": true
|
||||||
}
|
}
|
||||||
//,
|
//,
|
||||||
// "rules": {
|
// "rules": {
|
||||||
|
|
12
LICENSE.md
12
LICENSE.md
|
@ -1,6 +1,6 @@
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2015-2016, Federico Zivolo
|
Copyright (c) 2015-2016, Federico Zivolo and contributors - https://github.com/FezVrasta/bootstrap-material-design
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -23,10 +23,8 @@ SOFTWARE.
|
||||||
|
|
||||||
## Acknowledgements:
|
## Acknowledgements:
|
||||||
|
|
||||||
### Bootstrap
|
- Some original Bootstrap code and documentation http://getbootstrap.com
|
||||||
Some original Bootstrap tooling code and documentation http://getbootstrap.com
|
`Copyright (c) 2011-2015 Twitter, Inc`
|
||||||
Copyright (c) 2011-2016 Twitter, Inc
|
|
||||||
|
|
||||||
### MDL
|
- Some original MDL code http://www.getmdl.io/
|
||||||
Some original MDL code http://www.getmdl.io/
|
`Copyright 2015 Google Inc. All Rights Reserved.`
|
||||||
Copyright 2015 Google Inc. All Rights Reserved.
|
|
||||||
|
|
37
gulp-docs.js
37
gulp-docs.js
|
@ -1,4 +1,4 @@
|
||||||
import {Preset, Clean, Copy, Jekyll, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index'
|
import {Preset, Clean, Copy, Jekyll, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, parallel, series} from 'gulp-pipeline/src/index'
|
||||||
|
|
||||||
const referenceDocNotice =
|
const referenceDocNotice =
|
||||||
`$1\n
|
`$1\n
|
||||||
|
@ -34,7 +34,7 @@ const prefix = {task: {prefix: 'docs:'}}
|
||||||
|
|
||||||
export default function (gulp, options) {
|
export default function (gulp, options) {
|
||||||
|
|
||||||
let javascripts = [
|
let javascripts = parallel(gulp,
|
||||||
new RollupIife(gulp, preset, prefix, options.rollupConfig, {
|
new RollupIife(gulp, preset, prefix, options.rollupConfig, {
|
||||||
options: {
|
options: {
|
||||||
dest: 'docs.iife.js',
|
dest: 'docs.iife.js',
|
||||||
|
@ -46,31 +46,34 @@ export default function (gulp, options) {
|
||||||
source: {options: {cwd: 'docs/assets/js/vendor'}},
|
source: {options: {cwd: 'docs/assets/js/vendor'}},
|
||||||
options: {dest: 'docs-vendor.min.js'}
|
options: {dest: 'docs-vendor.min.js'}
|
||||||
})
|
})
|
||||||
]
|
)
|
||||||
|
|
||||||
let eslint = new EsLint(gulp, preset, prefix)
|
let eslint = new EsLint(gulp, preset, prefix)
|
||||||
let scsslint = new ScssLint(gulp, preset, prefix, {
|
let scsslint = new ScssLint(gulp, preset, prefix, {
|
||||||
source: {glob: ['**/*.scss', '!docs.scss']},
|
source: {glob: ['**/*.scss', '!docs.scss']},
|
||||||
watch: {glob: ['**/*.scss', '!docs.scss']}
|
watch: {glob: ['**/*.scss', '!docs.scss']}
|
||||||
})
|
})
|
||||||
let linters = [scsslint, eslint]
|
let linters = parallel(gulp, scsslint, eslint)
|
||||||
let sass = new Sass(gulp, preset, prefix)
|
let sass = new Sass(gulp, preset, prefix)
|
||||||
|
|
||||||
new TaskSeries(gulp, 'default', [
|
let recipes = series(gulp,
|
||||||
new Clean(gulp, preset, prefix),
|
new Clean(gulp, preset, prefix),
|
||||||
linters,
|
linters,
|
||||||
sass,
|
sass,
|
||||||
javascripts,
|
javascripts,
|
||||||
new MinifyCss(gulp, preset, prefix)
|
new MinifyCss(gulp, preset, prefix)
|
||||||
], prefix)
|
)
|
||||||
new TaskSeries(gulp, 'lint', linters, prefix)
|
|
||||||
new TaskSeries(gulp, 'js', [eslint, javascripts], prefix)
|
new Aggregate(gulp, 'default', recipes, prefix)
|
||||||
new TaskSeries(gulp, 'css', [scsslint, sass], prefix)
|
new Aggregate(gulp, 'lint', linters, prefix)
|
||||||
|
new Aggregate(gulp, 'js', series(gulp, eslint, javascripts), prefix)
|
||||||
|
new Aggregate(gulp, 'css', series(gulp, scsslint, sass), prefix)
|
||||||
|
|
||||||
// docs copy
|
// docs copy
|
||||||
new TaskSeries(gulp, 'copy:bs-docs', [
|
new Aggregate(gulp, 'copy:bs-docs', parallel(gulp,
|
||||||
new Copy(gulp, preset, prefix, {
|
new Copy(gulp, preset, prefix, {
|
||||||
task: {name: 'copy:bs-docs-content'},
|
debug: true,
|
||||||
|
task: false, //{name: 'copy:bs-docs-content'},
|
||||||
source: {
|
source: {
|
||||||
options: {cwd: '../bootstrap/docs/content'},
|
options: {cwd: '../bootstrap/docs/content'},
|
||||||
glob: ['**/*']
|
glob: ['**/*']
|
||||||
|
@ -79,7 +82,7 @@ export default function (gulp, options) {
|
||||||
process: copyProcessor
|
process: copyProcessor
|
||||||
}),
|
}),
|
||||||
new Copy(gulp, preset, prefix, {
|
new Copy(gulp, preset, prefix, {
|
||||||
task: {name: 'copy:bs-docs-components'},
|
task: false, //{name: 'copy:bs-docs-components'},
|
||||||
source: {
|
source: {
|
||||||
options: {cwd: '../bootstrap/docs/components'},
|
options: {cwd: '../bootstrap/docs/components'},
|
||||||
glob: ['**/*']
|
glob: ['**/*']
|
||||||
|
@ -88,7 +91,7 @@ export default function (gulp, options) {
|
||||||
process: copyProcessor
|
process: copyProcessor
|
||||||
}),
|
}),
|
||||||
new Copy(gulp, preset, prefix, {
|
new Copy(gulp, preset, prefix, {
|
||||||
task: {name: 'copy:bs-docs-scss'},
|
task: false, //{name: 'copy:bs-docs-scss'},
|
||||||
source: {
|
source: {
|
||||||
options: {cwd: '../bootstrap/docs/assets/scss'},
|
options: {cwd: '../bootstrap/docs/assets/scss'},
|
||||||
glob: ['**/*', '!docs.scss'] // keep variable customizations
|
glob: ['**/*', '!docs.scss'] // keep variable customizations
|
||||||
|
@ -99,7 +102,7 @@ export default function (gulp, options) {
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
new Copy(gulp, preset, prefix, {
|
new Copy(gulp, preset, prefix, {
|
||||||
task: {name: 'copy:bs-docs-plugins'},
|
task: false, //{name: 'copy:bs-docs-plugins'},
|
||||||
source: {
|
source: {
|
||||||
options: {cwd: '../bootstrap/docs/_plugins'},
|
options: {cwd: '../bootstrap/docs/_plugins'},
|
||||||
glob: ['**/*', '!bridge.rb']
|
glob: ['**/*', '!bridge.rb']
|
||||||
|
@ -107,7 +110,7 @@ export default function (gulp, options) {
|
||||||
dest: 'docs/_plugins/'
|
dest: 'docs/_plugins/'
|
||||||
}),
|
}),
|
||||||
new Copy(gulp, preset, prefix, {
|
new Copy(gulp, preset, prefix, {
|
||||||
task: {name: 'copy:bs-docs-js-vendor'},
|
task: false, //{name: 'copy:bs-docs-js-vendor'},
|
||||||
source: {
|
source: {
|
||||||
options: {cwd: '../bootstrap/docs/assets/js/vendor'},
|
options: {cwd: '../bootstrap/docs/assets/js/vendor'},
|
||||||
glob: [
|
glob: [
|
||||||
|
@ -118,5 +121,7 @@ export default function (gulp, options) {
|
||||||
},
|
},
|
||||||
dest: 'docs/assets/js/vendor/'
|
dest: 'docs/assets/js/vendor/'
|
||||||
}, prefix)
|
}, prefix)
|
||||||
])
|
))
|
||||||
|
|
||||||
|
return recipes
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import {Preset, Clean, Copy, Jekyll, MinifyCss, Prepublish, PublishBuild, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index'
|
import {Preset, Clean, Copy, Jekyll, MinifyCss, Prepublish, PublishBuild, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, series, parallel} from 'gulp-pipeline/src/index'
|
||||||
import gulp from 'gulp'
|
import gulp from 'gulp'
|
||||||
import findup from 'findup-sync'
|
import findup from 'findup-sync'
|
||||||
import pkg from './package.json'
|
import pkg from './package.json'
|
||||||
|
@ -52,7 +52,7 @@ let rollupConfig = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let javascripts = [
|
let javascripts = parallel(gulp,
|
||||||
new RollupEs(gulp, preset, rollupConfig, {options: {dest: 'bootstrap-material-design.es.js'}}),
|
new RollupEs(gulp, preset, rollupConfig, {options: {dest: 'bootstrap-material-design.es.js'}}),
|
||||||
new RollupUmd(gulp, preset, rollupConfig, {
|
new RollupUmd(gulp, preset, rollupConfig, {
|
||||||
options: {
|
options: {
|
||||||
|
@ -65,34 +65,38 @@ let javascripts = [
|
||||||
dest: 'bootstrap-material-design.iife.js',
|
dest: 'bootstrap-material-design.iife.js',
|
||||||
moduleName: 'bootstrapMaterialDesign'
|
moduleName: 'bootstrapMaterialDesign'
|
||||||
}
|
}
|
||||||
}),
|
})
|
||||||
]
|
)
|
||||||
|
|
||||||
let eslint = new EsLint(gulp, preset)
|
let eslint = new EsLint(gulp, preset)
|
||||||
let scsslint = new ScssLint(gulp, preset)
|
let scsslint = new ScssLint(gulp, preset)
|
||||||
let sass = new Sass(gulp, preset)
|
let sass = new Sass(gulp, preset)
|
||||||
let linters = [scsslint, eslint]
|
let linters = parallel(gulp, scsslint, eslint)
|
||||||
|
|
||||||
new TaskSeries(gulp, 'default', [
|
let recipes = series(gulp,
|
||||||
new Clean(gulp, preset),
|
new Clean(gulp, preset),
|
||||||
linters,
|
linters,
|
||||||
|
parallel(gulp,
|
||||||
sass,
|
sass,
|
||||||
javascripts,
|
javascripts
|
||||||
|
),
|
||||||
new MinifyCss(gulp, preset)
|
new MinifyCss(gulp, preset)
|
||||||
])
|
)
|
||||||
new TaskSeries(gulp, 'lint', linters)
|
|
||||||
new TaskSeries(gulp, 'js', [eslint, javascripts])
|
new Aggregate(gulp, 'default', recipes, {debug: true})
|
||||||
new TaskSeries(gulp, 'css', [scsslint, sass])
|
new Aggregate(gulp, 'lint', linters)
|
||||||
|
new Aggregate(gulp, 'js', series(gulp, eslint, javascripts))
|
||||||
|
new Aggregate(gulp, 'css', series(gulp, scsslint, sass))
|
||||||
|
|
||||||
|
|
||||||
gulpDocs(gulp, {rollupConfig: rollupConfig})
|
let docsDefaultRecipes = gulpDocs(gulp, {rollupConfig: rollupConfig})
|
||||||
|
|
||||||
|
let prepRelease = new Aggregate(gulp, 'prep-release', [
|
||||||
//
|
//new Prepublish(gulp, preset), // asserts committed
|
||||||
let prepRelease = new TaskSeries(gulp, 'prep-release', [
|
[
|
||||||
new Prepublish(gulp, preset),
|
recipes,
|
||||||
'default',
|
docsDefaultRecipes
|
||||||
'docs:default',
|
],
|
||||||
new Copy(gulp, preset, {
|
new Copy(gulp, preset, {
|
||||||
task: {name: 'copy:dist-to-docs'},
|
task: {name: 'copy:dist-to-docs'},
|
||||||
source: {
|
source: {
|
||||||
|
@ -105,7 +109,7 @@ let prepRelease = new TaskSeries(gulp, 'prep-release', [
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
new TaskSeries(gulp, 'publish', [
|
new Aggregate(gulp, 'publish', [
|
||||||
prepRelease,
|
prepRelease,
|
||||||
new PublishBuild(gulp, preset, {
|
new PublishBuild(gulp, preset, {
|
||||||
npm: {
|
npm: {
|
||||||
|
|
|
@ -42,8 +42,8 @@
|
||||||
"babel-polyfill": "^6.6",
|
"babel-polyfill": "^6.6",
|
||||||
"babel-preset-es2015": "^6.6.0",
|
"babel-preset-es2015": "^6.6.0",
|
||||||
"extend": "^3.0.0",
|
"extend": "^3.0.0",
|
||||||
"gulp": "^3.9.1",
|
"gulp": "github:gulpjs/gulp#4.0",
|
||||||
"gulp-pipeline": "^0.4",
|
"gulp-pipeline": "^4.0",
|
||||||
"moment": "^2.11.2"
|
"moment": "^2.11.2"
|
||||||
},
|
},
|
||||||
"old-grunt-devDependencies": {
|
"old-grunt-devDependencies": {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user