PYRO theme with GULP

ashot13 - 2 months ago

hi guys, I have question about PYRO CMS Gulp compiling, I want to disable PYRO scss files compiling on page refresh and do it only with gulp, PYRO's scss compiling is taking very long time sometimes, I tried to run my scss with gulp, but it looks like nothing has happened, can anyone help with that issue?

william - 2 months ago

Hi! I always use gulp/mix/webpack/or such to compile/concatenate sass or js. When you run gulp, what does it say? where have you specified the finished css to be saved? Are you sure it is saved? How do you add that css file into your theme?

Basically:

1) Run gulp and make sure you store your css somewhere. As an example within your theme and the css directory.
2) In your theme files, make sure you add it in {{ asset_add("theme.css", "theme::css/yourcss.css") }}
3) Then you could use either a loop if you have added more styles to the collection, or just do: {{ asset_style("theme.css") }} to output the css.

You will find information on this in the documentation, how to use the assets.

william - 2 months ago

I started to write something on this here : https://williamastrom.se/blog/how-to-setup-pyrocms-theme-and-vue-js-development-environment

But it's crappy.. but maybe you get some hints.