Sha256: ab3cdced0cd52cf48081243df9c8d158fe5a55213607dd4c4a6887e07ba4b24d
Contents?: true
Size: 811 Bytes
Versions: 3
Compression:
Stored size: 811 Bytes
Contents
# Opal Dependency Example This example shows how easy it is to use gem dependencies with opal to easily maintain app dependencies. Dependencies in opal are referenced from the rake task, and they must be installed as system gems, or through bundler. ## Setting up To ensure the required gems are installed, just run bundler: ``` bundle install ``` ## Building dependencies To build the gem dependency (`opal-json`), as well as the opal runtime `opal.js`, just use the simple rake task: ``` rake dependencies ``` This will build the two files into `./build`. ## Building the app Again, a simple rake task is available: ``` rake build ``` Which will build `./build/my-app.js` ready for use. ## Running application Simply open `index.html` and observe the parsed json string as a ruby hash instance.
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
opal-0.3.20 | examples/dependencies/README.md |
opal-0.3.19 | examples/dependencies/README.md |
opal-0.3.18 | examples/dependencies/README.md |