This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

dzianisyaukhuta53053
dzianisyaukhuta53053

Hello. How can I include npm packages in my theme? What practices exist? Any docs?

Eoler
Eoler

dzianisyaukhuta53053 said: How can I include npm packages in my theme? What practices exist? Any docs?

Just put package.json in theme root and use asset combiner to include from there: https://octobercms.com/docs/markup/filter-theme#combine-css-javascript

or use Gulp (or Webpack or Rollup etc.), example: https://github.com/Eoler/oc-ui3kit-theme

dzianisyaukhuta53053
dzianisyaukhuta53053

Eoler said:

dzianisyaukhuta53053 said: How can I include npm packages in my theme? What practices exist? Any docs?

Just put package.json in theme root and use asset combiner to include from there: https://octobercms.com/docs/markup/filter-theme#combine-css-javascript

or use Gulp (or Webpack or Rollup etc.), example: https://github.com/Eoler/oc-ui3kit-theme

Seer, can you write example of simple packaje.json file for me...

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.