This repository has been archived by the owner on Nov 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Gulp Fix #15
Open
erickocrs
wants to merge
3
commits into
tonik:master
Choose a base branch
from
erickocrs:gulp_fix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Gulp Fix #15
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,34 +16,34 @@ if (!process.env.NODE_ENV) { | |
| SASS Tasks | ||
|-------------------------------------------------------------------------- | ||
*/ | ||
gulp.task('sass:clean', require('./tasks/sass/clean')) | ||
gulp.task('sass:lint', require('./tasks/sass/lint')) | ||
gulp.task('sass:build', require('./tasks/sass/build')) | ||
gulp.task('sass:clean', (cb) => { require('./tasks/sass/clean') (cb())}) | ||
gulp.task('sass:lint', (cb) => { require('./tasks/sass/lint') (cb())}) | ||
gulp.task('sass:build', (cb) => { require('./tasks/sass/build') (cb())}) | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Fonts Tasks | ||
|-------------------------------------------------------------------------- | ||
*/ | ||
gulp.task('font:clean', require('./tasks/font/clean')) | ||
gulp.task('font:build', require('./tasks/font/build')) | ||
gulp.task('font:clean', (cb) => { require('./tasks/font/clean') (cb())}) | ||
gulp.task('font:build', (cb) => { require('./tasks/font/build') (cb())}) | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Images Tasks | ||
|-------------------------------------------------------------------------- | ||
*/ | ||
gulp.task('image:clean', require('./tasks/image/clean')) | ||
gulp.task('image:build', require('./tasks/image/build')) | ||
gulp.task('image:clean', (cb) => { require('./tasks/image/clean') (cb())}) | ||
gulp.task('image:build', (cb) => { require('./tasks/image/build') (cb())}) | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| JavaScript Tasks | ||
|-------------------------------------------------------------------------- | ||
*/ | ||
gulp.task('javascript:clean', require('./tasks/javascript/clean')) | ||
gulp.task('javascript:lint', require('./tasks/javascript/lint')) | ||
gulp.task('javascript:build', ['javascript:clean'], require('./tasks/javascript/build')) | ||
gulp.task('javascript:clean', (cb) => { require('./tasks/javascript/clean') (cb())}) | ||
gulp.task('javascript:lint', (cb) => { require('./tasks/javascript/lint') (cb())}) | ||
gulp.task('javascript:build', gulp.series(['javascript:clean']), (cb) => { require('./tasks/javascript/build') (cb())}) | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
|
@@ -54,10 +54,10 @@ gulp.task('javascript:build', ['javascript:clean'], require('./tasks/javascript/ | |
| They compose a complete building pipline for each domain. | ||
| | ||
*/ | ||
gulp.task('font', ['font:clean', 'font:build']) | ||
gulp.task('image', ['image:clean', 'image:build']) | ||
gulp.task('sass', ['sass:clean', 'sass:lint', 'sass:build']) | ||
gulp.task('javascript', ['javascript:clean', 'javascript:lint', 'javascript:build']) | ||
gulp.task('font', gulp.series(['font:clean', 'font:build'])) | ||
gulp.task('image', gulp.series(['image:clean', 'image:build'])) | ||
gulp.task('sass', gulp.series(['sass:clean', 'sass:lint', 'sass:build'])) | ||
gulp.task('javascript', gulp.series(['javascript:clean', 'javascript:lint', 'javascript:build'])) | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
|
@@ -72,7 +72,11 @@ gulp.task('javascript', ['javascript:clean', 'javascript:lint', 'javascript:buil | |
gulp.task('sync', () => { | ||
browsersync.init({ | ||
open: false, | ||
server: { baseDir: '../public' } | ||
server: { baseDir: '../public' }, | ||
/* Uncomment for Custom/Docker Ports | ||
proxy : "localhost:8080", | ||
port: "4000" | ||
*/ | ||
}) | ||
}) | ||
|
||
|
@@ -86,20 +90,27 @@ gulp.task('sync', () => { | |
| and recompiling separetly for better performance. | ||
| | ||
*/ | ||
gulp.task('watch', ['sync'], () => { | ||
gulp.watch('../resources/assets/sass/**/*.scss', ['sass', reload]) | ||
gulp.task('watch_tasks', () => { | ||
|
||
gulp.watch('../src/**/*.scss', gulp.series(['sass'])) | ||
.on('error', message.error('WATCH: Sass')) | ||
.on("change", gulp.series(reload)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please be consistent with the use of quotes, if you're using a single quote then just keep using it... |
||
|
||
gulp.watch('../resources/assets/js/**/*.js', ['javascript', reload]) | ||
gulp.watch('../src/assets/js/**/*.js', gulp.series(['javascript'])) | ||
.on('error', message.error('WATCH: Javascript')) | ||
.on("change", gulp.series(reload)) | ||
|
||
gulp.watch('../resources/assets/fonts/**/*.{eot,woff,woff2,ttf,svg}', ['font', reload]) | ||
gulp.watch('../src/assets/fonts/**/*.{eot,woff,woff2,ttf,svg}', gulp.series(['font'])) | ||
.on('error', message.error('WATCH: Fonts')) | ||
.on("change", gulp.series(reload)) | ||
|
||
gulp.watch('../resources/assets/images/**/*.{jpg,jpeg,png,gif,svg}', ['image', reload]) | ||
gulp.watch('../src/assets/images/**/*.{jpg,jpeg,png,gif,svg}', gulp.series(['image'])) | ||
.on('error', message.error('WATCH: Images')) | ||
.on("change", gulp.series(reload)) | ||
}) | ||
|
||
gulp.task('watch', gulp.parallel(['sync', 'watch_tasks'])) | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Default Task | ||
|
@@ -110,4 +121,4 @@ gulp.task('watch', ['sync'], () => { | |
| tasks and completely building the whole project. | ||
| | ||
*/ | ||
gulp.task('default', ['sass', 'javascript', 'font', 'image']) | ||
gulp.task('default', gulp.series(['sass', 'javascript', 'font', 'image'])) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could simplify it to:
cb => require('./tasks/sass/clean') (cb())