Reputation: 855
We have a Grails app with loads of javascript files in the /web-app/js folder and we recently installed the Asset Pipeline Plugin... but just recently. The app is a few years old now.
We don't want to move all js files from /web-app/js folder to /grails-app/assets/javascripts folder since we might break some of the gsp files that are using those resources directly.
Let's suppose we have the file: /web-app/js/myscript.js
We want to create a matching file in the assets folder... /grails-app/assets/javascripts/myscript.js
... but that file should be empty except for one line like:
//=require /web-app/js/myscript.js
So the file in the assets folder only points to the real file in web-app folder. The problem is that the above manifest line does not work.
The above might not make too much sense for just one file. But what we really want is to include several files (that already exist in /web-app/js folder) and use the Asset Pipeline Plugin to compile them all.
Is it possible? Thanks a lot.
Upvotes: 3
Views: 1798
Reputation: 2931
Unless the default changed in the more recent versions of the asset pipeline, just lose the /web-app
prefix - the plugin searches both locations for compatibility reasons (think of all the plugins that aren't asset pipeline aware and would have to be modified..)
EDIT: in fact, looking at the Asset Pipeline documentation, you can loose /js
as well since all folders under /web-app
will be searched for the referenced file name.
Upvotes: 1