Skip to content

Commit

Permalink
* Updated gulp
Browse files Browse the repository at this point in the history
* Added gulp task to deploy to gh_pages, in order to easily push a live demo to gh-pages.
  • Loading branch information
erikvullings committed Aug 16, 2015
1 parent 939b113 commit a72c896
Show file tree
Hide file tree
Showing 3 changed files with 520 additions and 475 deletions.
44 changes: 44 additions & 0 deletions example/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,50 @@ gulp.task('create_templateCache', function() {
.pipe(gulp.dest('public/cs/js'))
})

gulp.task('gh_pages', function() {
// Create a distribution for the GitHub Pages.
// Basically the same as the create_dist function, except that a different output folder is used.
// http://yeoman.io/learning/deployment.html
console.log('Creating distribution for GitHub Pages');
console.log('Use the following command to push the gh_pages folder to gh-pages.');
console.log('git subtree push --prefix example/gh_pages origin gh-pages');
gulp.src('public/images/**/*.*')
.pipe(plumber())
.pipe(gulp.dest('./gh_pages/images/'));

gulp.src('public/bower_components/angular-utils-pagination/*.*')
.pipe(plumber())
.pipe(gulp.dest('./gh_pages/bower_components/angular-utils-pagination/'));

gulp.src(path2csWeb + 'csComp/includes/images/*.*')
.pipe(plumber())
.pipe(gulp.dest('./gh_pages/cs/images/'));

gulp.src('public/data/**/*.*')
.pipe(plumber())
.pipe(gulp.dest('./gh_pages/data/'));

gulp.src('public/cs/css/ROsanswebtextregular.ttf')
.pipe(plumber())
.pipe(gulp.dest('./gh_pages/css/'));

gulp.src('public/cs/js/cesium.js')
.pipe(plumber())
.pipe(gulp.dest('./gh_pages/cs/js/'));

gulp.src('public/bower_components/Font-Awesome/fonts/*.*')
.pipe(plumber())
.pipe(gulp.dest('./gh_pages/fonts/'));

var assets = useref.assets();

return gulp.src('./public/*.html')
.pipe(assets)
.pipe(assets.restore())
.pipe(useref())
.pipe(gulp.dest('./gh_pages/'));
});

gulp.task('create_dist', function() {
gulp.src('public/images/**/*.*')
.pipe(plumber())
Expand Down
4 changes: 2 additions & 2 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"devDependencies": {
"coveralls": "^2.11.2",
"del": "^1.2.0",
"gulp": "~3.8.8",
"gulp": "^3.9.0",
"gulp-angular-templatecache": "^1.6.0",
"gulp-cached": "~1.0.1",
"gulp-concat": "~2.4.1",
Expand Down Expand Up @@ -54,7 +54,7 @@
"phantomjs": "^1.9.17"
},
"bugs": {
"url": "https://github.com/TNOCS/csWeb/issues"
"url": "https://github.com/TNOCS/csWeb/issues"
},
"homepage": "https://github.com/TNOCS/csWeb"
}
Loading

0 comments on commit a72c896

Please sign in to comment.