Created
February 19, 2014 14:48
-
-
Save DrSammyD/9093577 to your computer and use it in GitHub Desktop.
MVC4 Grunt setup
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
module.exports = (grunt) -> | |
grunt.initConfig | |
pkg: grunt.file.readJSON('package.json'), | |
sass: # Task | |
dist: # Target | |
files: # Dictionary of files | |
"Bitcadia.Web/Content/Site.css": "Bitcadia.Web/sass/Site.scss" # 'destination': 'source' | |
dev: # Another target | |
options: # Dictionary of render options | |
includePaths: ["Bitcadia.Web/sass/foundation/"] | |
files: | |
"Bitcadia.Web/Content//Site.css": "Bitcadia.Web/sass/Site.scss" | |
requirejs: | |
compile: | |
options: | |
dir: "./Bitcadia.Web/Scripts-built" | |
appDir: "./Bitcadia.Web/Scripts" | |
baseUrl: "./" | |
mainConfigFile: "./Bitcadia.Web/Scripts/App/ref.js" | |
optimize: "none" | |
#optimize: 'uglify2', | |
generateSourceMaps: true | |
preserveLicenseComments: false | |
paths: | |
requireLib: "./require" | |
ref: "./App/ref" | |
main: "./App/main" | |
viewData: "empty:" | |
modules: [ | |
#First set up the common build layer. | |
#module names are relative to baseUrl | |
name: "main" | |
include: [ | |
"requireLib" | |
"ref" | |
"jquery" | |
"knockout" | |
] | |
] | |
grunt.loadNpmTasks "grunt-contrib-coffee" | |
grunt.loadNpmTasks "grunt-contrib-requirejs" | |
grunt.loadNpmTasks "grunt-sass" | |
# Default task. | |
grunt.registerTask 'default', ['sass:dist','requirejs:compile'] |
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": "Bitcadia", | |
"version": "0.1.0", | |
"description": "", | |
"scripts": {}, | |
"author": "", | |
"license": "", | |
"devDependencies": { | |
"grunt-cli": "~0.1.13", | |
"grunt": "~0.4.2", | |
"requirejs": "~2.1.10", | |
"grunt-contrib-requirejs": "~0.4.1", | |
"grunt-contrib-coffee": "~0.10.1", | |
"grunt-contrib-watch": "~0.5.3", | |
"grunt-sass": "~0.6.1" | |
}, | |
"dependencies": { | |
"requirejs": "~2.1.10" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment