Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
Fixed first run with production build (closes #105)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsebastien committed Mar 9, 2016
1 parent bac86ae commit 5070042
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* 0.5.1
* fixed issue with the production build (404 at first render)
* 0.5.0
* upgraded dependencies to support TypeScript 1.8.x
* 0.4.1
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ Check out [gulp-inline-source](https://www.npmjs.com/package/gulp-inline-source)
* event-stream: construct pipes of streams of events: https://www.npmjs.com/package/event-stream
* connect-history-api-fallback: useful to automatically redirect all non-existent directories to the index file; required for SPAs: https://www.npmjs.com/package/connect-history-api-fallback
* karma: unit test runner: https://www.npmjs.com/package/karma
* gulp-wait: Wait :): https://www.npmjs.com/package/gulp-wait

## Contributing
* Fork the project
Expand Down
3 changes: 3 additions & 0 deletions UPGRADE.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Upgrade guide

## From 0.5.0 to 0.5.1
No modification mandatory with this release.

## From 0.4.1 to 0.5.0
You should upgrade your dependency on TypeScript to 1.8.x

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "modern-web-dev-build",
"description": "Modern Web Development Build.",
"version": "0.5.0",
"version": "0.5.1",
"author": {
"name": "Sebastien Dubois",
"email": "[email protected]",
Expand Down Expand Up @@ -79,6 +79,7 @@
"gulp-uglify": "1.5.x",
"gulp-uncss": "1.0.x",
"gulp-util": "3.0.x",
"gulp-wait": "0.0.2",
"jshint-stylish": "2.1.x",
"node-sass": "3.4.x",
"opn": "4.0.x",
Expand Down
8 changes: 7 additions & 1 deletion src/gulp/tasks/serve-dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import AbstractTaskLoader from "../abstractTaskLoader";
import config from "../config";
//import utils from "../utils";
import wait from "gulp-wait";

const browserSync = require("browser-sync").create(config.webServerNames.dist);

Expand Down Expand Up @@ -46,9 +47,14 @@ class ServeDistTaskLoader extends AbstractTaskLoader {
reloadDebounce: 1000
});
};

gulp.task("wait-a-bit", "Wait a second...", () => {
return gulp.src('./package.json').
pipe(wait(1500))
});

gulp.task("serve-dist", "Build and serve the production version (i.e., 'dist' folder contents", () =>{
return runSequence([ "default" ], startBrowserSync); // here we need to ensure that all the other tasks are done before we start BrowserSync
return runSequence([ "default" ], ["wait-a-bit"], startBrowserSync); // here we need to ensure that all the other tasks are done before we start BrowserSync
});
}
}
Expand Down

0 comments on commit 5070042

Please sign in to comment.