Vendor Asset Pipeline
I searched on google but only found subject on rails 3, and documentation of the rails 4 saw that project/vendor/assets is not recommended.
my html page will use many plugins, and are separated by folders, and within each folder has .js, .css, .png
will be impossible to separate each file (js, css, ...) of each plugin put into their respective folders: app/assets/javascripts, app/assets/stylesheets ...
How do I create a folder app/assets/vendor and map all the way plugins as they are today in my html template?
How do I import them in my html? In pure html I do so today (example):
<link rel='stylesheet' type='text/css' href='assets/plugins/codeprettifier/prettify.css' />
<link rel='stylesheet' type='text/css' href='assets/plugins/form-toggle/toggles.css' />
<script type='text/javascript' src='assets/plugins/charts-flot/jquery.flot.resize.min.js'></script>
<script type='text/javascript' src='assets/plugins/charts-flot/jquery.flot.orderBars.min.js'></script>
I created a plugins folder within the assets, like this:
assets/plugins/form-toggle/toggles.css assets/plugins/form-toggle/toggles.min.js
in assets/javascripts/application.js file I added: //= require toggle.min
in assets/stylesheets/application.css file I added: //= require 'toggles'
链接地址: http://www.djcxy.com/p/79020.html上一篇: AudioQueueStart失败
下一篇: 供应商资产管道