added ant-build-file
bfadmin-master

bfadmin-master commited on 2016-04-27 17:39:22
Zeige 2 geänderte Dateien mit 105 Einfügungen und 0 Löschungen.

... ...
@@ -0,0 +1,101 @@
1
+<project name="fs-draft" default="build">
2
+	<property name="dir.source" value="source">
3
+	</property>
4
+	<property name="dir.source.structure" value="${dir.source}/structure">
5
+	</property>
6
+	<property name="dir.source.style" value="${dir.source}/style">
7
+	</property>
8
+	<property name="dir.source.logic" value="${dir.source}/logic">
9
+	</property>
10
+	<property name="dir.source.logic.server" value="${dir.source.logic}/server">
11
+	</property>
12
+	<property name="dir.source.logic.client" value="${dir.source.logic}/client">
13
+	</property>
14
+	<property name="dir.temp" value="temp">
15
+	</property>
16
+	<property name="dir.build" value="build">
17
+	</property>
18
+	<property name="cmd.php" value="php">
19
+	</property>
20
+	<property name="cmd.lessc" value="lessc">
21
+	</property>
22
+	<target name="build" depends="build-structure,build-style,build-logic,build-media">
23
+	</target>
24
+	<target name="build-structure">
25
+		<mkdir dir="${dir.build}">
26
+		</mkdir>
27
+		<exec executable="${cmd.php}" output="${dir.build}/draft.html">
28
+			<arg value="${dir.source.structure}/draft.html.php">
29
+			</arg>
30
+		</exec>
31
+	</target>
32
+	<target name="build-style">
33
+		<mkdir dir="${dir.temp}">
34
+		</mkdir>
35
+		<concat destfile="${dir.temp}/draft.less">
36
+			<filelist dir=".">
37
+				<file name="${dir.source.style}/functions.less">
38
+				</file>
39
+			 	<file name="${dir.source.style}/theme.less">
40
+				</file>
41
+			 	<file name="${dir.source.style}/common.less">
42
+				</file>
43
+			 	<file name="${dir.source.style}/concrete.less">
44
+				</file>
45
+			</filelist>
46
+		</concat>
47
+		<mkdir dir="${dir.build}">
48
+		</mkdir>
49
+		<exec executable="${cmd.lessc}">
50
+			<arg value="${dir.temp}/draft.less">
51
+			</arg>
52
+			<arg value="${dir.build}/draft.css">
53
+			</arg>
54
+		</exec>
55
+	</target>
56
+	<target name="build-logic">
57
+		<mkdir dir="${dir.build}">
58
+		</mkdir>
59
+		<concat destfile="${dir.build}/draft.js">
60
+			<filelist dir=".">
61
+				<file name="${dir.source.logic.client}/tools.js">
62
+				</file>
63
+				<file name="${dir.source.logic.client}/table.js">
64
+				</file>
65
+				<file name="${dir.source.logic.client}/toc.js">
66
+				</file>
67
+				<file name="${dir.source.logic.client}/main.js">
68
+				</file>
69
+			</filelist>
70
+		</concat>
71
+	</target>
72
+	<target name="build-media">
73
+		<mkdir dir="${dir.build}">
74
+		</mkdir>
75
+		<copy file="${dir.source.media}/logo.svg" tofile="${dir.build}/logo.svg">
76
+		</copy>
77
+		<copy file="${dir.source.media}/folksprak_16x16.png" tofile="${dir.build}/favicon.png">
78
+		</copy>
79
+	</target>
80
+	<target name="clean">
81
+		<delete dir="${dir.temp}">
82
+		</delete>
83
+	</target>
84
+	<target name="clear" depends="clean,clear-structure,clear-style,clear-logic">
85
+		<delete dir="${dir.build}">
86
+		</delete>
87
+	</target>
88
+	<target name="clear-structure">
89
+		<delete file="${dir.build}/draft.html">
90
+		</delete>
91
+	</target>
92
+	<target name="clear-style">
93
+		<delete file="${dir.build}/draft.css">
94
+		</delete>
95
+	</target>
96
+	<target name="clear-logic">
97
+		<delete file="${dir.build}/draft.js">
98
+		</delete>
99
+	</target>
100
+</project>
101
+
... ...
@@ -0,0 +1,4 @@
1
+#!/bin/bash
2
+
3
+tar --directory build --create --xz . --file draft.tar.xz
4
+
0 5