Skip to content

Instantly share code, notes, and snippets.

@ochafik
Last active October 22, 2015 19:29
Show Gist options
  • Select an option

  • Save ochafik/f39f65431441627ad1ff to your computer and use it in GitHub Desktop.

Select an option

Save ochafik/f39f65431441627ad1ff to your computer and use it in GitHub Desktop.
angular2 code size
#!/bin/bash
# Prequisite: make sure to have a recent node.js version (> 4.x): https://nodejs.org/
set -eu
git clone git@github.com:angular/angular.git angular2_test_size
cd angular2_test_size
npm install
gulp build/packages.dart
gulp build.dart.material.css
cd dist/dart/playground
sed -i -e 's!minify: false!minify: true!' pubspec.yaml
pub get
pub build
for f in `find . -name '*.dart.js'` ; do
echo "$f:"
echo " raw: `cat $f | wc -c` bytes"
echo " gzipped: `cat $f | gzip -9 | wc -c` bytes"
echo ""
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment