diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000000..3ac9025791 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,69 @@ +var gulp = require('gulp'), + _ = require('lodash'), + nodemon = require('gulp-nodemon'), + karma = require('karma').server, + stylus = require('gulp-stylus'), + nib = require('nib'), + minifycss = require('gulp-minify-css'), + rename = require('gulp-rename'), + uglify = require('gulp-uglify'), + concat = require('gulp-concat'), + pkg = require('./package'); + +var config = { + stylus: { + src: { + app: 'public/css/index.styl', + staticPage: 'public/css/static.styl' // static is a 'future' reserved word + }, + dest: './build/' + } +}; + +gulp.task('karma', function (done) { + karma.start({ + configFile: __dirname + '/karma.conf.js', + singleRun: true + }, done); +}); + +gulp.task('git_changelog', function() { + // @TODO: Finish this +}); + +gulp.task('clean', function() { + // @TODO: Finish this +}); + +gulp.task('stylus', function() { + gulp.src(config.stylus.src.app) + .pipe(stylus({use: [nib()]})) + .pipe(rename('app.css')) + .pipe(gulp.dest(config.stylus.dest)); + gulp.src(config.stylus.src.staticPage) + .pipe(stylus({use: [nib()]})) + .pipe(rename('static.css')) + .pipe(gulp.dest(config.stylus.dest)); +}); + +gulp.task('copy', function() { + // @TODO: Finish this +}); + +gulp.task('hashres', function() { + // @TODO: Finish this +}); + +gulp.task('watch', ['stylus'], function() { + // @TODO: Finish this +}); + +gulp.task('dev', ['watch'], function() { + // @TODO: Finish this + nodemon({ script: pkg.main }); +}); + +gulp.task('prod', function() { + // @TODO: Finish this +}); +gulp.task('default', ['dev']); diff --git a/package.json b/package.json index adb9383150..5695a42ede 100644 --- a/package.json +++ b/package.json @@ -15,19 +15,6 @@ "domain-middleware": "~0.1.0", "express": "~3.17.5", "express-csv": "~0.6.0", - "grunt": "~0.4.1", - "grunt-cli": "~0.1.9", - "grunt-concurrent": "~1.0.0", - "grunt-contrib-clean": "~0.6.0", - "grunt-contrib-copy": "~0.6.0", - "grunt-contrib-cssmin": "~0.10.0", - "grunt-browserify": "~1.3.1", - "grunt-contrib-clean": "~0.5.0", - "grunt-contrib-stylus": "~0.20.0", - "grunt-contrib-uglify": "~0.6.0", - "grunt-contrib-watch": "~0.6.1", - "grunt-hashres": "~0.4.1", - "grunt-nodemon": "~0.3.0", "icalendar": "git://github.com/lefnire/node-icalendar#master", "in-app-purchase": "^0.2.0", "jade": "~1.7.0", @@ -71,35 +58,40 @@ }, "scripts": { "test": "./test/run_tests.sh", - "start": "grunt run:dev", + "start": "gulp dev", "postinstall": "./node_modules/bower/bin/bower --config.interactive=false install -f", "coverage": "COVERAGE=true mocha --require register-handlers.js --reporter html-cov > coverage.html; open coverage.html" }, "devDependencies": { "coffee-coverage": "~0.4.2", - "protractor": "~0.14.0", - "grunt-karma": "~0.6.2", - "grunt-spritesmith": "~3.5.0", - "karma-script-launcher": "~0.1.0", + "csv": "~0.3.6", + "deep-diff": "~0.1.4", + "expect.js": "~0.2.0", + "git-changelog": "colegleason/git-changelog", + "gulp-concat": "^2.4.3", + "gulp-minify-css": "^0.4.2", + "gulp-nodemon": "^1.0.5", + "gulp-rename": "^1.2.0", + "gulp-stylus": "^2.0.0", + "gulp-uglify": "^1.1.0", + "karma": "~0.10.2", + "karma-chai-plugins": "~0.1.0", "karma-chrome-launcher": "~0.1.0", + "karma-coffee-preprocessor": "~0.1.0", "karma-firefox-launcher": "~0.1.0", "karma-html2js-preprocessor": "~0.1.0", - "karma-coffee-preprocessor": "~0.1.0", "karma-jasmine": "~0.1.3", - "karma-requirejs": "~0.2.0", - "karma-phantomjs-launcher": "~0.1.0", - "karma": "~0.10.2", - "karma-ng-html2js-preprocessor": "~0.1.0", - "karma-chai-plugins": "~0.1.0", - "mocha": "~1.12.1", "karma-mocha": "0.1.3", - "csv": "~0.3.6", + "karma-ng-html2js-preprocessor": "~0.1.0", + "karma-phantomjs-launcher": "~0.1.0", + "karma-requirejs": "~0.2.0", + "karma-script-launcher": "~0.1.0", + "mocha": "~1.12.1", "mongoskin": "~0.6.1", + "nib": "^1.0.4", "phantomjssmith": "~0.5.4", - "expect.js": "~0.2.0", + "protractor": "~0.14.0", "superagent": "~0.15.7", - "superagent-defaults": "~0.1.5", - "git-changelog": "colegleason/git-changelog", - "deep-diff": "~0.1.4" + "superagent-defaults": "~0.1.5" } }