Skip to content

Commit

Permalink
Start using Gulp + Browserify
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateus Carniatto committed May 11, 2015
1 parent 781bfd4 commit 9b4f221
Show file tree
Hide file tree
Showing 10 changed files with 59,343 additions and 17 deletions.
1 change: 1 addition & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Gulpfile.js
5 changes: 3 additions & 2 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"globalstrict": true,
"globalstrict": false,
"globals": {
"angular": false,
"describe": false,
Expand All @@ -10,6 +10,7 @@
"module": false,
"inject": false,
"Firebase":false,
"console":false
"console":false,
require: false
}
}
1 change: 1 addition & 0 deletions .publish
Submodule .publish added at e87af4
50 changes: 50 additions & 0 deletions Gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
var gulp = require('gulp'),
livereload = require('gulp-livereload'),
connect = require('gulp-connect'),
open = require('gulp-open'),
ghPages = require('gulp-gh-pages'),
rename = require('gulp-rename'),
browserify = require('gulp-browserify');

gulp.task('deploy', function() {
return gulp.src('./app/**/*')
.pipe(ghPages());
});

gulp.task('connect', function() {
connect.server({
root: 'app',
host: '0.0.0.0',
livereload: true
});
});

// Basic usage
gulp.task('scripts', function() {
// Single entry point to browserify
gulp.src('./app/app.js')
.pipe(browserify({
insertGlobals : true
}))
.pipe(rename('bundle.js'))
.pipe(gulp.dest('./app/build/js'));
});

gulp.task('url', function(){
var options = {
url: 'http://localhost:8080'
};
gulp.src('./app/index.html')
.pipe(open('', options));
});

gulp.task('change', function () {
gulp.src('./app/**/*')
.pipe(connect.reload());
});

gulp.task('watch', function () {
gulp.watch(['./app/**/*'], ['change']);
});

gulp.task('default', ['scripts','connect','url','watch']);
7 changes: 7 additions & 0 deletions app/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
'use strict';

require('angular');
require('angular-route');
require('angular-cookies');
require('firebase');
require('angularFire');


function config($routeProvider) {
$routeProvider.otherwise({
redirectTo: '/home'
Expand Down
Loading

0 comments on commit 9b4f221

Please sign in to comment.