Last active
August 29, 2015 14:22
-
-
Save abbotto/7895fa5737435a764db6 to your computer and use it in GitHub Desktop.
Grunt Config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| module.exports = function(grunt) { | |
| var pkg = require('./package.json'); | |
| require('load-grunt-tasks')(grunt); | |
| grunt.initConfig({ | |
| env: { | |
| default: { | |
| PORT: 3000, | |
| DOMAIN: 'bln.local' | |
| } | |
| }, | |
| express: { | |
| server: { | |
| options: { | |
| script: 'app/server.js' | |
| } | |
| } | |
| }, | |
| // Sass configuration | |
| sass: { | |
| build: { | |
| files: { | |
| 'public/app-css/app.css': 'public/app-css/app.scss' | |
| } | |
| } | |
| }, | |
| // Add vendor prefixed styles | |
| autoprefixer: { | |
| options: { | |
| browsers: ['last 2 version', 'ie 8', 'ie 9'], | |
| diff: true | |
| }, | |
| single_file: { | |
| files: [{ | |
| expand: true, | |
| cwd: 'public/**/', | |
| src: '{,*/}*.scss', | |
| dest: 'public/**/' | |
| }] | |
| } | |
| }, | |
| //Watches files and folders for us | |
| watch: { | |
| //watch to see if we change this gruntfile | |
| gruntfile: { | |
| files: ['Gruntfile.js'] | |
| }, | |
| html: { | |
| files: 'public/**/*.html', | |
| options: { | |
| livereload: true | |
| } | |
| }, | |
| js: { | |
| files: 'public/**/{,*/}*.{json,js}', | |
| // tasks: [], | |
| options: { | |
| livereload: true | |
| } | |
| }, | |
| css: { | |
| files: 'public/**/{,*/}*.{scss,sass}', | |
| tasks: ['sass', 'autoprefixer'], | |
| options: { | |
| livereload: true | |
| } | |
| } | |
| } | |
| }); //grunt.initConfig | |
| // Server | |
| grunt.registerTask('server', ['env', 'express:server', 'sass', 'autoprefixer', 'watch']); | |
| // Initiate | |
| grunt.registerTask('default', ['server']); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "Projects", | |
| "description": "Various projects by Jared Abbott", | |
| "version": "0.0.1", | |
| "author": "Jared", | |
| "private": true, | |
| "main": "app/index.js", | |
| "scripts": { | |
| "start": "node app/server.js", | |
| "test": "mocha" | |
| }, | |
| "engines": { | |
| "node": "0.10.33" | |
| }, | |
| "dependencies": { | |
| "express": "4.10.4", | |
| "vhost": "3.0.0", | |
| "when": "3.6.3", | |
| "request": "2.53.0", | |
| "body-parser": "1.11.0", | |
| "twilio": "1.11.0", | |
| "cors": "2.6.0", | |
| "lodash": "3.3.0" | |
| }, | |
| "devDependencies": { | |
| "chai": "1.10.0", | |
| "grunt": "0.4.5", | |
| "grunt-autoprefixer": "^3.0.3", | |
| "grunt-cli": "0.1.13", | |
| "grunt-contrib-compass": "^1.0.3", | |
| "grunt-contrib-watch": "^0.6.1", | |
| "grunt-env": "0.4.2", | |
| "grunt-express-server": "0.4.19", | |
| "grunt-mocha-test": "0.12.4", | |
| "grunt-sass": "0.18.1", | |
| "load-grunt-tasks": "1.0.0", | |
| "matchdep": "^0.3.0", | |
| "mocha": "2.0.1", | |
| "supertest": "0.15.0", | |
| "uglifyjs": "^2.4.10" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment