-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding
browser-sync
task along with config settings and tests. (#76)
* Adding browser sync tasks. * Updated browsersync variable names and added documentation & tests. * Revert rename change. * Updated readme and comments. * Bumped package version. * Fixed incorrect release date. * Updated changelog. * Renamed browser sync file. * Removed tasks before config property. * Added `docsAssetsDistDir` to pathBuilder.
- Loading branch information
1 parent
6c7fe35
commit 7c5a541
Showing
10 changed files
with
175 additions
and
38 deletions.
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
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
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@justeat/gulp-build-fozzie", | ||
"version": "5.0.0", | ||
"version": "5.1.0", | ||
"description": "Gulp build tasks for use across Fozzie modules", | ||
"main": "index.js", | ||
"author": "Damian Mullins <[email protected]> (http://www.damianmullins.com)", | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
const gulp = require('gulp'); | ||
const browserSync = require('browser-sync'); | ||
|
||
const config = require('../config'); | ||
const pathBuilder = require('../pathBuilder'); | ||
|
||
|
||
/** | ||
* `browser-sync` Task | ||
* ------------- | ||
* Watches for changes to files and reloads a local website instance. | ||
* | ||
*/ | ||
gulp.task('browser-sync', ['watch'], () => { | ||
|
||
const options = { | ||
files: [ | ||
`./${pathBuilder.cssDistDir}/**/*.css`, | ||
`./${pathBuilder.jsDistDir}/**/*.js`, | ||
...config.browserSync.files | ||
], | ||
proxy: config.browserSync.proxy, | ||
reloadDebounce: config.browserSync.reloadDebounce | ||
}; | ||
|
||
browserSync.init(options); | ||
|
||
}); | ||
|
||
|
||
/** | ||
* `browser-sync:docs` Task | ||
* ------------- | ||
* Generates the documentation files then opens the docs in a local server. | ||
* | ||
*/ | ||
gulp.task('browser-sync:docs', ['assemble'], () => { | ||
|
||
const options = { | ||
files: [ | ||
`${pathBuilder.docsDistDir}/**/*.html`, | ||
`${pathBuilder.docsAssetsDistDir}**/*.css`, | ||
`${pathBuilder.docsAssetsDistDir}**/*.js` | ||
], | ||
server: { | ||
baseDir: pathBuilder.docsDistDir, | ||
serveStaticOptions: { | ||
extensions: ['html'] | ||
} | ||
}, | ||
reloadDebounce: config.browserSync.reloadDebounce | ||
}; | ||
|
||
browserSync.init(options); | ||
|
||
}); |
This file was deleted.
Oops, something went wrong.
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
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
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