apostrophe
apostrophe copied to clipboard
Adding autoprefixer
I'd like to use sass and a custom build script so I can use autoprefixer and other tools.
Do I need to do this outside of the Apostrophe's build system?
Do I just need to install gulp and sass the way I would in any other project, then load up my compiled css via the "assets" property in app.js?
Thanks!
Hey Jacob,
You've got two options as far as adding assets:
-
- You can use Gulp and Sass to create compiled CSS files and simply add them to the
assetsoption inapp.js. This will allow your files to take advantage of the minification in Apostorphe's build process.
- You can use Gulp and Sass to create compiled CSS files and simply add them to the
-
- If you want to handle your own minification, you can add a new directory in the top-level
publicdirectory as anything in there is served there at the base url (i.e.yoursite.com/css,youssite.com/jsoryourtsite.com/your-new-directory). Then simply link to your compiled stylesheet as you would typically do in another project.
- If you want to handle your own minification, you can add a new directory in the top-level
Let me know if that helps!
Closing for hygiene, but let us know if you have further questions!