Commit eacf2451 authored by Roni Choudhury's avatar Roni Choudhury
Browse files

Restructuring files and updating Gruntfile to handle it

parent 495935f9
......@@ -17,7 +17,7 @@ module.exports = function (grunt) {
}
},
files: {
"build/site/index.html": "src/index.jade"
"build/site/index.html": "src/jade/index.jade"
}
},
template: {
......@@ -41,34 +41,39 @@ module.exports = function (grunt) {
}
}
},
uglify: {
index: {
options: {
sourceMap: true
},
files: {
"build/site/index.min.js": [
"src/js/index.js"
]
}
}
},
jshint: {
options: {
jshintrc: ".jshintrc"
},
all: ["Gruntfile.js", "src/**/*.js"]
all: ["Gruntfile.js", "src/js/**/*.js"]
},
jscs: {
options: {
config: ".jscsrc"
},
src: "src/**/*.js"
src: "src/js/**/*.js"
},
copy: {
js: {
static: {
expand: true,
flatten: true,
flatten: false,
cwd: "src/static/",
src: [
"src/index.js"
"**/*"
],
dest: "build/site/"
},
image: {
expand: true,
flatten: true,
src: [
"src/tangelo.svg"
],
dest: "build/site/image/"
}
},
clean: ["build"]
......@@ -77,6 +82,7 @@ module.exports = function (grunt) {
// Load plugins.
grunt.loadNpmTasks("grunt-contrib-jade");
grunt.loadNpmTasks("grunt-contrib-stylus");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-jscs");
grunt.loadNpmTasks("grunt-contrib-copy");
......@@ -85,6 +91,7 @@ module.exports = function (grunt) {
// Default task.
grunt.registerTask("default", ["jade",
"stylus",
"uglify",
"copy",
"jshint",
"jscs"]);
......
......@@ -9,7 +9,7 @@ html
script(src="https://code.jquery.com/jquery-1.11.2.min.js")
script(src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js")
script(src="index.js")
script(src="index.min.js")
body
nav.navbar.navbar-default(role="navigation")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment