Skip to content

Commit

Permalink
Merge pull request #29 from adambullmer/fix-index-reload
Browse files Browse the repository at this point in the history
Prepared fix for livereload compatible changes to index.html
  • Loading branch information
adambullmer authored Apr 3, 2017
2 parents ccb25ee + 08815d1 commit bc937c7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 15 additions & 2 deletions lib/angular-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,21 @@ AngularApp.prototype.templateTree = function () {
};

AngularApp.prototype.htmlTree = function () {
return new Funnel('./index.html', {
destDir: '/index.html',
const fs = require('fs');

if (fs.existsSync('./index.html')) {
console.warn(`${chalk.red('⚠ WARNING!')} Default location of ${chalk.cyan("/index.html")} has changed`);
console.warn(`${chalk.red('⚠ WARNING!')} Please migrate to ${chalk.cyan("/app/index.html")} to follow the most recent update`);

return new Funnel('./index.html', {
destDir: '/index.html',
annotation: 'Funnel: index.html'
});
}

return new Funnel('app', {
include: ['index.html'],
destDir: '/',
annotation: 'Funnel: index.html'
});
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-bro-app",
"version": "0.10.0",
"version": "0.10.1",
"description": "Angular broccoli plugin and compilation routine",
"main": "lib/angular-app.js",
"scripts": {
Expand Down

0 comments on commit bc937c7

Please sign in to comment.