comparison Gruntfile.js @ 161:f307d4cdc3fb

Setup Wikked Pypi package: - Moved all assets into `wikked/assets` for proper packaging. - Added `setuptools` stuff.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 10 Jan 2014 23:12:10 -0800
parents ffb505cac9c8
children 81e39ae8aef0
comparison
equal deleted inserted replaced
160:3ef7b9dca1f8 161:f307d4cdc3fb
4 grunt.initConfig({ 4 grunt.initConfig({
5 pkg: grunt.file.readJSON('package.json'), 5 pkg: grunt.file.readJSON('package.json'),
6 less: { 6 less: {
7 development: { 7 development: {
8 options: { 8 options: {
9 paths: ["static"] 9 paths: ["wikked/assets"]
10 }, 10 },
11 files: { 11 files: {
12 "build/css/wikked.min.css": "static/css/wikked.less" 12 "wikked/static/css/wikked.min.css": "wikked/assets/css/wikked.less"
13 } 13 }
14 }, 14 },
15 production: { 15 production: {
16 options: { 16 options: {
17 paths: ["static"], 17 paths: ["wikked/assets"],
18 compress: true 18 compress: true
19 }, 19 },
20 files: { 20 files: {
21 "build/css/wikked.min.css": "static/css/wikked.less" 21 "wikked/static/css/wikked.min.css": "wikked/assets/css/wikked.less"
22 } 22 }
23 } 23 }
24 }, 24 },
25 requirejs: { 25 requirejs: {
26 development: { 26 development: {
27 options: { 27 options: {
28 optimize: "none", 28 optimize: "none",
29 baseUrl: "static", 29 baseUrl: "wikked/assets",
30 mainConfigFile: "static/js/wikked.js", 30 mainConfigFile: "wikked/assets/js/wikked.js",
31 name: "js/wikked", 31 name: "js/wikked",
32 out: "build/js/wikked.min.js" 32 out: "wikked/static/js/wikked.min.js"
33 } 33 }
34 }, 34 },
35 production: { 35 production: {
36 options: { 36 options: {
37 optimize: "uglify", 37 optimize: "uglify",
38 baseUrl: "static", 38 baseUrl: "wikked/assets",
39 mainConfigFile: "static/js/wikked.js", 39 mainConfigFile: "wikked/assets/js/wikked.js",
40 name: "js/wikked", 40 name: "js/wikked",
41 out: "build/js/wikked.min.js" 41 out: "wikked/static/js/wikked.min.js"
42 } 42 }
43 } 43 }
44 }, 44 },
45 imagemin: { 45 imagemin: {
46 all: { 46 all: {
47 files: [ 47 files: [{
48 {expand: true, cwd: 'static/', dest: 'build/', src: ['img/*.{png,jpg,gif}']} 48 expand: true,
49 ] 49 cwd: 'wikked/assets/',
50 dest: 'wikked/static/',
51 src: ['img/*.{png,jpg,gif}']
52 }]
50 } 53 }
51 }, 54 },
52 copy: { 55 copy: {
53 development: { 56 development: {
54 files: [ 57 files: [
55 {expand: true, cwd: 'static/', dest: 'build/', src: ['img/**']}, 58 {expand: true, cwd: 'wikked/assets/', dest: 'wikked/static/', src: ['img/**']},
56 {expand: true, cwd: 'static/', dest: 'build/', src: ['js/**']}, 59 {expand: true, cwd: 'wikked/assets/', dest: 'wikked/static/', src: ['js/**']},
57 {expand: true, cwd: 'static/', dest: 'build/', src: ['tpl/**']}, 60 {expand: true, cwd: 'wikked/assets/', dest: 'wikked/static/', src: ['tpl/**']},
58 {expand: true, cwd: 'static/', dest: 'build/', src: ['bootstrap/js/*.js']} 61 {expand: true, cwd: 'wikked/assets/', dest: 'wikked/static/', src: ['bootstrap/js/*.js']}
59 ] 62 ]
60 }, 63 },
61 dev_scripts: { 64 dev_scripts: {
62 files: [ 65 files: [
63 {expand: true, cwd: 'static/', dest: 'build/', src: ['js/wikked.js', 'js/wikked/**']} 66 {expand: true, cwd: 'wikked/assets/', dest: 'wikked/static/', src: ['js/wikked.js', 'js/wikked/**']}
64 ] 67 ]
65 }, 68 },
66 dev_templates: { 69 dev_templates: {
67 files: [ 70 files: [
68 {expand: true, cwd: 'static/', dest: 'build/', src: ['tpl/**']} 71 {expand: true, cwd: 'wikked/assets/', dest: 'wikked/static/', src: ['tpl/**']}
69 ] 72 ]
70 }, 73 },
71 production: { 74 production: {
72 files: [ 75 files: [
73 {expand: true, cwd: 'static/', dest: 'build/', src: ['js/require.js']}, 76 {expand: true, cwd: 'wikked/assets/', dest: 'wikked/static/', src: ['js/require.js']},
74 {expand: true, cwd: 'static/', dest: 'build/', src: ['font-awesome/font/**']} 77 {expand: true, cwd: 'wikked/assets/', dest: 'wikked/static/', src: ['font-awesome/font/**']}
75 ] 78 ]
76 } 79 }
77 }, 80 },
78 jshint: { 81 jshint: {
79 all: ['static/js/wikked.js', 'static/js/wikked/**/*.js'], 82 all: ['wikked/assets/js/wikked.js', 'wikked/assets/js/wikked/**/*.js'],
80 gruntfile: ['Gruntfile.js'] 83 gruntfile: ['Gruntfile.js']
81 }, 84 },
82 watch: { 85 watch: {
83 scripts: { 86 scripts: {
84 files: ['static/js/wikked.js', 'static/js/wikked/**'], 87 files: ['wikked/assets/js/wikked.js', 'wikked/assets/js/wikked/**'],
85 tasks: ['jshint:all', 'copy:dev_scripts'] 88 tasks: ['jshint:all', 'copy:dev_scripts']
86 }, 89 },
87 templates: { 90 templates: {
88 files: ['static/tpl/**/*.html'], 91 files: ['wikked/assets/tpl/**/*.html'],
89 tasks: ['copy:dev_templates'] 92 tasks: ['copy:dev_templates']
90 }, 93 },
91 styles: { 94 styles: {
92 files: ['static/css/**/*.less'], 95 files: ['wikked/assets/css/**/*.less'],
93 tasks: ['less:development'] 96 tasks: ['less:development']
94 }, 97 },
95 gruntfile: { 98 gruntfile: {
96 files: ['Gruntfile.js'], 99 files: ['Gruntfile.js'],
97 tasks: ['jshint:gruntfile'] 100 tasks: ['jshint:gruntfile']