-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
120 lines (114 loc) · 2.82 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
var _contains = function( needle, haystack ){
return ( haystack.indexOf(needle) > -1 );
}
/**
* @todo impliment grunt compress
*/
module.exports = function(grunt) {
var destDir = '../../../../artdroid/';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
buildTheme: {},
copy: {
main: {
src: './**',
dest: destDir,
flatten: false,
filter: 'isFile',
options: {
/*
process: function (content, srcpath) {
if( _contains( 'page', srcpath ) )
return '';
else
return content;
},
*/
},
},
},
cleanupTheme:{
theme:[]
},
clean:{
options:{
force: true,
},
theme:[
destDir + 'node_modules',
destDir + '/**/*.md',
destDir + '/**/*.psd',
destDir + '/**/docs/',
destDir + '/**/.DS_Store',
destDir + '/**/.ds_store',
destDir + '/**/.git',
destDir + '/**/.gitignore',
destDir + '/**/.gitmodules',
destDir + '/**/.gitattributes',
destDir + '/**/makefile',
destDir + '/**/composer.json',
destDir + '/**/Gruntfile.js',
destDir + '/**/package.json',
destDir + '/**/bower.json',
destDir + '/**/conf.json',
destDir + '/**/.editorconfig',
destDir + '/**/.scrutinizer.yml',
destDir + '/**/.travis.yml',
destDir + '/**/.npmignore',
destDir + '/**/.bin',
destDir + '/**/.jshintrc',
destDir + '/**/.eslintrc',
destDir + '/**/.zuul.yml',
destDir + '/**/.eslintrc',
destDir + '/**/.istanbul.yml',
destDir + '/**/.php_cs',
destDir + '/**/.bowerrc',
destDir + '/**/.documentup.json',
destDir + '/**/.hidden',
destDir + '/**/.hidden.txt',
destDir + '/**/.bower.json',
destDir + '/**/.tern-project',
destDir + '/**/.target.mk',
destDir + '/**/.deps',
destDir + '/**/.node.d',
destDir + '/**/.node',
destDir + '/**/.dntrc',
],
postworld:[
destDir + 'postworld/_archive',
destDir + 'postworld/dev',
destDir + 'postworld/docs',
destDir + 'postworld/log',
destDir + 'postworld/node_modules',
destDir + 'postworld/**/angular-scenario.js',
destDir + 'postworld/**/tests/',
destDir + 'postworld/**/pwSiteGlobals.js',
destDir + 'postworld/**/pwAdminGlobals.js',
]
},
// make a zipfile
/**
* Not functional, @todo test and make it work.
*/
compress: {
main: {
options: {
archive: 'artdroid.zip'
},
files: [
{ // includes files in path and its subdirs
src: [ destDir ],
dest: destDir+'../'
},
]
}
},
});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask( 'default', ['copy', 'clean','cleanupTheme'] );
grunt.registerMultiTask('cleanupTheme', 'Cleans up the theme.', function() {
grunt.log.writeln('ARTDROID : Finished Cleanup');
});
grunt.loadNpmTasks('grunt-contrib-compress');
};