Permalink
Browse files

browserify added and testing resolved so app logic can be written lik…

…e a node module
  • Loading branch information...
1 parent bbc3373 commit 5afe19e66635871ed88c693c5ce0e271c6df8ca4 @Inspiravetion committed Feb 25, 2014
Showing 3,514 changed files with 1,006,100 additions and 8 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
View
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,8 @@
+var io = require('socket.io-client');
+
+var socket = io.connect('http://localhost');
+
+socket.on('news', function (data) {
+ console.log(data);
+ socket.emit('my other event', { my: 'data' });
+});
@@ -0,0 +1,26 @@
+var color = require('colors');
+
+function throw_mock(){
+ throw 'some error';
+}
+
+describe('Testing Testing...', function(){
+
+ beforeEach(function(){
+ //some initialization
+ });
+
+ it('should pass', function(){
+ var a = 1 + 1;
+ expect(a).toBe(2);
+ });
+
+ it('should fail', function(){
+ expect(function(){
+ throw_mock()
+ }).toThrow('some error');
+ })
+
+});
+
+
View
@@ -2,7 +2,7 @@
var gulp = require('gulp');
// include plug-ins
-var concat = require('gulp-concat');
+var browserify = require('gulp-browserify');
var stripDebug = require('gulp-strip-debug');
var uglify = require('gulp-uglify');
var sass = require('gulp-sass');
@@ -13,14 +13,13 @@ var jasmine = require('gulp-jasmine');
///////////////////////////////////////
gulp.task('scripts', function() {
- //can specify order for deps
- var stream = gulp.src([/*'./src/scripts/lib.js',*/'./dev/scripts/*.js'])
- .pipe(concat('script.js'))
+
+ gulp.src('./dev/scripts/app.js')
+ .pipe(browserify())
.pipe(stripDebug())
.pipe(uglify())
- .pipe(gulp.dest('./prod/scripts/'));
+ .pipe(gulp.dest('./prod/'));
- console.log(stream);
});
gulp.task('styles', function() {
@@ -33,7 +32,7 @@ gulp.task('styles', function() {
gulp.task('tests', function() {
- gulp.src('./dev/spec/*.js')
+ gulp.src('./dev/scripts/spec/*.js')
.pipe(jasmine());
});
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 5afe19e

Please sign in to comment.