This repo was archived after AMP decided to stop using Closure compiler. See ampproject/amphtml#35264 for more details.
This repo is a fork of the official Google Closure Compiler with added configuration for AMP's specific runners.
You can inspect them under the src
directory.
This is not intended to be used outside the AMP Project, and no support is guaranteed.
If you're looking to use Closure Compiler for your project, here are some great places to get started:
- https://github.com/ampproject/rollup-plugin-closure-compiler
- https://github.com/google/closure-compiler-npm
- Clone this repo (
ampproject/amp-closure-compiler
)git clone [email protected]:ampproject/amp-closure-compiler.git
- Install packages
cd amp-closure-compiler npm install # This will create node_modules/google-closure-compiler-java/compiler.jar
- Make your edits
- If you want to make changes to Google Closure Compiler itself:
- Clone https://github.com/google/closure-compiler/ (
google/closure-compiler
)git clone [email protected]:google/closure-compiler.git
- Make your edits to
google/closure-compiler
- Build
google/closure-compiler
- Link your built
google/closure-compiler
toamp-closure-compiler
'scompiler.jar
# Run this from your source root directory ln -s closure-compiler/bazel-bin/compiler_unshaded_deploy.jar \ amp-closure-compiler/node_modules/google-closure-compiler-java/compiler.jar
- Clone https://github.com/google/closure-compiler/ (
- If you want to make changes to Google Closure Compiler itself:
- Build
amp-closure-compiler
npm run clean npm run build
- There should now be several built node modules in
amp-closure-compiler
's/packages/
directory. You need to link them to themfor dir in `ls packages/`; do; cd packages/$dir; npm link; cd ../..; done
- In
amp-closure-compiler
, you need to link these node modules:npm link @ampproject/google-closure-compiler npm link google-closure-compiler-java npm link google-closure-compiler-osx # may fail if you're not on OSX npm link google-closure-compiler-linux # may fail if you're not on Linux npm link google-closure-compiler-windows # may fail if you're not on Windows