-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from ecaldwell/master
Major app overhaul
- Loading branch information
Showing
48 changed files
with
1,096 additions
and
18,753 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
*.DS_Store | ||
/node_modules | ||
/build | ||
/build | ||
*.geojson | ||
|
||
# Ignore build files | ||
src/js/*.min.js | ||
src/js/portal/*.min.js | ||
build.zip |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/*global module:false*/ | ||
module.exports = function (grunt) { | ||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
// Metadata. | ||
pkg: grunt.file.readJSON('package.json'), | ||
// Task configuration. | ||
clean: { | ||
// Clean up build files. | ||
src: ['src/js/portal/*.min.js', 'src/js/main.min.js'], | ||
build: ['build/**'] | ||
}, | ||
jshint: { | ||
// Validate the javascripts. | ||
all: ['Gruntfile.js', 'src/js/*.js', 'src/js/portal/*.js'] | ||
}, | ||
concat: { | ||
// Combine files where it makes sense. | ||
options: { | ||
separator: ';' | ||
}, | ||
build_index: { | ||
src: ['src/index.html', 'src/templates.html'], | ||
dest: 'build/index.html' | ||
} | ||
}, | ||
uglify: { | ||
// Minify the javascript files. | ||
options: { | ||
banner: '/*! <%= pkg.name %> <%= pkg.version %> */\n' | ||
}, | ||
build: { | ||
files: { | ||
'src/js/main.min.js': 'src/js/main.js', | ||
'src/js/portal/portal.min.js': 'src/js/portal/portal.js', | ||
'src/js/portal/util.min.js': 'src/js/portal/util.js' | ||
} | ||
} | ||
}, | ||
copy: { | ||
// Copy everything to the build directory for testing. | ||
main: { | ||
files: [ | ||
{expand: true, cwd: 'src/', src: ['*.html'], dest: 'build/'}, | ||
{expand: true, cwd: 'src/', src: ['assets/**'], dest: 'build/'}, | ||
{expand: true, cwd: 'src/', src: ['css/**'], dest: 'build/'}, | ||
{expand: true, cwd: 'src/', src: ['js/*'], dest: 'build/', | ||
rename: function(src, dest) { | ||
return src + dest.replace('.min', ''); | ||
} | ||
}, | ||
{expand: true, cwd: 'src/', src: 'js/portal/*', dest: 'build/', | ||
rename: function(src, dest) { | ||
return src + dest.replace('.min', ''); | ||
} | ||
}, | ||
{expand: true, cwd: 'src/', src: ['js/lib/**'], dest: 'build/'} | ||
] | ||
} | ||
}, | ||
}); | ||
|
||
// These plugins provide necessary tasks. | ||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-contrib-copy'); | ||
|
||
// Default task. | ||
grunt.registerTask('default', ['clean', 'jshint', 'concat', 'uglify', 'copy']); | ||
grunt.registerTask('cleanup', ['clean']); | ||
|
||
}; |
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.