Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 12 additions and 0 deletions.
  1. +12 −0 README.markdown
12 README.markdown
@@ -26,6 +26,8 @@ You can visit http://localhost:4000/examples/ for viewing some sample code, or h
Getting Started
+In case you're looking: [Building Inject From Source](
We've put together a [Getting Started With inject Guide]( which is a launching point to all to functionality inject has to offer. If you're already familiar with CommonJS-style modules, than you can probably start right there.
Writing CommonJS Compliant Modules
@@ -45,6 +47,16 @@ = waterfowl
If you injected this file, you could then say `var duck = new` and instantiate your object.
+JavaScript Minifiers
+If you're using a JS Minifier for your module files (and you probably should), there are some important compilation options you need. Many minifiers obfuscate and optimize variables inside of functions, which will affect the ability of inject to identify your dependencies before runtime. For the greatest in-browser optimization, we recommend using [UglifyJS]( since it allows you to protect specific reserved names while still mazimixing the amount of compression you can do. If running node isn't an option, YUI and Google compressors can also be used with the following options:
+* UglifyJS: `--reserved-names “require,exports,module"`
+* YUI Compressor: `--nomunge`
+* Google Closure: `--compilation_level WHITESPACE_ONLY`
+If your compression engine of choice isn't on the list, and has the ability to protect/preserve certain names, send us a bug with the settings and we'll add it to the list. As a last ditch effort, you can often put an `eval();` after your return statement. For most optimizers, the addition of an eval will prevent variable munging within the current scope chain.
API Notes
Path Resolution

No commit comments for this range

Something went wrong with that request. Please try again.