##// END OF EJS Templates
packaging: dropped bower, it's now replaced by npm and webcomponents from polymer.
marcink -
r3176:4660c673 default
parent child Browse files
Show More
@@ -24,7 +24,6 b' syntax: regexp'
24 ^.dev
24 ^.dev
25 ^._dev
25 ^._dev
26 ^build/
26 ^build/
27 ^bower_components/
28 ^coverage\.xml$
27 ^coverage\.xml$
29 ^data$
28 ^data$
30 ^\.eggs/
29 ^\.eggs/
@@ -43,9 +42,8 b' syntax: regexp'
43 ^rhodecode/public/css/style.css$
42 ^rhodecode/public/css/style.css$
44 ^rhodecode/public/css/style-polymer.css$
43 ^rhodecode/public/css/style-polymer.css$
45 ^rhodecode/public/js/rhodecode-components.html$
44 ^rhodecode/public/js/rhodecode-components.html$
45 ^rhodecode/public/js/rhodecode-components.js$
46 ^rhodecode/public/js/scripts.js$
46 ^rhodecode/public/js/scripts.js$
47 ^rhodecode/public/js/rhodecode-components.js$
48 ^rhodecode/public/js/app-bundle.js$
49 ^rhodecode/public/js/src/components/root-styles.gen.html$
47 ^rhodecode/public/js/src/components/root-styles.gen.html$
50 ^rhodecode/public/js/vendors/webcomponentsjs/
48 ^rhodecode/public/js/vendors/webcomponentsjs/
51 ^rhodecode\.db$
49 ^rhodecode\.db$
@@ -54,7 +54,7 b' let'
54 in
54 in
55 !builtins.elem (basename path) [
55 !builtins.elem (basename path) [
56 ".git" ".hg" "__pycache__" ".eggs" ".idea" ".dev"
56 ".git" ".hg" "__pycache__" ".eggs" ".idea" ".dev"
57 "bower_components" "node_modules" "node_binaries"
57 "node_modules" "node_binaries"
58 "build" "data" "result" "tmp"] &&
58 "build" "data" "result" "tmp"] &&
59 !builtins.elem ext ["egg-info" "pyc"] &&
59 !builtins.elem ext ["egg-info" "pyc"] &&
60 # TODO: johbo: This check is wrong, since "path" contains an absolute path,
60 # TODO: johbo: This check is wrong, since "path" contains an absolute path,
@@ -78,19 +78,12 b' let'
78 version = builtins.readFile "${rhodecode-enterprise-ce-src}/rhodecode/VERSION";
78 version = builtins.readFile "${rhodecode-enterprise-ce-src}/rhodecode/VERSION";
79 rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.;
79 rhodecode-enterprise-ce-src = builtins.filterSource src-filter ./.;
80
80
81 buildBowerComponents = pkgs.buildBowerComponents;
82 nodeEnv = import ./pkgs/node-default.nix {
81 nodeEnv = import ./pkgs/node-default.nix {
83 inherit
82 inherit
84 pkgs;
83 pkgs;
85 };
84 };
86 nodeDependencies = nodeEnv.shell.nodeDependencies;
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 rhodecode-testdata-src = sources.rhodecode-testdata or (
87 rhodecode-testdata-src = sources.rhodecode-testdata or (
95 pkgs.fetchhg {
88 pkgs.fetchhg {
96 url = "https://code.rhodecode.com/upstream/rc_testdata";
89 url = "https://code.rhodecode.com/upstream/rc_testdata";
@@ -108,7 +101,7 b' let'
108 pythonLocalOverrides = self: super: {
101 pythonLocalOverrides = self: super: {
109 rhodecode-enterprise-ce =
102 rhodecode-enterprise-ce =
110 let
103 let
111 linkNodeAndBowerPackages = ''
104 linkNodePackages = ''
112 export RHODECODE_CE_PATH=${rhodecode-enterprise-ce-src}
105 export RHODECODE_CE_PATH=${rhodecode-enterprise-ce-src}
113
106
114 echo "[BEGIN]: Link node packages and binaries"
107 echo "[BEGIN]: Link node packages and binaries"
@@ -124,12 +117,6 b' let'
124 mkdir node_binaries
117 mkdir node_binaries
125 ln -s ${nodeDependencies}/bin/* node_binaries/
118 ln -s ${nodeDependencies}/bin/* node_binaries/
126 echo "[DONE ]: Link node packages and binaries"
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 releaseName = "RhodeCodeEnterpriseCE-${version}";
122 releaseName = "RhodeCodeEnterpriseCE-${version}";
@@ -147,8 +134,7 b' let'
147 passthru = {
134 passthru = {
148 inherit
135 inherit
149 rhodecode-testdata
136 rhodecode-testdata
150 bowerComponents
137 linkNodePackages
151 linkNodeAndBowerPackages
152 myPythonPackagesUnfix
138 myPythonPackagesUnfix
153 pythonLocalOverrides
139 pythonLocalOverrides
154 pythonCommunityOverrides;
140 pythonCommunityOverrides;
@@ -192,7 +178,7 b' let'
192
178
193 preBuild = ''
179 preBuild = ''
194 echo "[BEGIN]: Building frontend assets"
180 echo "[BEGIN]: Building frontend assets"
195 ${linkNodeAndBowerPackages}
181 ${linkNodePackages}
196 make web-build
182 make web-build
197 rm -fr node_modules
183 rm -fr node_modules
198 rm -fr node_binaries
184 rm -fr node_binaries
@@ -13,48 +13,4 b' dependencies for Python and JavaScript w'
13 this section to generate the needed Nix derivations.
13 this section to generate the needed Nix derivations.
14
14
15
15
16 Python dependencies
16 Please check pkgs/README.rst file for mor information on how to build the packages.
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
@@ -8,14 +8,13 b''
8 "src": "rhodecode/public/js/src",
8 "src": "rhodecode/public/js/src",
9 "src_rc": "rhodecode/public/js/rhodecode",
9 "src_rc": "rhodecode/public/js/rhodecode",
10 "dest": "rhodecode/public/js",
10 "dest": "rhodecode/public/js",
11 "bower": "bower_components",
12 "node_modules": "node_modules"
11 "node_modules": "node_modules"
13 }
12 }
14 },
13 },
15 "copy": {
14 "copy": {
16 "main": {
15 "main": {
17 "expand": true,
16 "expand": true,
18 "cwd": "bower_components",
17 "cwd": "node_modules/@webcomponents",
19 "src": "webcomponentsjs/*.*",
18 "src": "webcomponentsjs/*.*",
20 "dest": "<%= dirs.js.dest %>/vendors"
19 "dest": "<%= dirs.js.dest %>/vendors"
21 }
20 }
@@ -10,7 +10,6 b''
10 },
10 },
11 "devDependencies": {
11 "devDependencies": {
12 "appenlight-client": "git+https://git@github.com/AppEnlight/appenlight-client-js.git#0.5.1",
12 "appenlight-client": "git+https://git@github.com/AppEnlight/appenlight-client-js.git#0.5.1",
13 "bower": "^1.8.4",
14 "clipboard": "^2.0.1",
13 "clipboard": "^2.0.1",
15 "exports-loader": "^0.6.4",
14 "exports-loader": "^0.6.4",
16 "favico.js": "^0.3.10",
15 "favico.js": "^0.3.10",
@@ -44,14 +44,6 b' The sed at the end fixes a bug with http'
44 sed -i -e 's/http:\/\//https:\/\//g' pkgs/node-packages.nix
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 Generate license data
47 Generate license data
56 =====================
48 =====================
57
49
@@ -1490,15 +1490,6 b' let'
1490 sha1 = "39c8918ceff5799f83f9492a848f625add0c766f";
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 "brace-expansion-1.1.11" = {
1493 "brace-expansion-1.1.11" = {
1503 name = "brace-expansion";
1494 name = "brace-expansion";
1504 packageName = "brace-expansion";
1495 packageName = "brace-expansion";
@@ -7940,7 +7931,6 b' let'
7940 sources."bn.js-4.11.8"
7931 sources."bn.js-4.11.8"
7941 sources."boolbase-1.0.0"
7932 sources."boolbase-1.0.0"
7942 sources."boom-2.10.1"
7933 sources."boom-2.10.1"
7943 sources."bower-1.8.4"
7944 sources."brace-expansion-1.1.11"
7934 sources."brace-expansion-1.1.11"
7945 (sources."braces-2.3.2" // {
7935 (sources."braces-2.3.2" // {
7946 dependencies = [
7936 dependencies = [
@@ -23,9 +23,6 b' pkgs.stdenv.mkDerivation {'
23 pip2nix.pip2nix
23 pip2nix.pip2nix
24 pythonPackages.pip-tools
24 pythonPackages.pip-tools
25
25
26 # Allows to generate bower dependencies
27 pkgs.nodePackages.bower2nix
28
29 # Allows to generate node dependencies
26 # Allows to generate node dependencies
30 pkgs.nodePackages.node2nix
27 pkgs.nodePackages.node2nix
31
28
@@ -1896,17 +1896,6 b''
1896 "url": "http://spdx.org/licenses/MIT.html"
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 "name": "python2.7-rhodecode-testdata-0.10.0"
1899 "name": "python2.7-rhodecode-testdata-0.10.0"
1911 }
1900 }
1912 ]
1901 ]
@@ -29,7 +29,7 b" c.template_context['default_user'] = {"
29 <head>
29 <head>
30
30
31 <script src="${h.asset('js/vendors/webcomponentsjs/custom-elements-es5-adapter.js', ver=c.rhodecode_version_hash)}"></script>
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-lite.js', ver=c.rhodecode_version_hash)}"></script>
32 <script src="${h.asset('js/vendors/webcomponentsjs/webcomponents-bundle.js', ver=c.rhodecode_version_hash)}"></script>
33 <title>${self.title()}</title>
33 <title>${self.title()}</title>
34 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
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 export PS1="\n\[\033[1;32m\][CE-shell:\w]$\[\033[0m\] "
94 export PS1="\n\[\033[1;32m\][CE-shell:\w]$\[\033[0m\] "
95
95
96 echo "Building frontend assets"
96 echo "Building frontend assets"
97 ${enterprise-ce.linkNodeAndBowerPackages}
97 ${enterprise-ce.linkNodePackages}
98
98
99 # Setup a temporary directory.
99 # Setup a temporary directory.
100 tmp_path=$(mktemp -d)
100 tmp_path=$(mktemp -d)
@@ -33,12 +33,9 b' module.exports = {'
33 },
33 },
34 // Tell Webpack which directories to look in to resolve import statements.
34 // Tell Webpack which directories to look in to resolve import statements.
35 // Normally Webpack will look in node_modules by default but since we’re overriding
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 resolve: {
36 resolve: {
39 modules: [
37 modules: [
40 path.resolve(__dirname, 'node_modules'),
38 path.resolve(__dirname, 'node_modules'),
41 path.resolve(__dirname, 'bower_components')
42 ]
39 ]
43 },
40 },
44 // These rules tell Webpack how to process different module types.
41 // These rules tell Webpack how to process different module types.
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now