Answer the question
In order to leave comments, you need to log in
How to properly split assets?
There is a project for which I made a mobile version. The mobile version does not need a full set of external styles and js libraries, but there are a couple of common ones. Mobile assets in the resulting files of the general version are also not needed. I tried to exclude from the general version with the stub option, but then shared libraries are excluded from it. How do you usually act in such situations?
/assets
/javascripts
application.js(main version)
main_version_js_files
/mobile_version_folder
application.js
some_js_files
/stylesheets
application.css
main_version_css_files
/mobile_version_folder
application.css
some_css_files
Answer the question
In order to leave comments, you need to log in
I'll show you with an example of styles
assets/
stylesheets/
mobile/
shared/
application.scss
mobile.scss
shared.scss
@import 'bootstrap';
@import 'jquery-ui';
@import 'shared/*';
@import 'shared';
@import .......
@import 'shared';
@import 'mobile/*';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question