Show More
@@ -24,7 +24,6 b' syntax: regexp' | |||
|
24 | 24 | ^.dev |
|
25 | 25 | ^._dev |
|
26 | 26 | ^build/ |
|
27 | ^bower_components/ | |
|
28 | 27 | ^coverage\.xml$ |
|
29 | 28 | ^data$ |
|
30 | 29 | ^\.eggs/ |
@@ -43,9 +42,8 b' syntax: regexp' | |||
|
43 | 42 | ^rhodecode/public/css/style.css$ |
|
44 | 43 | ^rhodecode/public/css/style-polymer.css$ |
|
45 | 44 | ^rhodecode/public/js/rhodecode-components.html$ |
|
45 | ^rhodecode/public/js/rhodecode-components.js$ | |
|
46 | 46 | ^rhodecode/public/js/scripts.js$ |
|
47 | ^rhodecode/public/js/rhodecode-components.js$ | |
|
48 | ^rhodecode/public/js/app-bundle.js$ | |
|
49 | 47 | ^rhodecode/public/js/src/components/root-styles.gen.html$ |
|
50 | 48 | ^rhodecode/public/js/vendors/webcomponentsjs/ |
|
51 | 49 | ^rhodecode\.db$ |
@@ -54,7 +54,7 b' let' | |||
|
54 | 54 | in |
|
55 | 55 | !builtins.elem (basename path) [ |
|
56 | 56 | ".git" ".hg" "__pycache__" ".eggs" ".idea" ".dev" |
|
57 |
|
|
|
57 | "node_modules" "node_binaries" | |
|
58 | 58 | "build" "data" "result" "tmp"] && |
|
59 | 59 | !builtins.elem ext ["egg-info" "pyc"] && |
|
60 | 60 | # TODO: johbo: This check is wrong, since "path" contains an absolute path, |
@@ -78,19 +78,12 b' let' | |||
|
78 | 78 | version = builtins.readFile "${rhodecode-enterprise-ce-src}/rhodecode/VERSION"; |
|
79 | 79 | rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.; |
|
80 | 80 | |
|
81 | buildBowerComponents = pkgs.buildBowerComponents; | |
|
82 | 81 | nodeEnv = import ./pkgs/node-default.nix { |
|
83 | 82 | inherit |
|
84 | 83 | pkgs; |
|
85 | 84 | }; |
|
86 | 85 | nodeDependencies = nodeEnv.shell.nodeDependencies; |
|
87 | 86 | |
|
88 | bowerComponents = buildBowerComponents { | |
|
89 | name = "enterprise-ce-${version}"; | |
|
90 | generated = ./pkgs/bower-packages.nix; | |
|
91 | src = rhodecode-enterprise-ce-src; | |
|
92 | }; | |
|
93 | ||
|
94 | 87 | rhodecode-testdata-src = sources.rhodecode-testdata or ( |
|
95 | 88 | pkgs.fetchhg { |
|
96 | 89 | url = "https://code.rhodecode.com/upstream/rc_testdata"; |
@@ -108,7 +101,7 b' let' | |||
|
108 | 101 | pythonLocalOverrides = self: super: { |
|
109 | 102 | rhodecode-enterprise-ce = |
|
110 | 103 | let |
|
111 |
linkNode |
|
|
104 | linkNodePackages = '' | |
|
112 | 105 | export RHODECODE_CE_PATH=${rhodecode-enterprise-ce-src} |
|
113 | 106 | |
|
114 | 107 | echo "[BEGIN]: Link node packages and binaries" |
@@ -124,12 +117,6 b' let' | |||
|
124 | 117 | mkdir node_binaries |
|
125 | 118 | ln -s ${nodeDependencies}/bin/* node_binaries/ |
|
126 | 119 | echo "[DONE ]: Link node packages and binaries" |
|
127 | ||
|
128 | echo "[BEGIN]: Link bower packages" | |
|
129 | rm -fr bower_components | |
|
130 | mkdir bower_components | |
|
131 | ln -s ${bowerComponents}/bower_components/* bower_components/ | |
|
132 | echo "[DONE ]: Link bower packages" | |
|
133 | 120 | ''; |
|
134 | 121 | |
|
135 | 122 | releaseName = "RhodeCodeEnterpriseCE-${version}"; |
@@ -147,8 +134,7 b' let' | |||
|
147 | 134 | passthru = { |
|
148 | 135 | inherit |
|
149 | 136 | rhodecode-testdata |
|
150 | bowerComponents | |
|
151 | linkNodeAndBowerPackages | |
|
137 | linkNodePackages | |
|
152 | 138 | myPythonPackagesUnfix |
|
153 | 139 | pythonLocalOverrides |
|
154 | 140 | pythonCommunityOverrides; |
@@ -192,7 +178,7 b' let' | |||
|
192 | 178 | |
|
193 | 179 | preBuild = '' |
|
194 | 180 | echo "[BEGIN]: Building frontend assets" |
|
195 |
${linkNode |
|
|
181 | ${linkNodePackages} | |
|
196 | 182 | make web-build |
|
197 | 183 | rm -fr node_modules |
|
198 | 184 | rm -fr node_binaries |
@@ -13,48 +13,4 b' dependencies for Python and JavaScript w' | |||
|
13 | 13 | this section to generate the needed Nix derivations. |
|
14 | 14 | |
|
15 | 15 | |
|
16 | Python dependencies | |
|
17 | =================== | |
|
18 | ||
|
19 | We use the tool `pip2nix` to generate the Nix derivations for our Python | |
|
20 | dependencies. | |
|
21 | ||
|
22 | Generating the dependencies should be done with the following command: | |
|
23 | ||
|
24 | .. code:: shell | |
|
25 | ||
|
26 | pip2nix generate --license | |
|
27 | ||
|
28 | ||
|
29 | .. note:: | |
|
30 | ||
|
31 | License extraction support is still experimental, use the version from the | |
|
32 | following pull request: https://github.com/ktosiek/pip2nix/pull/30 | |
|
33 | ||
|
34 | ||
|
35 | ||
|
36 | Node dependencies | |
|
37 | ================= | |
|
38 | ||
|
39 | After adding new dependencies via ``npm install --save``, use `node2nix` to | |
|
40 | update the corresponding Nix derivations: | |
|
41 | ||
|
42 | .. code:: shell | |
|
43 | ||
|
44 | cd pkgs | |
|
45 | node2nix --input ../package.json \ | |
|
46 | -o node-packages.nix \ | |
|
47 | -e node-env.nix \ | |
|
48 | -c node-default.nix \ | |
|
49 | -d --flatten | |
|
50 | ||
|
51 | ||
|
52 | Bower dependencies | |
|
53 | ================== | |
|
54 | ||
|
55 | Frontend dependencies are managed based on `bower`, with `bower2nix` a tool | |
|
56 | exists which can generate the needed Nix derivations: | |
|
57 | ||
|
58 | .. code:: shell | |
|
59 | ||
|
60 | bower2nix bower.json pkgs/bower-packages.nix | |
|
16 | Please check pkgs/README.rst file for mor information on how to build the packages. |
@@ -8,14 +8,13 b'' | |||
|
8 | 8 | "src": "rhodecode/public/js/src", |
|
9 | 9 | "src_rc": "rhodecode/public/js/rhodecode", |
|
10 | 10 | "dest": "rhodecode/public/js", |
|
11 | "bower": "bower_components", | |
|
12 | 11 | "node_modules": "node_modules" |
|
13 | 12 | } |
|
14 | 13 | }, |
|
15 | 14 | "copy": { |
|
16 | 15 | "main": { |
|
17 | 16 | "expand": true, |
|
18 |
"cwd": " |
|
|
17 | "cwd": "node_modules/@webcomponents", | |
|
19 | 18 | "src": "webcomponentsjs/*.*", |
|
20 | 19 | "dest": "<%= dirs.js.dest %>/vendors" |
|
21 | 20 | } |
@@ -10,7 +10,6 b'' | |||
|
10 | 10 | }, |
|
11 | 11 | "devDependencies": { |
|
12 | 12 | "appenlight-client": "git+https://git@github.com/AppEnlight/appenlight-client-js.git#0.5.1", |
|
13 | "bower": "^1.8.4", | |
|
14 | 13 | "clipboard": "^2.0.1", |
|
15 | 14 | "exports-loader": "^0.6.4", |
|
16 | 15 | "favico.js": "^0.3.10", |
@@ -44,14 +44,6 b' The sed at the end fixes a bug with http' | |||
|
44 | 44 | sed -i -e 's/http:\/\//https:\/\//g' pkgs/node-packages.nix |
|
45 | 45 | |
|
46 | 46 | |
|
47 | Bower dependencies | |
|
48 | ================== | |
|
49 | ||
|
50 | .. code:: shell | |
|
51 | ||
|
52 | nix-shell pkgs/shell-generate.nix --command "bower2nix bower.json pkgs/bower-packages.nix" | |
|
53 | ||
|
54 | ||
|
55 | 47 | Generate license data |
|
56 | 48 | ===================== |
|
57 | 49 |
@@ -1490,15 +1490,6 b' let' | |||
|
1490 | 1490 | sha1 = "39c8918ceff5799f83f9492a848f625add0c766f"; |
|
1491 | 1491 | }; |
|
1492 | 1492 | }; |
|
1493 | "bower-1.8.4" = { | |
|
1494 | name = "bower"; | |
|
1495 | packageName = "bower"; | |
|
1496 | version = "1.8.4"; | |
|
1497 | src = fetchurl { | |
|
1498 | url = "https://registry.npmjs.org/bower/-/bower-1.8.4.tgz"; | |
|
1499 | sha1 = "e7876a076deb8137f7d06525dc5e8c66db82f28a"; | |
|
1500 | }; | |
|
1501 | }; | |
|
1502 | 1493 | "brace-expansion-1.1.11" = { |
|
1503 | 1494 | name = "brace-expansion"; |
|
1504 | 1495 | packageName = "brace-expansion"; |
@@ -7940,7 +7931,6 b' let' | |||
|
7940 | 7931 | sources."bn.js-4.11.8" |
|
7941 | 7932 | sources."boolbase-1.0.0" |
|
7942 | 7933 | sources."boom-2.10.1" |
|
7943 | sources."bower-1.8.4" | |
|
7944 | 7934 | sources."brace-expansion-1.1.11" |
|
7945 | 7935 | (sources."braces-2.3.2" // { |
|
7946 | 7936 | dependencies = [ |
@@ -23,9 +23,6 b' pkgs.stdenv.mkDerivation {' | |||
|
23 | 23 | pip2nix.pip2nix |
|
24 | 24 | pythonPackages.pip-tools |
|
25 | 25 | |
|
26 | # Allows to generate bower dependencies | |
|
27 | pkgs.nodePackages.bower2nix | |
|
28 | ||
|
29 | 26 | # Allows to generate node dependencies |
|
30 | 27 | pkgs.nodePackages.node2nix |
|
31 | 28 |
@@ -1896,17 +1896,6 b'' | |||
|
1896 | 1896 | "url": "http://spdx.org/licenses/MIT.html" |
|
1897 | 1897 | } |
|
1898 | 1898 | ], |
|
1899 | "name": "node-bower-1.8.4" | |
|
1900 | }, | |
|
1901 | { | |
|
1902 | "license": [ | |
|
1903 | { | |
|
1904 | "fullName": "MIT License", | |
|
1905 | "shortName": "mit", | |
|
1906 | "spdxId": "MIT", | |
|
1907 | "url": "http://spdx.org/licenses/MIT.html" | |
|
1908 | } | |
|
1909 | ], | |
|
1910 | 1899 | "name": "python2.7-rhodecode-testdata-0.10.0" |
|
1911 | 1900 | } |
|
1912 | 1901 | ] |
@@ -29,7 +29,7 b" c.template_context['default_user'] = {" | |||
|
29 | 29 | <head> |
|
30 | 30 | |
|
31 | 31 | <script src="${h.asset('js/vendors/webcomponentsjs/custom-elements-es5-adapter.js', ver=c.rhodecode_version_hash)}"></script> |
|
32 |
<script src="${h.asset('js/vendors/webcomponentsjs/webcomponents-l |
|
|
32 | <script src="${h.asset('js/vendors/webcomponentsjs/webcomponents-bundle.js', ver=c.rhodecode_version_hash)}"></script> | |
|
33 | 33 | <title>${self.title()}</title> |
|
34 | 34 | <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> |
|
35 | 35 |
@@ -94,7 +94,7 b' in enterprise-ce.override (attrs: {' | |||
|
94 | 94 | export PS1="\n\[\033[1;32m\][CE-shell:\w]$\[\033[0m\] " |
|
95 | 95 | |
|
96 | 96 | echo "Building frontend assets" |
|
97 |
${enterprise-ce.linkNode |
|
|
97 | ${enterprise-ce.linkNodePackages} | |
|
98 | 98 | |
|
99 | 99 | # Setup a temporary directory. |
|
100 | 100 | tmp_path=$(mktemp -d) |
@@ -33,12 +33,9 b' module.exports = {' | |||
|
33 | 33 | }, |
|
34 | 34 | // Tell Webpack which directories to look in to resolve import statements. |
|
35 | 35 | // Normally Webpack will look in node_modules by default but since we’re overriding |
|
36 | // the property we’ll need to tell it to look there in addition to the | |
|
37 | // bower_components folder. | |
|
38 | 36 | resolve: { |
|
39 | 37 | modules: [ |
|
40 | 38 | path.resolve(__dirname, 'node_modules'), |
|
41 | path.resolve(__dirname, 'bower_components') | |
|
42 | 39 | ] |
|
43 | 40 | }, |
|
44 | 41 | // These rules tell Webpack how to process different module types. |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now