Skip to content

Define generators for Rails's assets pipeline #59

Open
wants to merge 1 commit into from

3 participants

@Nerian
Nerian commented Jan 25, 2012

Configure the widget generator to create both js and css files for Rails's assets pipeline.

It uses coffeescript and css, but I would like to make it use the right option according to the actual Rails configuration file (use sass, if the css framework is configured to use sass). I am not sure how to do that. Any idea?

@audionerd

This would be helpful for new users. When I started using apotomo, I didn't know where to place coffeescripts – I thought I could keep them in the same folder as my widget, but soon realized that didn't work.

This generator would have helped me place related assets for my widget in a standardized location.

Is there a reason you're using CSS and not SCSS?

@apotonick
Owner

My goodness, I completely missed this pull request. It goes hand in hand with an email I just received.

Is it possible to place assets (coffeescripts) along-side the widget views and package them all up together? I'd like to have a self-contained widget that includes it's own CoffeeScript and SCSS libraries if possible, but I didn't see that documented anywhere.

First step would be merging this PR and documenting the changes. Second would be changing Apotomo's (Cells!) file structure to be self-contained, right?

@Nerian
Nerian commented Jun 8, 2012

@audionerd

I used css because that is the standard in Rails, but it should probably be refactored to use whatever is defined as the default stylesheet format ( be it css, SASS or SCSS).

@apotonick

I think I proposed something like that in another pull request:

#65 (comment)

But in retrospective, I no longer think it would be a good idea to package css and js in the same folder. I think the assets folder with a subfolder with the name of the widget would be the proper place. And if the developer wants to distribute the widget, he just have to put those assets in vendor/assets/widget_name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.