Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Commit

Permalink
Merge pull request #258 from google/add-rewriter-to-web-simple
Browse files Browse the repository at this point in the history
use dart_to_js_script_rewriter in web-simple
  • Loading branch information
sethladd committed Jul 8, 2015
2 parents 39190df + 53e6e3f commit bfa32d4
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 18 deletions.
16 changes: 8 additions & 8 deletions lib/generators/web_full_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ IG1vYmlsZS1mcmllbmRseSB3ZWIgYXBwIHdpdGggcm91dGluZywgcmVzcG9uc2l2ZSBDU1MsIGFu
ZCAob3B0aW9uYWwpIFNhc3MKICBzdXBwb3J0LgojYXV0aG9yOiB7e2F1dGhvcn19IDxlbWFpbEBl
eGFtcGxlLmNvbT4KI2hvbWVwYWdlOiBodHRwczovL3d3dy5leGFtcGxlLmNvbQoKZW52aXJvbm1l
bnQ6CiAgc2RrOiAnPj0xLjAuMCA8Mi4wLjAnCgpkZXBlbmRlbmNpZXM6CiAgYnJvd3NlcjogJz49
MC4xMC4wIDwwLjExLjAnCiAgc2FzczogJz49MC40LjAgPDAuNS4wJwogIHNjcmlwdF9pbmxpbmVy
OiAnPj0xLjAuMCA8Mi4wLjAnCiAgcm91dGVfaGllcmFyY2hpY2FsOiAnPj0wLjUuMCA8MC43LjAn
Cgp0cmFuc2Zvcm1lcnM6Ci0gc2NyaXB0X2lubGluZXIKIy0gc2FzczoKIyAgICBzdHlsZTogY29t
cHJlc3NlZAo=""",
MC4xMC4wIDwwLjExLjAnCiAgc2FzczogJz49MC40LjAgPDAuNS4wJwogIGRhcnRfdG9fanNfc2Ny
aXB0X3Jld3JpdGVyOiAnXjAuMS4wJwogIHJvdXRlX2hpZXJhcmNoaWNhbDogJz49MC41LjAgPDAu
Ny4wJwoKdHJhbnNmb3JtZXJzOgotIGRhcnRfdG9fanNfc2NyaXB0X3Jld3JpdGVyCiMtIHNhc3M6
CiMgICAgc3R5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down
9 changes: 5 additions & 4 deletions lib/generators/web_simple_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ ZW5lcmF0ZWQgYnkgU3RhZ2VoYW5kLiBTZWUgTElDRU5TRS4K""",
c29sdXRlIGJhcmUtYm9uZXMgd2ViIGFwcC4KI2F1dGhvcjoge3thdXRob3J9fSA8ZW1haWxAZXhh
bXBsZS5jb20+CiNob21lcGFnZTogaHR0cHM6Ly93d3cuZXhhbXBsZS5jb20KCmVudmlyb25tZW50
OgogIHNkazogJz49MS4wLjAgPDIuMC4wJwoKZGVwZW5kZW5jaWVzOgogIGJyb3dzZXI6ICc+PTAu
MTAuMCA8MC4xMS4wJwo=""",
MTAuMCA8MC4xMS4wJwogIGRhcnRfdG9fanNfc2NyaXB0X3Jld3JpdGVyOiAnXjAuMS4wJwoKdHJh
bnNmb3JtZXJzOgotIGRhcnRfdG9fanNfc2NyaXB0X3Jld3JpdGVy""",
"web/index.html",
"text",
"""PCFET0NUWVBFIGh0bWw+Cgo8IS0tCiAgQ29weXJpZ2h0IChjKSB7e3llYXJ9fSwge3thdXRob3J9
Expand All @@ -63,9 +64,9 @@ aXRpYWwtc2NhbGU9MS4wIj4KICAgIDxtZXRhIG5hbWU9InNjYWZmb2xkZWQtYnkiIGNvbnRlbnQ9
Imh0dHBzOi8vZ2l0aHViLmNvbS9nb29nbGUvc3RhZ2VoYW5kIj4KICAgIDx0aXRsZT57e3Byb2pl
Y3ROYW1lfX08L3RpdGxlPgoKICAgIDxsaW5rIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0ic3R5bGVz
L21haW4uY3NzIj4KPC9oZWFkPgoKPGJvZHk+CgogIDxkaXYgaWQ9Im91dHB1dCI+PC9kaXY+Cgo8
c2NyaXB0IHR5cGU9ImFwcGxpY2F0aW9uL2RhcnQiIHNyYz0ibWFpbi5kYXJ0Ij48L3NjcmlwdD4K
PHNjcmlwdCBkYXRhLXB1Yi1pbmxpbmUgc3JjPSJwYWNrYWdlcy9icm93c2VyL2RhcnQuanMiPjwv
c2NyaXB0Pgo8L2JvZHk+CjwvaHRtbD4K""",
c2NyaXB0IGFzeW5jIHR5cGU9ImFwcGxpY2F0aW9uL2RhcnQiIHNyYz0ibWFpbi5kYXJ0Ij48L3Nj
cmlwdD4KPHNjcmlwdCBhc3luYyBzcmM9InBhY2thZ2VzL2Jyb3dzZXIvZGFydC5qcyI+PC9zY3Jp
cHQ+CjwvYm9keT4KPC9odG1sPgo=""",
"web/main.dart",
"text",
"""Ly8gQ29weXJpZ2h0IChjKSB7e3llYXJ9fSwge3thdXRob3J9fS4gQWxsIHJpZ2h0cyByZXNlcnZl
Expand Down
4 changes: 2 additions & 2 deletions templates/web-full/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ environment:
dependencies:
browser: '>=0.10.0 <0.11.0'
sass: '>=0.4.0 <0.5.0'
script_inliner: '>=1.0.0 <2.0.0'
dart_to_js_script_rewriter: '^0.1.0'
route_hierarchical: '>=0.5.0 <0.7.0'

transformers:
- script_inliner
- dart_to_js_script_rewriter
#- sass:
# style: compressed
4 changes: 2 additions & 2 deletions templates/web-full/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h4>Navigation</h4>
</div>
</main>

<script type="application/dart" src="main.dart"></script>
<script data-pub-inline src="packages/browser/dart.js"></script>
<script async type="application/dart" src="main.dart"></script>
<script async src="packages/browser/dart.js"></script>
</body>
</html>
4 changes: 4 additions & 0 deletions templates/web-simple/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ environment:

dependencies:
browser: '>=0.10.0 <0.11.0'
dart_to_js_script_rewriter: '^0.1.0'

transformers:
- dart_to_js_script_rewriter
4 changes: 2 additions & 2 deletions templates/web-simple/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<div id="output"></div>

<script type="application/dart" src="main.dart"></script>
<script data-pub-inline src="packages/browser/dart.js"></script>
<script async type="application/dart" src="main.dart"></script>
<script async src="packages/browser/dart.js"></script>
</body>
</html>

0 comments on commit bfa32d4

Please sign in to comment.