diff options
author | Durand D'souza <durand1@gmail.com> | 2016-10-23 08:15:34 +0300 |
---|---|---|
committer | Durand D'souza <durand1@gmail.com> | 2016-10-23 08:15:34 +0300 |
commit | 3ef4dda7043db239872ba9b96268505f24965b6a (patch) | |
tree | 5172c704f593865ba68a460b3983f9b5d8ed2723 /static | |
parent | e5668c2ec3b6cc5ac164c48b09a56974218142f5 (diff) |
Added sample Gruntfile
Added support for site-wide backgrounds
Share links now open in a new window
Navigation menu links now use relative urls where appropriate
On the post list and on individual posts, the date is now hidden if not set.
Updated documentation.
Added a README file
Diffstat (limited to 'static')
-rw-r--r-- | static/Gruntfile.js | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/static/Gruntfile.js b/static/Gruntfile.js new file mode 100644 index 0000000..ad93726 --- /dev/null +++ b/static/Gruntfile.js @@ -0,0 +1,84 @@ +'use strict'; +module.exports = function(grunt) { + + grunt.initConfig({ + jshint: { + options: { + jshintrc: '.jshintrc' + }, + all: [ + 'Gruntfile.js', + '!assets/js/*.js', + '!assets/js/plugins/*.js', + '!assets/js/scripts.min.js' + ] + }, + uglify: { + dist: { + files: { + 'assets/js/scripts.min.js': [ + 'assets/js/plugins/*.js', + 'assets/js/_*.js' + ] + } + } + }, + imagemin: { + dist: { + options: { + optimizationLevel: 7, + progressive: true + }, + files: [{ + expand: true, + cwd: 'images/', + src: '{,*/}*.{png,jpg,jpeg}', + dest: 'images/' + }] + } + }, + svgmin: { + dist: { + files: [{ + expand: true, + cwd: 'images/', + src: '{,*/}*.svg', + dest: 'images/' + }] + } + }, + watch: { + js: { + files: [ + '<%= jshint.all %>' + ], + tasks: ['jshint','uglify'] + } + }, + clean: { + dist: [ + 'assets/js/scripts.min.js' + ] + } + }); + + // Load tasks + grunt.loadNpmTasks('grunt-contrib-clean'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-contrib-imagemin'); + grunt.loadNpmTasks('grunt-svgmin'); + + // Register tasks + grunt.registerTask('default', [ + 'clean', + 'uglify', + 'imagemin', + 'svgmin' + ]); + grunt.registerTask('dev', [ + 'watch' + ]); + +};
\ No newline at end of file |