##// END OF EJS Templates
front-end: Use the existing bootstrap.js from node_modules and stop bundling Bootstrap
Mads Kiilerich -
r7382:585dee5e default
parent child Browse files
Show More
@@ -1,37 +1,38 b''
1 syntax: glob
1 syntax: glob
2 *.pyc
2 *.pyc
3 *.swp
3 *.swp
4 *.sqlite
4 *.sqlite
5 *.tox
5 *.tox
6 *.egg-info
6 *.egg-info
7 *.egg
7 *.egg
8 *.mo
8 *.mo
9 .eggs/
9 .eggs/
10 tarballcache/
10 tarballcache/
11
11
12 syntax: regexp
12 syntax: regexp
13 ^rcextensions
13 ^rcextensions
14 ^build
14 ^build
15 ^dist/
15 ^dist/
16 ^docs/build/
16 ^docs/build/
17 ^docs/_build/
17 ^docs/_build/
18 ^data$
18 ^data$
19 ^sql_dumps/
19 ^sql_dumps/
20 ^\.settings$
20 ^\.settings$
21 ^\.project$
21 ^\.project$
22 ^\.pydevproject$
22 ^\.pydevproject$
23 ^\.coverage$
23 ^\.coverage$
24 ^kallithea/front-end/node_modules$
24 ^kallithea/front-end/node_modules$
25 ^kallithea/front-end/package-lock\.json$
25 ^kallithea/front-end/package-lock\.json$
26 ^kallithea/front-end/tmp$
26 ^kallithea/front-end/tmp$
27 ^kallithea/public/css/style\.css(\.map)?$
27 ^kallithea/public/css/style\.css(\.map)?$
28 ^kallithea/public/js/bootstrap\.js$
28 ^theme\.less$
29 ^theme\.less$
29 ^kallithea\.db$
30 ^kallithea\.db$
30 ^test\.db$
31 ^test\.db$
31 ^Kallithea\.egg-info$
32 ^Kallithea\.egg-info$
32 ^my\.ini$
33 ^my\.ini$
33 ^fabfile.py
34 ^fabfile.py
34 ^\.idea$
35 ^\.idea$
35 ^\.cache$
36 ^\.cache$
36 ^\.pytest_cache$
37 ^\.pytest_cache$
37 /__pycache__$
38 /__pycache__$
@@ -1,302 +1,302 b''
1 Kallithea License
1 Kallithea License
2 =================
2 =================
3
3
4 Kallithea as a whole is copyrighted by various authors and is licensed under
4 Kallithea as a whole is copyrighted by various authors and is licensed under
5 the terms of the GNU General Public License, version 3 (GPLv3), which is a
5 the terms of the GNU General Public License, version 3 (GPLv3), which is a
6 license published by the Free Software Foundation,
6 license published by the Free Software Foundation,
7 Inc. [A copy of GPLv3](/COPYING) is included herein.
7 Inc. [A copy of GPLv3](/COPYING) is included herein.
8
8
9 Some individual files have copyright notices and those who offer changes to
9 Some individual files have copyright notices and those who offer changes to
10 those files should update the copyright notices in those specific files if
10 those files should update the copyright notices in those specific files if
11 they so chose.
11 they so chose.
12
12
13 However, the definitive list of copyright holders for this project is kept in
13 However, the definitive list of copyright holders for this project is kept in
14 [the about page template](kallithea/templates/about.html) so that it is
14 [the about page template](kallithea/templates/about.html) so that it is
15 displayed appropriately when Kallithea is installed. This is the most
15 displayed appropriately when Kallithea is installed. This is the most
16 important place to update copyright notices.
16 important place to update copyright notices.
17
17
18 Third-Party Code Incorporated in Kallithea
18 Third-Party Code Incorporated in Kallithea
19 ==========================================
19 ==========================================
20
20
21 Various third-party code under GPLv3-compatible licenses is included as part
21 Various third-party code under GPLv3-compatible licenses is included as part
22 of Kallithea.
22 of Kallithea.
23
23
24
24
25 Alembic
25 Alembic
26 -------
26 -------
27
27
28 Kallithea incorporates an [Alembic](http://alembic.zzzcomputing.com/en/latest/)
28 Kallithea incorporates an [Alembic](http://alembic.zzzcomputing.com/en/latest/)
29 "migration environment" in `kallithea/alembic`, portions of which is:
29 "migration environment" in `kallithea/alembic`, portions of which is:
30
30
31 Copyright © 2009-2016 by Michael Bayer.
31 Copyright © 2009-2016 by Michael Bayer.
32 Alembic is a trademark of Michael Bayer.
32 Alembic is a trademark of Michael Bayer.
33
33
34 and licensed under the MIT-permissive license, which is
34 and licensed under the MIT-permissive license, which is
35 [included in this distribution](MIT-Permissive-License.txt).
35 [included in this distribution](MIT-Permissive-License.txt).
36
36
37
37
38 Bootstrap
38 Bootstrap
39 ---------
39 ---------
40
40
41 Kallithea incorporates the web framework called
41 Kallithea uses the web framework called
42 [Bootstrap](http://getbootstrap.com/), which is:
42 [Bootstrap](http://getbootstrap.com/), which is:
43
43
44 Copyright © 2011-2016 Twitter, Inc.
44 Copyright © 2011-2016 Twitter, Inc.
45
45
46 and licensed under the MIT-permissive license, which is
46 and licensed under the MIT-permissive license, which is
47 [included in this distribution](MIT-Permissive-License.txt),
47 [included in this distribution](MIT-Permissive-License.txt).
48 which can be found together with its Corresponding Source in
48
49 https://github.com/twbs/bootstrap at tag v3.3.7 (mirrored at
49 It is not distributed with Kallithea, but will be downloaded
50 https://kallithea-scm.org/repos/mirror/bootstrap/ ).
50 using the ''kallithea-cli front-end-build'' command.
51
51
52
52
53
53
54 Codemirror
54 Codemirror
55 ----------
55 ----------
56
56
57 Kallithea incorporates parts of the Javascript system called
57 Kallithea incorporates parts of the Javascript system called
58 [Codemirror](http://codemirror.net/), version 4.7.0, which is primarily:
58 [Codemirror](http://codemirror.net/), version 4.7.0, which is primarily:
59
59
60 Copyright &copy; 2013-2014 by Marijn Haverbeke <marijnh@gmail.com>
60 Copyright &copy; 2013-2014 by Marijn Haverbeke <marijnh@gmail.com>
61
61
62 and licensed under the MIT-permissive license, which is
62 and licensed under the MIT-permissive license, which is
63 [included in this distribution](MIT-Permissive-License.txt).
63 [included in this distribution](MIT-Permissive-License.txt).
64
64
65 Additional files from upstream Codemirror are copyrighted by various authors
65 Additional files from upstream Codemirror are copyrighted by various authors
66 and licensed under other permissive licenses. The sub-directories under
66 and licensed under other permissive licenses. The sub-directories under
67 [.../public/codemirror](kallithea/public/codemirror) include the copyright and
67 [.../public/codemirror](kallithea/public/codemirror) include the copyright and
68 license notice and information as they appeared in Codemirror's upstream
68 license notice and information as they appeared in Codemirror's upstream
69 release.
69 release.
70
70
71
71
72
72
73 jQuery
73 jQuery
74 ------
74 ------
75
75
76 Kallithea incorporates the Javascript system called
76 Kallithea incorporates the Javascript system called
77 [jQuery](http://jquery.org/), [herein](kallithea/public/js/jquery.min.js),
77 [jQuery](http://jquery.org/), [herein](kallithea/public/js/jquery.min.js),
78 which can be found together with its Corresponding Source in
78 which can be found together with its Corresponding Source in
79 https://github.com/jquery/jquery at tag 1.12.3 (mirrored at
79 https://github.com/jquery/jquery at tag 1.12.3 (mirrored at
80 https://kallithea-scm.org/repos/mirror/jquery/files/1.12.3/ ).
80 https://kallithea-scm.org/repos/mirror/jquery/files/1.12.3/ ).
81
81
82 It is Copyright 2013 jQuery Foundation and other contributors http://jquery.com/ and is under an
82 It is Copyright 2013 jQuery Foundation and other contributors http://jquery.com/ and is under an
83 [MIT-permissive license](MIT-Permissive-License.txt).
83 [MIT-permissive license](MIT-Permissive-License.txt).
84
84
85
85
86
86
87 DataTables
87 DataTables
88 ----------
88 ----------
89
89
90 Kallithea incorporates the Javascript system called
90 Kallithea incorporates the Javascript system called
91 [DataTables](http://www.datatables.net/)
91 [DataTables](http://www.datatables.net/)
92 which can be found together with their Corresponding Source in
92 which can be found together with their Corresponding Source in
93 https://github.com/DataTables/DataTables at tag 1.10.13 (mirrored at
93 https://github.com/DataTables/DataTables at tag 1.10.13 (mirrored at
94 https://kallithea-scm.org/repos/mirror/DataTables/files/1.10.13/ ).
94 https://kallithea-scm.org/repos/mirror/DataTables/files/1.10.13/ ).
95
95
96 It is Copyright 2008-2015 SpryMedia Ltd. and is under an
96 It is Copyright 2008-2015 SpryMedia Ltd. and is under an
97 [MIT-permissive license](MIT-Permissive-License.txt).
97 [MIT-permissive license](MIT-Permissive-License.txt).
98
98
99
99
100
100
101 Mergely
101 Mergely
102 -------
102 -------
103
103
104 Kallithea incorporates some code from the Javascript system called
104 Kallithea incorporates some code from the Javascript system called
105 [Mergely](http://www.mergely.com/), version 3.3.9.
105 [Mergely](http://www.mergely.com/), version 3.3.9.
106 [Mergely's license](http://www.mergely.com/license.php), a
106 [Mergely's license](http://www.mergely.com/license.php), a
107 [copy of which is included in this repository](LICENSE-MERGELY.html),
107 [copy of which is included in this repository](LICENSE-MERGELY.html),
108 is (GPL|LGPL|MPL). Kallithea as GPLv3'd project chooses the GPL arm of that
108 is (GPL|LGPL|MPL). Kallithea as GPLv3'd project chooses the GPL arm of that
109 tri-license.
109 tri-license.
110
110
111
111
112
112
113 Select2
113 Select2
114 -------
114 -------
115
115
116 Kallithea incorporates parts of the Javascript system called
116 Kallithea incorporates parts of the Javascript system called
117 [Select2](http://ivaynberg.github.io/select2/), which is:
117 [Select2](http://ivaynberg.github.io/select2/), which is:
118
118
119 Copyright 2012 Igor Vaynberg (and probably others)
119 Copyright 2012 Igor Vaynberg (and probably others)
120
120
121 and is licensed [under the following license](https://github.com/ivaynberg/select2/blob/master/LICENSE):
121 and is licensed [under the following license](https://github.com/ivaynberg/select2/blob/master/LICENSE):
122
122
123 > This software is licensed under the Apache License, Version 2.0 (the
123 > This software is licensed under the Apache License, Version 2.0 (the
124 > "Apache License") or the GNU General Public License version 2 (the "GPL
124 > "Apache License") or the GNU General Public License version 2 (the "GPL
125 > License"). You may choose either license to govern your use of this
125 > License"). You may choose either license to govern your use of this
126 > software only upon the condition that you accept all of the terms of either
126 > software only upon the condition that you accept all of the terms of either
127 > the Apache License or the GPL License.
127 > the Apache License or the GPL License.
128
128
129 A [copy of the Apache License 2.0](Apache-License-2.0.txt) is also included
129 A [copy of the Apache License 2.0](Apache-License-2.0.txt) is also included
130 in this distribution.
130 in this distribution.
131
131
132 Kallithea will take the Apache license fork of the dual license, since
132 Kallithea will take the Apache license fork of the dual license, since
133 Kallithea is GPLv3'd.
133 Kallithea is GPLv3'd.
134
134
135
135
136
136
137 Select2-Bootstrap-CSS
137 Select2-Bootstrap-CSS
138 ---------------------
138 ---------------------
139
139
140 Kallithea incorporates some CSS from a system called
140 Kallithea incorporates some CSS from a system called
141 [Select2-bootstrap-css](https://github.com/t0m/select2-bootstrap-css), which
141 [Select2-bootstrap-css](https://github.com/t0m/select2-bootstrap-css), which
142 is:
142 is:
143
143
144 Copyright &copy; 2013 Tom Terrace (and likely others)
144 Copyright &copy; 2013 Tom Terrace (and likely others)
145
145
146 and licensed under the MIT-permissive license, which is
146 and licensed under the MIT-permissive license, which is
147 [included in this distribution](MIT-Permissive-License.txt).
147 [included in this distribution](MIT-Permissive-License.txt).
148
148
149
149
150
150
151 History.js
151 History.js
152 ----------
152 ----------
153
153
154 Kallithea incorporates some CSS from a system called History.js, which is
154 Kallithea incorporates some CSS from a system called History.js, which is
155
155
156 Copyright 2010-2011 Benjamin Arthur Lupton <contact@balupton.com>
156 Copyright 2010-2011 Benjamin Arthur Lupton <contact@balupton.com>
157
157
158 Redistribution and use in source and binary forms, with or without
158 Redistribution and use in source and binary forms, with or without
159 modification, are permitted provided that the following conditions are met:
159 modification, are permitted provided that the following conditions are met:
160
160
161 1. Redistributions of source code must retain the above copyright notice,
161 1. Redistributions of source code must retain the above copyright notice,
162 this list of conditions and the following disclaimer.
162 this list of conditions and the following disclaimer.
163
163
164 2. Redistributions in binary form must reproduce the above copyright notice,
164 2. Redistributions in binary form must reproduce the above copyright notice,
165 this list of conditions and the following disclaimer in the documentation
165 this list of conditions and the following disclaimer in the documentation
166 and/or other materials provided with the distribution.
166 and/or other materials provided with the distribution.
167
167
168 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
168 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
169 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
169 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
170 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
170 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
171 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
171 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
172 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
172 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
173 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
173 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
174 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
174 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
175 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
175 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
176 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
176 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
177 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
177 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
178 POSSIBILITY OF SUCH DAMAGE.
178 POSSIBILITY OF SUCH DAMAGE.
179
179
180
180
181
181
182 YUI
182 YUI
183 ---
183 ---
184
184
185 Kallithea incorporates parts of the Javascript system called
185 Kallithea incorporates parts of the Javascript system called
186 [YUI 2 — Yahoo! User Interface Library](http://yui.github.io/yui2/docs/yui_2.9.0_full/),
186 [YUI 2 — Yahoo! User Interface Library](http://yui.github.io/yui2/docs/yui_2.9.0_full/),
187 which is made available under the [BSD License](http://yuilibrary.com/license/):
187 which is made available under the [BSD License](http://yuilibrary.com/license/):
188
188
189 Copyright &copy; 2013 Yahoo! Inc. All rights reserved.
189 Copyright &copy; 2013 Yahoo! Inc. All rights reserved.
190
190
191 Redistribution and use of this software in source and binary forms, with or
191 Redistribution and use of this software in source and binary forms, with or
192 without modification, are permitted provided that the following conditions are
192 without modification, are permitted provided that the following conditions are
193 met:
193 met:
194
194
195 * Redistributions of source code must retain the above copyright notice, this
195 * Redistributions of source code must retain the above copyright notice, this
196 list of conditions and the following disclaimer.
196 list of conditions and the following disclaimer.
197
197
198 * Redistributions in binary form must reproduce the above copyright notice,
198 * Redistributions in binary form must reproduce the above copyright notice,
199 this list of conditions and the following disclaimer in the documentation
199 this list of conditions and the following disclaimer in the documentation
200 and/or other materials provided with the distribution.
200 and/or other materials provided with the distribution.
201
201
202 * Neither the name of Yahoo! Inc. nor the names of YUI's contributors may be
202 * Neither the name of Yahoo! Inc. nor the names of YUI's contributors may be
203 used to endorse or promote products derived from this software without
203 used to endorse or promote products derived from this software without
204 specific prior written permission of Yahoo! Inc.
204 specific prior written permission of Yahoo! Inc.
205
205
206 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
206 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
207 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
207 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
208 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
208 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
209 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
209 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
210 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
210 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
211 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
211 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
212 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
212 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
213 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
213 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
214 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
214 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
215 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
215 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
216
216
217
217
218 Kallithea includes a minified version of YUI 2.9. To build yui.2.9.js:
218 Kallithea includes a minified version of YUI 2.9. To build yui.2.9.js:
219
219
220 git clone https://github.com/yui/builder
220 git clone https://github.com/yui/builder
221 git clone https://github.com/yui/yui2
221 git clone https://github.com/yui/yui2
222 cd yui2/
222 cd yui2/
223 git checkout hudson-yui2-2800
223 git checkout hudson-yui2-2800
224 ln -sf JumpToPageDropDown.js src/paginator/js/JumpToPageDropdown.js # work around inconsistent casing
224 ln -sf JumpToPageDropDown.js src/paginator/js/JumpToPageDropdown.js # work around inconsistent casing
225 rm -f tmp.js
225 rm -f tmp.js
226 for m in yahoo event dom animation datasource autocomplete event-delegate; do
226 for m in yahoo event dom animation datasource autocomplete event-delegate; do
227 rm -f build/$m/$m.js
227 rm -f build/$m/$m.js
228 ( cd src/$m && ant build deploybuild ) && sed -e 's,@VERSION@,2.9.0,g' -e 's,@BUILD@,2800,g' build/$m/$m.js >> tmp.js
228 ( cd src/$m && ant build deploybuild ) && sed -e 's,@VERSION@,2.9.0,g' -e 's,@BUILD@,2800,g' build/$m/$m.js >> tmp.js
229 done
229 done
230 java -jar ../builder/componentbuild/lib/yuicompressor/yuicompressor-2.4.4.jar tmp.js -o yui.2.9.js
230 java -jar ../builder/componentbuild/lib/yuicompressor/yuicompressor-2.4.4.jar tmp.js -o yui.2.9.js
231
231
232 In compliance with GPLv3 the Corresponding Source for this Object Code is made
232 In compliance with GPLv3 the Corresponding Source for this Object Code is made
233 available on
233 available on
234 [https://kallithea-scm.org/repos/mirror](https://kallithea-scm.org/repos/mirror).
234 [https://kallithea-scm.org/repos/mirror](https://kallithea-scm.org/repos/mirror).
235
235
236
236
237
237
238 YUI Flot
238 YUI Flot
239 --------
239 --------
240
240
241 Kallithea incorporates some CSS from a system called
241 Kallithea incorporates some CSS from a system called
242 [Flot](http://code.google.com/p/flot/), which is:
242 [Flot](http://code.google.com/p/flot/), which is:
243
243
244 Copyright 2006 Google Inc.
244 Copyright 2006 Google Inc.
245
245
246 Licensed under the Apache License, Version 2.0 (the "License");
246 Licensed under the Apache License, Version 2.0 (the "License");
247 you may not use this file except in compliance with the License.
247 you may not use this file except in compliance with the License.
248
248
249 A [copy of the Apache License 2.0](Apache-License-2.0.txt) is also included
249 A [copy of the Apache License 2.0](Apache-License-2.0.txt) is also included
250 in this distribution.
250 in this distribution.
251
251
252
252
253
253
254 Flot
254 Flot
255 ----
255 ----
256
256
257 Kallithea incorporates some parts of a Javascript system called
257 Kallithea incorporates some parts of a Javascript system called
258 [Flot](http://www.flotcharts.org/), which is:
258 [Flot](http://www.flotcharts.org/), which is:
259
259
260 Copyright (c) 2007-2014 IOLA and Ole Laursen
260 Copyright (c) 2007-2014 IOLA and Ole Laursen
261
261
262 Permission is hereby granted, free of charge, to any person
262 Permission is hereby granted, free of charge, to any person
263 obtaining a copy of this software and associated documentation
263 obtaining a copy of this software and associated documentation
264 files (the "Software"), to deal in the Software without
264 files (the "Software"), to deal in the Software without
265 restriction, including without limitation the rights to use,
265 restriction, including without limitation the rights to use,
266 copy, modify, merge, publish, distribute, sublicense, and/or sell
266 copy, modify, merge, publish, distribute, sublicense, and/or sell
267 copies of the Software, and to permit persons to whom the
267 copies of the Software, and to permit persons to whom the
268 Software is furnished to do so, subject to the following
268 Software is furnished to do so, subject to the following
269 conditions:
269 conditions:
270
270
271 The above copyright notice and this permission notice shall be
271 The above copyright notice and this permission notice shall be
272 included in all copies or substantial portions of the Software.
272 included in all copies or substantial portions of the Software.
273
273
274 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
274 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
275 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
275 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
276 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
276 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
277 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
277 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
278 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
278 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
279 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
279 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
280 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
280 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
281 OTHER DEALINGS IN THE SOFTWARE.
281 OTHER DEALINGS IN THE SOFTWARE.
282
282
283
283
284
284
285 Icon fonts
285 Icon fonts
286 ----------
286 ----------
287
287
288 Kallithea incorporates subsets of both
288 Kallithea incorporates subsets of both
289 [Font Awesome](http://fontawesome.io) and
289 [Font Awesome](http://fontawesome.io) and
290 [GitHub Octicons](https://octicons.github.com) for icons. Font Awesome is:
290 [GitHub Octicons](https://octicons.github.com) for icons. Font Awesome is:
291
291
292 Copyright (c) 2016, Dave Gandy
292 Copyright (c) 2016, Dave Gandy
293
293
294 Octicons is:
294 Octicons is:
295
295
296 Copyright (c) 2012-2014 GitHub
296 Copyright (c) 2012-2014 GitHub
297
297
298 These two sets are distributed under [SIL OFL 1.1](http://scripts.sil.org/OFL)
298 These two sets are distributed under [SIL OFL 1.1](http://scripts.sil.org/OFL)
299 and have been combined into one font called "kallithea."
299 and have been combined into one font called "kallithea."
300
300
301
301
302 EOF
302 EOF
@@ -1,83 +1,87 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 # This program is free software: you can redistribute it and/or modify
2 # This program is free software: you can redistribute it and/or modify
3 # it under the terms of the GNU General Public License as published by
3 # it under the terms of the GNU General Public License as published by
4 # the Free Software Foundation, either version 3 of the License, or
4 # the Free Software Foundation, either version 3 of the License, or
5 # (at your option) any later version.
5 # (at your option) any later version.
6 #
6 #
7 # This program is distributed in the hope that it will be useful,
7 # This program is distributed in the hope that it will be useful,
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 # GNU General Public License for more details.
10 # GNU General Public License for more details.
11 #
11 #
12 # You should have received a copy of the GNU General Public License
12 # You should have received a copy of the GNU General Public License
13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
14
14
15 import click
15 import click
16 import kallithea.bin.kallithea_cli_base as cli_base
16 import kallithea.bin.kallithea_cli_base as cli_base
17
17
18 import os
18 import os
19 import shutil
19 import subprocess
20 import subprocess
20 import json
21 import json
21
22
22 import kallithea
23 import kallithea
23
24
24 @cli_base.register_command()
25 @cli_base.register_command()
25 @click.option('--install-deps/--no-install-deps', default=True,
26 @click.option('--install-deps/--no-install-deps', default=True,
26 help='Skip installation of dependencies, via "npm".')
27 help='Skip installation of dependencies, via "npm".')
27 @click.option('--generate/--no-generate', default=True,
28 @click.option('--generate/--no-generate', default=True,
28 help='Skip generation of front-end files.')
29 help='Skip generation of front-end files.')
29 def front_end_build(install_deps, generate):
30 def front_end_build(install_deps, generate):
30 """Build the front-end.
31 """Build the front-end.
31
32
32 Install required dependencies for the front-end and generate the necessary
33 Install required dependencies for the front-end and generate the necessary
33 files. This step is complementary to any 'pip install' step which only
34 files. This step is complementary to any 'pip install' step which only
34 covers Python dependencies.
35 covers Python dependencies.
35
36
36 The installation of front-end dependencies happens via the tool 'npm' which
37 The installation of front-end dependencies happens via the tool 'npm' which
37 is expected to be installed already.
38 is expected to be installed already.
38 """
39 """
39 front_end_dir = os.path.abspath(os.path.join(kallithea.__file__, '..', 'front-end'))
40 front_end_dir = os.path.abspath(os.path.join(kallithea.__file__, '..', 'front-end'))
40 public_dir = os.path.abspath(os.path.join(kallithea.__file__, '..', 'public'))
41 public_dir = os.path.abspath(os.path.join(kallithea.__file__, '..', 'public'))
41
42
42 if install_deps:
43 if install_deps:
43 click.echo("Running 'npm install' to install front-end dependencies from package.json")
44 click.echo("Running 'npm install' to install front-end dependencies from package.json")
44 subprocess.check_call(['npm', 'install'], cwd=front_end_dir)
45 subprocess.check_call(['npm', 'install'], cwd=front_end_dir)
45
46
46 if generate:
47 if generate:
47 tmp_dir = os.path.join(front_end_dir, 'tmp')
48 tmp_dir = os.path.join(front_end_dir, 'tmp')
48 if not os.path.isdir(tmp_dir):
49 if not os.path.isdir(tmp_dir):
49 os.mkdir(tmp_dir)
50 os.mkdir(tmp_dir)
50
51
51 click.echo("Generating CSS")
52 click.echo("Building CSS styling based on Bootstrap")
52 with open(os.path.join(tmp_dir, 'pygments.css'), 'w') as f:
53 with open(os.path.join(tmp_dir, 'pygments.css'), 'w') as f:
53 subprocess.check_call(['pygmentize',
54 subprocess.check_call(['pygmentize',
54 '-S', 'default',
55 '-S', 'default',
55 '-f', 'html',
56 '-f', 'html',
56 '-a', '.code-highlight'],
57 '-a', '.code-highlight'],
57 stdout=f)
58 stdout=f)
58 lesscpath = os.path.join(front_end_dir, 'node_modules', '.bin', 'lessc')
59 lesscpath = os.path.join(front_end_dir, 'node_modules', '.bin', 'lessc')
59 lesspath = os.path.join(public_dir, 'less', 'main.less')
60 lesspath = os.path.join(public_dir, 'less', 'main.less')
60 csspath = os.path.join(public_dir, 'css', 'style.css')
61 csspath = os.path.join(public_dir, 'css', 'style.css')
61 subprocess.check_call([lesscpath, '--relative-urls', '--source-map',
62 subprocess.check_call([lesscpath, '--relative-urls', '--source-map',
62 '--source-map-less-inline', lesspath, csspath],
63 '--source-map-less-inline', lesspath, csspath],
63 cwd=front_end_dir)
64 cwd=front_end_dir)
64
65
66 click.echo("Preparing Bootstrap JS")
67 shutil.copy(os.path.join(front_end_dir, 'node_modules', 'bootstrap', 'dist', 'js', 'bootstrap.js'), os.path.join(public_dir, 'js', 'bootstrap.js'))
68
65 click.echo("Generating LICENSES.txt")
69 click.echo("Generating LICENSES.txt")
66 check_licensing_json_path = os.path.join(tmp_dir, 'licensing.json')
70 check_licensing_json_path = os.path.join(tmp_dir, 'licensing.json')
67 licensing_txt_path = os.path.join(public_dir, 'LICENSES.txt')
71 licensing_txt_path = os.path.join(public_dir, 'LICENSES.txt')
68 subprocess.check_call([
72 subprocess.check_call([
69 os.path.join(front_end_dir, 'node_modules', '.bin', 'license-checker'),
73 os.path.join(front_end_dir, 'node_modules', '.bin', 'license-checker'),
70 '--json',
74 '--json',
71 '--out', check_licensing_json_path,
75 '--out', check_licensing_json_path,
72 ], cwd=front_end_dir)
76 ], cwd=front_end_dir)
73 with open(check_licensing_json_path) as jsonfile:
77 with open(check_licensing_json_path) as jsonfile:
74 rows = json.loads(jsonfile.read())
78 rows = json.loads(jsonfile.read())
75 with open(licensing_txt_path, 'w') as out:
79 with open(licensing_txt_path, 'w') as out:
76 out.write("The Kallithea front-end was built using the following Node modules:\n\n")
80 out.write("The Kallithea front-end was built using the following Node modules:\n\n")
77 for name_version, values in sorted(rows.items()):
81 for name_version, values in sorted(rows.items()):
78 name, version = name_version.rsplit('@', 1)
82 name, version = name_version.rsplit('@', 1)
79 line = "%s from https://www.npmjs.com/package/%s/v/%s\n License: %s\n Repository: %s\n" % (
83 line = "%s from https://www.npmjs.com/package/%s/v/%s\n License: %s\n Repository: %s\n" % (
80 name_version, name, version, values['licenses'], values.get('repository', '-'))
84 name_version, name, version, values['licenses'], values.get('repository', '-'))
81 if values.get('copyright'):
85 if values.get('copyright'):
82 line += " Copyright: %s\n" % (values['copyright'])
86 line += " Copyright: %s\n" % (values['copyright'])
83 out.write(line + '\n')
87 out.write(line + '\n')
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (6757 lines changed) Show them Hide them
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (2377 lines changed) Show them Hide them
General Comments 0
You need to be logged in to leave comments. Login now