Git Product home page Git Product logo

atlas_assets's Introduction

Atlas Assets

This Ruby gem holds all shared assets used throughout the O'Reilly Atlas platform.

Style Guide

For reference, visit the online style guide documentation included in this gem.

Usage

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 (app/assets/javascripts/application.js) manifest files.

*= require atlas_assets

Along with all the CSS and JS widgets, it will include our base bundle of JS libraries (JQuery, underscore.js, backbone.js, etc). It will also set up a number of JS namespaces window.classes, window.app, window.events and 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:

@import "atlas_assets/icons";

Local Development

To get started on your own machine first install the required gems with bundler"

bundle install

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:

  1. Clone down the gem to your local machine
  2. Run bundle from the gem root
  3. 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):

  1. Create you own feature branch
  2. 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.
  3. When ready, bump the version number in lib/atlas_assets/version.rb, run bundle update and send a pull request to the master branch.
  4. When the pull request has been accepted, we'll publish the gem by running gem build atlas_assets.gemspec and gem push [NAME].gem.
  5. Bump the atlas_assets gem version in your apps Gemfile, run bundle, and use the new styles.

atlas_assets's People

Contributors

bravomartin avatar orbot avatar runemadsen avatar zischwartz avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.