Skip to content

Commit

Permalink
Fixing gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
engelfrost committed May 1, 2015
1 parent 5c56604 commit a8e59d5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
37 changes: 22 additions & 15 deletions gulpfile.js
@@ -1,10 +1,10 @@
var gulp = require('gulp'),
concat = require('gulp-concat'),
coffee = require('gulp-coffee'),
karma = require('karma').server,
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
browserSync = require('browser-sync');
var gulp = require('gulp');
var concat = require('gulp-concat');
var coffee = require('gulp-coffee');
var karma = require('karma').server;
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var browserSync = require('browser-sync');

var karmaConf = {
browsers: ['PhantomJS'],
Expand Down Expand Up @@ -46,40 +46,47 @@ var sourceGlob = [
// })
// });

gulp.task('browser-sync', function () {
gulp.task('browser-sync', function() {
browserSync.init(null, {
server: {
baseDir: "./"
baseDir: './'
}
});
});

gulp.task('watch', ['browser-sync'], function (done) {
gulp.task('watch', ['browser-sync'], function(done) {
karma.start(karmaConf, done);
gulp.watch(sourceGlob, ['build']);
// gulp.watch(examplesGlob, ['examples']);
});

gulp.task('watch:chrome', function (done) {
karmaConf.browsers = ["Chrome"];
gulp.task('watch:chrome', function(done) {
karmaConf.browsers = ['Chrome'];
karma.start(karmaConf, done);
gulp.watch(sourceGlob, ['build']);
});

gulp.task('build:minify', ['build'], function () {
return gulp.src("dist/svg-input-elements.js")
gulp.task('build:minify', ['build'], function() {
return gulp.src('dist/svg-input-elements.js')
.pipe(rename({extname: '.min.js'}))
.pipe(uglify())
.pipe(gulp.dest('dist/'))
.pipe(browserSync.reload({stream: true, once: true}));
});

gulp.task('build', function () {
gulp.task('build', function() {
return gulp.src(sourceGlob)
.pipe(coffee())
.pipe(concat('svg-input-elements.js'))
.pipe(gulp.dest('dist/'))
.pipe(browserSync.reload({stream: true, once: true}));
});

gulp.task('gh', function() {
return gulp.src(sourceGlob)
.pipe(coffee())
.pipe(concat('svg-input-elements.js'))
.pipe(gulp.dest('gh/'));
});

gulp.task('default', ['watch']);
2 changes: 1 addition & 1 deletion index.html
Expand Up @@ -9,7 +9,7 @@
<meta name="author" content="Josef Engelfrost">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<script src="dist/svg-input-elements.js"></script>
<script src="gh/svg-input-elements.js"></script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
Expand Down

0 comments on commit a8e59d5

Please sign in to comment.