mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-02-17 04:00:37 +03:00
working on gulp copy
This commit is contained in:
parent
10539f84ab
commit
b859447118
36
Gruntfile.js
36
Gruntfile.js
|
@ -335,24 +335,24 @@ module.exports = function (grunt) {
|
|||
],
|
||||
dest: 'docs/getting-started/'
|
||||
},
|
||||
'bs-docs-content': {
|
||||
options: {
|
||||
// https://regex101.com/r/cZ7aO8/2
|
||||
process: function (content, srcpath) {
|
||||
return content
|
||||
// insert docs reference
|
||||
.replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice)
|
||||
// remove sample text 'display' as this is a particular style and is confusing
|
||||
.replace(/Fancy display heading/, 'Fancy heading');
|
||||
}
|
||||
},
|
||||
expand: true,
|
||||
cwd: '../bootstrap/docs/content',
|
||||
src: [
|
||||
'**/*'
|
||||
],
|
||||
dest: 'docs/content/'
|
||||
}
|
||||
//'bs-docs-content': {
|
||||
// options: {
|
||||
// // https://regex101.com/r/cZ7aO8/2
|
||||
// process: function (content, srcpath) {
|
||||
// return content
|
||||
// // insert docs reference
|
||||
// .replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice)
|
||||
// // remove sample text 'display' as this is a particular style and is confusing
|
||||
// .replace(/Fancy display heading/, 'Fancy heading');
|
||||
// }
|
||||
// },
|
||||
// expand: true,
|
||||
// cwd: '../bootstrap/docs/content',
|
||||
// src: [
|
||||
// '**/*'
|
||||
// ],
|
||||
// dest: 'docs/content/'
|
||||
//}
|
||||
},
|
||||
|
||||
connect: {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Preset, Clean, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index'
|
||||
import {Preset, Clean, Copy, MinifyCss, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, TaskSeries, Uglify} from 'gulp-pipeline/src/index'
|
||||
|
||||
// debug the project source - remove for repo
|
||||
//import {Clean, CleanDigest, Images, MinifyCss, Sass, RollupIife, ScssLint, EsLint, Rev, TaskSeries} from 'gulp-pipeline'
|
||||
|
@ -46,8 +46,7 @@ let rollupConfig = {
|
|||
'anchor-js': 'anchors',
|
||||
clipboard: 'Clipboard'
|
||||
},
|
||||
banner:
|
||||
`/*!
|
||||
banner: `/*!
|
||||
* Bootstrap Material Design v${pkg.version} (${pkg.homepage})
|
||||
* Copyright 2014-${moment().format("YYYY")} ${pkg.author}
|
||||
* Licensed under MIT (https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE)
|
||||
|
@ -104,7 +103,7 @@ new TaskSeries(gulp, 'css', [scsslint, sass])
|
|||
*/
|
||||
|
||||
const referenceDocNotice =
|
||||
`$1\n
|
||||
`$1\n
|
||||
[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by grunt docs-copy-bootstrap-docs\n
|
||||
{% callout info %}\n**Bootstrap Reference Documentation**
|
||||
This is a part of the reference documentation from <a href="http://getbootstrap.com">Bootstrap</a>.
|
||||
|
@ -114,7 +113,6 @@ See the <a href="/material-design/buttons">Material Design</a> section for more
|
|||
\n\n$2`
|
||||
|
||||
|
||||
|
||||
let docsPreset = Preset.baseline({
|
||||
javascripts: {
|
||||
source: {options: {cwd: 'docs/assets/js/src'}},
|
||||
|
@ -133,24 +131,41 @@ const docsConfig = {task: {prefix: 'docs:'}}
|
|||
|
||||
let docs = [
|
||||
[
|
||||
new ScssLint(gulp, docsPreset, extend(true, {}, docsConfig, {
|
||||
new ScssLint(gulp, docsPreset, docsConfig, {
|
||||
source: {glob: ['**/*.scss', '!docs.scss']},
|
||||
watch: {glob: ['**/*.scss', '!docs.scss']}
|
||||
})),
|
||||
}),
|
||||
new EsLint(gulp, docsPreset, docsConfig)
|
||||
],
|
||||
[
|
||||
new RollupIife(gulp, docsPreset, extend(true, {}, docsConfig, rollupConfig, {
|
||||
new RollupIife(gulp, docsPreset, docsConfig, rollupConfig, {
|
||||
options: {
|
||||
dest: 'docs.iife.js',
|
||||
moduleName: 'docs'
|
||||
}
|
||||
})),
|
||||
new Uglify(gulp, docsPreset, extend(true, {}, docsConfig, {
|
||||
}),
|
||||
new Uglify(gulp, docsPreset, docsConfig, {
|
||||
task: {name: 'vendor:uglify'},
|
||||
source: {options: {cwd: 'docs/assets/js/vendor'}},
|
||||
options: {dest: 'docs-vendor.min.js'}
|
||||
})),
|
||||
}),
|
||||
new Sass(gulp, docsPreset, docsConfig)
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
let bsDocs = [
|
||||
new Copy(gulp, docsPreset, docsConfig, {
|
||||
task: {name: 'copy:bs-docs-content'},
|
||||
source: {
|
||||
options: {cwd: '../bootstrap/docs/content'},
|
||||
glob: ['**/*']
|
||||
},
|
||||
dest: 'docs/content/',
|
||||
process: (content, srcpath) => { // https://regex101.com/r/cZ7aO8/2
|
||||
return content
|
||||
.replace(/(---[\s\S]+?---)([\s\S]+)/mg, referenceDocNotice) // insert docs reference
|
||||
.replace(/Fancy display heading/, 'Fancy heading') // remove sample text 'display' as this is a particular MD style and is confusing
|
||||
}
|
||||
})
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user