fixed gulp watch jesus
This commit is contained in:
parent
25ad581fdc
commit
a443e5c432
3 changed files with 3446 additions and 25 deletions
49
gulpfile.js
49
gulpfile.js
|
@ -57,37 +57,34 @@ let site = ''
|
||||||
|
|
||||||
function html() {
|
function html() {
|
||||||
const stream = src(htmlFiles)
|
const stream = src(htmlFiles)
|
||||||
.pipe(tap(file => {
|
.pipe(tap(file => {
|
||||||
const path = file.path.split('/')
|
const path = file.path.split('/')
|
||||||
site = path[path.indexOf('saudade') + 1]
|
site = path[path.indexOf('saudade') + 1]
|
||||||
}))
|
// console.log(path[path.length - 1])
|
||||||
.pipe(posthtml([
|
}))
|
||||||
...posthtmlPlugins,
|
.pipe(posthtml([
|
||||||
posthtmlModules({
|
...posthtmlPlugins,
|
||||||
plugins: posthtmlPlugins
|
posthtmlModules({
|
||||||
}),
|
plugins: posthtmlPlugins
|
||||||
]))
|
}),
|
||||||
.pipe(rename(path => {
|
]))
|
||||||
path.basename = 'index'
|
.pipe(rename(path => {
|
||||||
}))
|
path.basename = 'index'
|
||||||
.pipe(dest('.'))
|
}))
|
||||||
|
.pipe(dest('.'))
|
||||||
if (browserSync.active) {
|
|
||||||
stream.pipe(browserSync.stream())
|
|
||||||
}
|
|
||||||
|
|
||||||
return stream
|
return stream
|
||||||
}
|
}
|
||||||
|
|
||||||
function css() {
|
function css() {
|
||||||
const stream = src(cssFiles)
|
const stream = src(cssFiles)
|
||||||
.pipe(sourcemaps.init())
|
.pipe(sourcemaps.init())
|
||||||
.pipe(postcss(postcssPlugins))
|
.pipe(postcss(postcssPlugins))
|
||||||
.pipe(rename(path => {
|
.pipe(rename(path => {
|
||||||
path.basename = 'style'
|
path.basename = 'style'
|
||||||
}))
|
}))
|
||||||
.pipe(sourcemaps.write())
|
.pipe(sourcemaps.write())
|
||||||
.pipe(dest('.'))
|
.pipe(dest('.'))
|
||||||
|
|
||||||
if (browserSync.active) {
|
if (browserSync.active) {
|
||||||
stream.pipe(browserSync.stream())
|
stream.pipe(browserSync.stream())
|
||||||
|
@ -100,7 +97,9 @@ exports.watch = function () {
|
||||||
browserSync.init(bsConfig)
|
browserSync.init(bsConfig)
|
||||||
|
|
||||||
watch(cssFiles, {ignoreInitial: false}, css)
|
watch(cssFiles, {ignoreInitial: false}, css)
|
||||||
|
|
||||||
watch(htmlFiles, {ignoreInitial: false}, html)
|
watch(htmlFiles, {ignoreInitial: false}, html)
|
||||||
|
watch('**/index.html').on('all', browserSync.reload)
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.build = parallel(html, css)
|
exports.build = parallel(html, css)
|
||||||
|
|
1711
wordfire/dl/sound_weddingbells.wav
Normal file
1711
wordfire/dl/sound_weddingbells.wav
Normal file
File diff suppressed because one or more lines are too long
1711
wordfire/dl/sound_weddingmarch.wav
Normal file
1711
wordfire/dl/sound_weddingmarch.wav
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue