forked from FineUploader/fine-uploader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
70 lines (63 loc) · 2.04 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
/* jshint node: true */
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers
/*
Fine Uploader
-------------
Gruntfile
*/
module.exports = function(grunt) {
"use strict";
require("time-grunt")(grunt);
var allBrowsers, async, browsers, configs, fineUploaderModules, fs, name, path, paths, pkg, spawn, tasks, utils, uuid;
fs = require("fs");
uuid = require("uuid");
async = require("async");
path = require("path");
spawn = require("child_process").spawn;
utils = require("./lib/grunt/utils");
configs = require("./lib/grunt/configs");
tasks = "./lib/grunt/tasks";
path = require("path");
pkg = require("./package.json");
paths = {
commonJs: "./lib/commonJs",
dist: path.join("./_dist", pkg.version),
build: "./_build",
src: "./client",
html: "./client/html/templates",
docs: "./docs",
test: "./test"
};
allBrowsers = require("./lib/browsers");
browsers = allBrowsers.browsers;
fineUploaderModules = require("./lib/modules");
grunt.initConfig({
pkg: pkg,
paths: paths,
clean: configs.clean(paths),
compress: configs.compress(paths),
concat: configs.concat(paths),
copy: configs.copy(paths),
cssmin: configs.cssmin(paths),
jshint: configs.jshint(paths),
jscs: configs.jscs(paths),
nodestatic: configs["static"](paths),
aws_s3: configs.s3(paths.dist, paths.build, pkg.version),
shell: configs.shell(paths),
strip_code: configs.stripcode(paths),
uglify: configs.uglify(paths),
usebanner: configs.banner(paths),
version: configs.version(pkg),
watch: configs.watch(paths),
tests: {
local: "./lib/karma/karma-local.conf.js",
travis: "./lib/karma/karma-travis.conf.js"
}
});
for (name in pkg.devDependencies) {
if (name.substring(0, 6) === "grunt-") {
grunt.loadNpmTasks(name);
}
}
grunt.loadTasks(tasks);
};