I am just getting started with Grails and trying to understand when to put files in grails-app/assets/{stylesheets|images|javascript}
versus putting things in web-app/{css|images|js}
.
1 What is the Asset Pipeline? The asset pipeline provides a framework to concatenate and minify or compress JavaScript and CSS assets. It also adds the ability to write these assets in other languages and pre-processors such as CoffeeScript, Sass, and ERB.
Go to start.grails.org and use the Grails Application Forge to generate your Grails project. You can choose your project type (Application or Plugin), pick a version of Grails, and choose a Profile - then click "Generate Project" to download a ZIP file. No Grails installation necessary!
Running a Grails Application Using run-appGo to the application directory. For example, go to the as-install /grails/samples/helloworld directory. Run the grails run-app command. The grails run-app command starts the Enterprise Server in the background and runs the application in one step.
In short, if you want your front-end resources to be managed by the Asset Pipeline plugin, you should put them in grails-app/assets
. If you don't, you should put them under web-app
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With