OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright 2014 The Chromium Authors. All rights reserved. | 3 # Copyright 2014 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # Reproduces the content of 'components' and 'components-chromium' using the | 7 # Reproduces the content of 'components' and 'components-chromium' using the |
8 # list of dependencies from 'bower.json'. Downloads needed packages and makes | 8 # list of dependencies from 'bower.json'. Downloads needed packages and makes |
9 # Chromium specific modifications. To launch the script you need 'bower', | 9 # Chromium specific modifications. To launch the script you need 'bower', |
10 # 'crisper', and 'vulcanize' installed on your system. | 10 # 'crisper', and 'vulcanize' installed on your system. |
11 | 11 |
12 # IMPORTANT NOTE: The new vulcanize must be installed from | 12 # IMPORTANT NOTE: The new vulcanize must be installed from |
13 # https://github.com/Polymer/vulcanize/releases since it isn't on npm yet. | 13 # https://github.com/Polymer/vulcanize/releases since it isn't on npm yet. |
14 | 14 |
15 set -e | 15 set -e |
16 | 16 |
17 cd "$(dirname "$0")" | 17 cd "$(dirname "$0")" |
18 | 18 |
19 rm -rf components components-chromium | 19 rm -rf components components-chromium |
20 | 20 |
21 bower install | 21 bower install |
22 | 22 |
23 # These components are deprecated or needed only for demos. | 23 # These components are deprecated or needed only for demos. |
24 rm -rf components/{iron-component-page,webcomponentsjs} | 24 rm -rf components/{iron-component-page,webcomponentsjs} |
25 | 25 |
26 # Test and demo directories aren't needed. | 26 # Test and demo directories aren't needed. |
27 rm -rf components/*/{test,demo} | 27 rm -rf components/*/{test,demo} |
28 rm -rf components/polymer/explainer | 28 rm -rf components/polymer/explainer |
29 rm -rf components/observe-js/{examples,conf,benchmark} | |
30 | 29 |
31 # Make checkperms.py happy. | 30 # Make checkperms.py happy. |
32 find components/iron-selector -type f -exec chmod -x {} \; | 31 find components/iron-selector -type f -exec chmod -x {} \; |
33 chmod +x components/polymer/build.bat | 32 chmod +x components/polymer/build.bat |
34 | 33 |
35 # Remove carriage returns to make CQ happy. | 34 # Remove carriage returns to make CQ happy. |
36 find components -type f \( -name \*.html -o -name \*.css -o -name \*.js\ | 35 find components -type f \( -name \*.html -o -name \*.css -o -name \*.js\ |
37 -o -name \*.md -o -name \*.sh -o -name \*.json -o -name \*.gitignore\ | 36 -o -name \*.md -o -name \*.sh -o -name \*.json -o -name \*.gitignore\ |
38 -o -name \*.bat \) -print0 | xargs -0 sed -i -e $'s/\r$//g' | 37 -o -name \*.bat \) -print0 | xargs -0 sed -i -e $'s/\r$//g' |
39 | 38 |
40 ./extract_inline_scripts.sh components components-chromium | 39 ./extract_inline_scripts.sh components components-chromium |
41 | 40 |
42 # Actually fully vulcanize polymer.html to avoid needing to serve each file in | 41 # Actually fully vulcanize polymer.html to avoid needing to serve each file in |
43 # the library separately. | 42 # the library separately. |
44 vulcanize --inline-scripts components/polymer/polymer.html > components-chromium
/polymer/polymer.html | 43 vulcanize --inline-scripts components/polymer/polymer.html > components-chromium
/polymer/polymer.html |
45 crisper --source components-chromium/polymer/polymer.html\ | 44 crisper --source components-chromium/polymer/polymer.html\ |
46 --html "components-chromium/polymer/polymer.html"\ | 45 --html "components-chromium/polymer/polymer.html"\ |
47 --js "components-chromium/polymer/polymer.js" | 46 --js "components-chromium/polymer/polymer.js" |
OLD | NEW |