Fix OOP <webview> resize and autosize.
[chromium-blink-merge.git] / third_party / polymer / v1_0 / reproduce.sh
blob87fff35774d7cb997fc52dbb97b3f530af06ead6
1 #!/bin/bash
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
5 # found in the LICENSE file.
7 # Reproduces the content of 'components' and 'components-chromium' using the
8 # list of dependencies from 'bower.json'. Downloads needed packages and makes
9 # Chromium specific modifications. To launch the script you need 'bower',
10 # 'crisper', and 'vulcanize' installed on your system.
12 set -e
14 cd "$(dirname "$0")"
16 rm -rf components components-chromium
17 rm -rf ../../web-animations-js/sources
19 bower install
21 mv components/web-animations-js ../../web-animations-js/sources
22 cp ../../web-animations-js/sources/COPYING ../../web-animations-js/LICENSE
24 # Remove unused gzipped binary which causes git-cl problems.
25 rm ../../web-animations-js/sources/web-animations.min.js.gz
27 # Remove source mapping directives since we don't compile the maps.
28 sed -i 's/^\s*\/\/#\s*sourceMappingURL.*//' \
29 ../../web-animations-js/sources/*.min.js
31 # These components are needed only for demos and docs.
32 rm -rf components/{hydrolysis,marked,marked-element,prism,prism-element,\
33 iron-component-page,iron-doc-viewer,webcomponentsjs}
35 # Test and demo directories aren't needed.
36 rm -rf components/*/{test,demo}
37 rm -rf components/polymer/explainer
39 # Remove promise-polyfill and components which depend on it.
40 rm -rf components/promise-polyfill
41 rm -rf components/iron-ajax
42 rm -rf components/iron-form
44 # Remove iron-image as it's only a developer dependency of iron-dropdown.
45 # https://github.com/PolymerElements/iron-dropdown/pull/17
46 rm -rf components/iron-image
48 # Make checkperms.py happy.
49 find components/*/hero.svg -type f -exec chmod -x {} \;
50 find components/iron-selector -type f -exec chmod -x {} \;
52 # Remove carriage returns to make CQ happy.
53 find components -type f \( -name \*.html -o -name \*.css -o -name \*.js\
54 -o -name \*.md -o -name \*.sh -o -name \*.json -o -name \*.gitignore\
55 -o -name \*.bat \) -print0 | xargs -0 sed -i -e $'s/\r$//g'
57 # Resolve a unicode encoding issue in dom-innerHTML.html.
58 NBSP=$(python -c 'print u"\u00A0".encode("utf-8")')
59 sed -i 's/['"$NBSP"']/\\u00A0/g' components/polymer/polymer-mini.html
61 # Remove import of external resource in font-roboto (fonts.googleapis.com).
62 patch -p1 < chromium.patch
64 ./extract_inline_scripts.sh components components-chromium