Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define generators for Rails's assets pipeline #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Nerian
Copy link
Contributor

@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
Copy link

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
Copy link
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
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants