forked from emmetio/emmet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
197 lines (170 loc) · 6.09 KB
/
build.xml
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<?xml version="1.0" encoding="utf-8"?>
<project name="Zen Coding" default="main" basedir=".">
<property file="build.properties"/>
<import file="${basedir}/build/resources.xml"/>
<taskdef resource="org/apache/tools/ant/taskdefs/default.properties">
<classpath>
<pathelement location="${builder.dir}/frontend-builder.jar" />
<pathelement location="${builder.dir}/compiler.jar"/>
<pathelement location="${builder.dir}/yuicompressor.jar"/>
</classpath>
</taskdef>
<target name="init">
<mkdir dir="${zencoding_build_dir}"/>
<mkdir dir="${zencoding_plugins}"/>
</target>
<target name="plugin.generic" depends="init">
<concat destfile="${zencoding_build_dir}/zencoding.js" force="yes">
<filelist refid="javascript.core" />
<filelist refid="javascript.actions" />
<fileset refid="javascript.resolvers" />
<fileset refid="javascript.filters" />
<fileset refid="javascript.generators" />
</concat>
</target>
<target name="plugin.generic-full" depends="plugin.generic">
<concat destfile="${zencoding_build_dir}/zencoding-full.js" force="yes">
<filelist dir="${zencoding_build_dir}">
<file name="zencoding.js"/>
</filelist>
<filelist dir="${zencoding_javascript}/actions">
<file name="selectLine.js"/>
</filelist>
<string>zen_coding.require('resources').setVocabulary(</string>
<fileset dir="${basedir}" file="snippets.json"/>
<string>, 'system');</string>
</concat>
</target>
<!-- CodeMirror2 plugin -->
<target name="plugin.codemirror2" depends="plugin.generic-full" description="Plugin for CodeMirror2 editor">
<mkdir dir="${zencoding_build_dir}/CodeMirror2"/>
<concat destfile="${zencoding_build_dir}/CodeMirror2/zencoding.js">
<filelist dir="${zencoding_build_dir}">
<file name="zencoding-full.js"/>
</filelist>
<filelist dir="${zencoding_plugins_source}/codemirror2">
<file name="editor.js"/>
</filelist>
</concat>
<compile-js destfile="${zencoding_build_dir}/CodeMirror2/zencoding.min.js">
<filelist dir="${zencoding_build_dir}/CodeMirror2">
<file name="zencoding.js"/>
</filelist>
</compile-js>
<copy
file="${zencoding_plugins_source}/codemirror2/README.md"
todir="${zencoding_build_dir}/CodeMirror2"/>
<zip
basedir="${zencoding_build_dir}/CodeMirror2"
compress="yes"
level="9"
destfile="${zencoding_build_dir}/CodeMirror2/ZenCoding-CodeMirror2-v${zencoding_version}-alpha.zip"
excludes="*.zip"/>
</target>
<!-- Plugn for Komodo Edit -->
<target name="plugin.komodo" depends="plugin.generic-full">
<mkdir dir="${zencoding_build_dir}/komodo"/>
<copy todir="${zencoding_build_dir}/komodo">
<fileset dir="${zencoding_plugins_source}/komodo"/>
<filterchain>
<replacetokens>
<token key="VERSION" value="${zencoding_version}"/>
</replacetokens>
</filterchain>
</copy>
<copy
file="${zencoding_build_dir}/zencoding-full.js"
tofile="${zencoding_build_dir}/komodo/content/js/zencoding.js" />
<exec dir="${zencoding_build_dir}/komodo" executable="/Applications/Komodo Edit.app/Contents/SharedSupport/sdk/bin/koext">
<arg value="build"/>
</exec>
</target>
<!-- Plugn for PSPad -->
<target name="plugin.pspad" depends="plugin.generic-full">
<mkdir dir="${zencoding_build_dir}/pspad"/>
<concat destfile="${zencoding_build_dir}/pspad/zencoding.js">
<filelist dir="${zencoding_plugins_source}/pspad">
<file name="controller.js"/>
</filelist>
<filelist dir="${zencoding_build_dir}">
<file name="zencoding-full.js"/>
</filelist>
<filelist dir="${zencoding_plugins_source}/pspad">
<file name="editor.js"/>
</filelist>
<filterchain>
<replacetokens>
<token key="VERSION" value="${zencoding_version}"/>
</replacetokens>
</filterchain>
</concat>
</target>
<!-- Plugn for textarea -->
<target name="plugin.textarea" depends="plugin.generic-full">
<mkdir dir="${zencoding_build_dir}/textarea"/>
<concat destfile="${zencoding_build_dir}/textarea/zencoding.js">
<filelist dir="${zencoding_build_dir}">
<file name="zencoding-full.js"/>
</filelist>
<filelist dir="${zencoding_plugins_source}/textarea">
<file name="shortcut.js"/>
<file name="editor.js"/>
<file name="controller.js"/>
</filelist>
</concat>
<compile-js destfile="${zencoding_build_dir}/textarea/zencoding.min.js">
<filelist dir="${zencoding_build_dir}/textarea">
<file name="zencoding.js"/>
</filelist>
</compile-js>
<copy todir="${zencoding_build_dir}/textarea">
<filelist dir="${zencoding_plugins_source}/textarea">
<file name="index.html"></file>
<file name="zc-powered.png"></file>
</filelist>
</copy>
<zip
basedir="${zencoding_build_dir}/textarea"
compress="yes"
level="9"
destfile="${zencoding_build_dir}/textarea/ZenCoding-textarea-v${zencoding_version}-alpha.zip"
excludes="*.zip"/>
</target>
<!-- Plugn for Notepad++ -->
<target name="plugin.npp" depends="plugin.generic">
<mkdir dir="${zencoding_build_dir}/npp"/>
<copy todir="${zencoding_build_dir}/npp">
<fileset dir="${zencoding_plugins_source}/npp/contrib"/>
<filelist dir="${zencoding_plugins_source}/npp">
<file name="README.md"/>
</filelist>
</copy>
<mkdir dir="${zencoding_build_dir}/npp/jN/includes"/>
<copy todir="${zencoding_build_dir}/npp/jN/includes">
<fileset dir="${zencoding_plugins_source}/npp" includes="*.json"/>
<filelist dir="${basedir}">
<file name="snippets.json"/>
</filelist>
</copy>
<concat destfile="${zencoding_build_dir}/npp/jN/includes/zencoding.js">
<filelist dir="${zencoding_build_dir}">
<file name="zencoding.js"/>
</filelist>
<filelist dir="${zencoding_plugins_source}/npp">
<file name="file.js"/>
<file name="editor.js"/>
<file name="bootstrap.js"/>
</filelist>
</concat>
<zip
basedir="${zencoding_build_dir}/npp"
compress="yes"
level="9"
destfile="${zencoding_build_dir}/npp/ZenCoding-NotepadPlusPlus-v${zencoding_version}.zip"
excludes="*.zip"/>
</target>
<!-- Main build routine -->
<target name="main" depends="plugin.generic, plugin.codemirror2">
<echo>Done</echo>
</target>
</project>