comparison Gruntfile.js @ 101:13249e5ca51c

Big refactor for better database caching: - Using SQL alchemy instead of raw SQLite. - Better architecture and internal APIs. - Fixed some issues where the database was not used correctly. - Fixed some problems with querying pages. Got rid of `Makefile`, now using `grunt`. Now using a custom `Bootstrap` include file.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 05 Nov 2013 08:13:18 -0800
parents
children cc1f3b81364c
comparison
equal deleted inserted replaced
100:fd6eccb24882 101:13249e5ca51c
1 module.exports = function(grunt) {
2
3 // Project configuration.
4 grunt.initConfig({
5 pkg: grunt.file.readJSON('package.json'),
6 less: {
7 development: {
8 options: {
9 paths: ["static"]
10 },
11 files: {
12 "build/css/wikked.min.css": "static/css/wikked.less"
13 }
14 },
15 production: {
16 options: {
17 paths: ["static"],
18 compress: true
19 },
20 files: {
21 "build/css/wikked.min.css": "static/css/wikked.less"
22 }
23 }
24 },
25 requirejs: {
26 development: {
27 options: {
28 optimize: "none",
29 baseUrl: "static",
30 mainConfigFile: "static/js/wikked.js",
31 name: "js/wikked",
32 out: "build/js/wikked.min.js"
33 }
34 },
35 production: {
36 options: {
37 optimize: "uglify",
38 baseUrl: "static",
39 mainConfigFile: "static/js/wikked.js",
40 name: "js/wikked",
41 out: "build/js/wikked.min.js"
42 }
43 }
44 },
45 imagemin: {
46 all: {
47 files: [
48 {expand: true, cwd: 'static/', dest: 'build/', src: ['img/*.{png,jpg,gif}']}
49 ]
50 }
51 },
52 copy: {
53 images: {
54 files: [
55 {expand: true, cwd: 'static/', dest: 'build/', src: ['img/**']}
56 ]
57 },
58 production: {
59 files: [
60 {expand: true, cwd: 'static/', dest: 'build/', src: ['js/require.js']},
61 {expand: true, cwd: 'static/', dest: 'build/', src: ['css/*.css']},
62 {expand: true, cwd: 'static/', dest: 'build/', src: ['font-awesome/font/**']}
63 ]
64 }
65 },
66 jshint: {
67 all: ['static/js/wikked.js', 'static/js/wikked/**/*.js'],
68 gruntfile: ['Gruntfile.js']
69 },
70 watch: {
71 scripts: {
72 files: ['static/js/**/*.js'],
73 tasks: ['jshint', 'requirejs:development']
74 },
75 templates: {
76 files: ['static/tpl/**/*.html'],
77 tasks: ['requirejs:development']
78 },
79 styles: {
80 files: ['static/css/**/*.less'],
81 tasks: ['less:development']
82 },
83 gruntfile: {
84 files: ['Gruntfile.js'],
85 tasks: ['jshint:gruntfile']
86 }
87 }
88 });
89
90 // Load plugins.
91 grunt.loadNpmTasks('grunt-contrib-less');
92 grunt.loadNpmTasks('grunt-contrib-requirejs');
93 grunt.loadNpmTasks('grunt-contrib-copy');
94 grunt.loadNpmTasks('grunt-contrib-imagemin');
95 grunt.loadNpmTasks('grunt-contrib-jshint');
96 grunt.loadNpmTasks('grunt-contrib-watch');
97
98 // Default task(s).
99 grunt.registerTask('default', ['less:production', 'requirejs:production', 'imagemin:all', 'copy:production']);
100
101 // Other tasks.
102 grunt.registerTask('dev', ['less:development', 'requirejs:development', 'copy:production', 'copy:images']);
103 };
104