Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bom-d-van/view_assets
A new management method of rails assets.
https://github.com/bom-d-van/view_assets
Last synced: about 1 month ago
JSON representation
A new management method of rails assets.
- Host: GitHub
- URL: https://github.com/bom-d-van/view_assets
- Owner: bom-d-van
- License: mit
- Created: 2012-12-17T02:23:44.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-10-18T00:42:21.000Z (about 10 years ago)
- Last Synced: 2024-04-16T00:15:34.771Z (7 months ago)
- Language: JavaScript
- Size: 16.7 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# ViewAssets [![Build Status](https://travis-ci.org/bom-d-van/view_assets.png?branch=master)](https://travis-ci.org/bom-d-van/view_assets)
A new method to manage assets in a rails project.
Instead of using the default assets managing style in rails 3.2, this gem will introduce a new way to manage your assets.
This is only a prototype of the whole project, the fullfledged version will publish soon.
It works like assetpipeline, but comes with different conventions. It doesn't include all your assets simply even if you have view/page or controller specific assets. It is page-specific.## Conventions/Rules
According to ViewAssets, there are three folders in `/public` folder:
* vendor
* lib
* appEach sence of them are the same as in rails3 assetpipeline.
## DIRECTIVES
for javascript
double-slash syntax => "//= require_vendor xxx"
space-asterisk syntax => " *= require_vendor xxx"
slash-asterisk syntax => "/*= require_vendor xxx */"for stylesheets
space-asterisk syntax => " *= require_vendor xxx"
slash-asterisk syntax => "/*= require_vendor xxx */"## Usage
First, include `ViewAssets` in `helpers/application_helper.rb`
```ruby
module ApplicationHelper
include ViewAssets
end
```Add some other codes in your `views/layouts/application.html.rb`
```ruby
<%= include_assets_with_assets_mvc(params[:controller], params[:action]) %>
```If some of your controllers use their own layout file, and following rules in ViewAssets, then you should add that code above too.
This project rocks and uses MIT-LICENSE.