This Ruby gem holds all shared assets used throughout the O'Reilly Atlas platform.
For reference, visit the online style guide documentation included in this gem.
To use in a new Rails application, add the gem to your Gemfile, and add the following to your CSS (
app/assets/stylesheets/application.css) and JS (
*= require atlas_assets
Along with all the CSS and JS widgets, it will include our base bundle of JS libraries (
backbone.js, etc). It will also set up a number of JS namespaces
window.constants, so make sure to include the JS manifest before any of your JS code.
If you need to, you can import individual stylesheets from this gem in your application:
To get started on your own machine first install the required gems with bundler"
Then to run the site and watch for changes run:
foreman start -f Procfile.dev
This will launch the jekyll command as well as a second script to watch for changes to stylesheets and write those changes to
docs/ignore to trigger rebuilds from jekyll. That folder is ignored by git and can be safely deleted.
Adding new styles
If you need to add or change styles in this gem, first get a local environment set up:
- Clone down the gem to your local machine
bundlefrom the gem root
- Fire up jekyll by running
jekyll serve --watch
You now have the site running in your browser on
localhost:4000. Now follow these steps to add and document the new style(s):
- Create you own feature branch
- Implement your style by tweaking the CSS and checking the documentation on
localhost:4000. Do not work from the specific Atlas Rails app by updating the gem constantly. All new styles should be developed using the
docs, and should be independent from a particular application.
- When ready, bump the version number in
bundle updateand send a pull request to the master branch.
- When the pull request has been accepted, we'll publish the gem by running
gem build atlas_assets.gemspecand
gem push [NAME].gem.
- Bump the
atlas_assetsgem version in your apps
bundle, and use the new styles.