dist-to-docs copy

This commit is contained in:
Kevin Ross 2016-03-09 11:39:56 -06:00
parent c7e8aefd94
commit 25436dff34
2 changed files with 29 additions and 30 deletions

View File

@ -262,15 +262,15 @@ module.exports = function (grunt) {
},
copy: {
'dist-to-docs': { // for example templates
expand: true,
cwd: 'dist',
src: [
'js/*.iife*',
'css/*.*'
],
dest: 'docs/dist/'
},
//'dist-to-docs': { // for example templates
// expand: true,
// cwd: 'dist',
// src: [
// 'js/*.iife*',
// 'css/*.*'
// ],
// dest: 'docs/dist/'
//},
//'bs-docs-js-vendor': {
// expand: true,
// cwd: '../bootstrap/docs/assets/js/vendor',

View File

@ -101,18 +101,6 @@ new TaskSeries(gulp, 'css', [scsslint, sass])
/**
* DOCS
*/
const referenceDocNotice =
`$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>.
It is included here to demonstrate rendering with Material Design for Bootstrap default styling.
See the <a href="/material-design/buttons">Material Design</a> section for more elements and customization options.
{% endcallout %}
\n\n$2`
let docsPreset = Preset.baseline({
javascripts: {
source: {options: {cwd: 'docs/assets/js/src'}},
@ -153,6 +141,15 @@ let docs = [
]
]
const referenceDocNotice =
`$1\n
[//]: # DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs\n
{% callout info %}\n**Bootstrap Reference Documentation**
This is a part of the reference documentation from <a href="http://getbootstrap.com">Bootstrap</a>.
It is included here to demonstrate rendering with Material Design for Bootstrap default styling.
See the <a href="/material-design/buttons">Material Design</a> section for more elements and customization options.
{% endcallout %}
\n\n$2`
const docsProcess = (content, srcpath) => { // https://regex101.com/r/cZ7aO8/2
return content
@ -170,7 +167,6 @@ let bsDocs = [
dest: 'docs/content/',
process: docsProcess
}),
new Copy(gulp, docsPreset, docsConfig, {
task: {name: 'copy:bs-docs-components'},
source: {
@ -180,7 +176,6 @@ let bsDocs = [
dest: 'docs/components/',
process: docsProcess
}),
new Copy(gulp, docsPreset, docsConfig, {
task: {name: 'copy:bs-docs-scss'},
source: {
@ -189,10 +184,9 @@ let bsDocs = [
},
dest: 'docs/assets/scss/',
process: (content, srcpath) => {
return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy-bs\n\n$1');
return content.replace(/([\s\S]+)/mg, '// DO NOT EDIT IT WILL BE OVERWRITTEN - copy of bootstrap documentation generated by gulp docs:copy:bs\n\n$1');
}
}),
new Copy(gulp, docsPreset, docsConfig, {
task: {name: 'copy:bs-docs-plugins'},
source: {
@ -201,7 +195,6 @@ let bsDocs = [
},
dest: 'docs/_plugins/'
}),
new Copy(gulp, docsPreset, docsConfig, {
task: {name: 'copy:bs-docs-js-vendor'},
source: {
@ -213,9 +206,15 @@ let bsDocs = [
]
},
dest: 'docs/assets/js/vendor/'
}),
})
]
new TaskSeries(gulp, 'docs:copy:bs', bsDocs)
new TaskSeries(gulp, 'docs:copy-bs', bsDocs)
new Copy(gulp, docsPreset, docsConfig, {
task: {name: 'copy:dist'},
source: {
options: {cwd: 'dist'},
glob: ['js/*.iife*', 'css/*.*']
},
dest: 'docs/dist/'
})