forked from zynga/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjasyscript.py
56 lines (37 loc) · 1.35 KB
/
jasyscript.py
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
# Core - JavaScript Foundation
# Copyright 2010-2012 Zynga Inc.
session.permutateField("es5")
session.permutateField("debug")
@task
def clean():
"""Clear build cache"""
session.clean()
@task
def distclean():
"""Clears caches and build results"""
session.clean()
removeDir("api")
removeDir("dist")
@task(prefix="dist")
def module():
"""Build module.js"""
for permutation in session.permutate():
resolver = Resolver().addClassName("core.Module")
storeCompressed(resolver.getSortedClasses(), "module-%s.js" % permutation.getChecksum())
@task(prefix="dist")
def oo():
"""Build oo.js"""
for permutation in session.permutate():
resolver = Resolver().addClassName("core.Module").addClassName("core.Class")
storeCompressed(resolver.getSortedClasses(), "oo-%s.js" % permutation.getChecksum())
@task(prefix="dist")
def sugar():
"""Build sugar.js"""
for permutation in session.permutate():
resolver = Resolver()
resolver.addClassName("ext.sugar.Array")
resolver.addClassName("ext.sugar.Function")
resolver.addClassName("ext.sugar.Number")
resolver.addClassName("ext.sugar.Object")
resolver.addClassName("ext.sugar.String")
storeCompressed(resolver.getSortedClasses(), "sugar-%s.js" % permutation.getChecksum())