forked from kamicane/moofx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
distribute
executable file
·48 lines (36 loc) · 1.31 KB
/
distribute
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
#!/usr/bin/env node
var wrup = require("wrapup")(),
fs = require("fs"),
json = require("./package")
console.warn("")
console.warn(" .- " + json.version)
console.warn(" .-.-..-..-.-|-._.")
console.warn(" ' ' '`-'`-' ' ' '\n")
var header = "/*\n\
---\n\
provides: moofx\n\
version: " + json.version + "\n\
description: A CSS3-enabled javascript animation library\n\
homepage: http://moofx.it\n\
author: Valerio Proietti <@kamicane> (http://mad4milk.net)\n\
license: MIT (http://mootools.net/license.txt)\n\
includes: cubic-bezier by Arian Stolwijk (https://github.com/arian/cubic-bezier)\n\
...\n\
*/\n\n"
var args = process.argv.slice(2)
var wrupit = function(){
wrup.options({output: "./moofx.js", watch: args.indexOf("--watch") > -1, compress: true})
wrup.exclude("array.isArray", "array.every", "array.some", "array.filter",
"string.contains", "string.number", "string.escape", "string.decode",
"fixEnumBug")
if (args.indexOf("--css3") > -1) wrup.exclude("css3")
wrup.require("moofx", "./")
wrup.on("end", function(js){
var contents = fs.readFileSync("./moofx.js")
contents = header + contents;
fs.writeFileSync("./moofx.js", contents, "utf-8")
console.log(" written ./moofx.js\n")
})
wrup.up()
}
wrupit()