A
A
Anton Shamanov2021-02-12 20:50:11
css
Anton Shamanov, 2021-02-12 20:50:11

Building assets files from npm folders?

The project has a bunch of modules ( npm ) with js and css / scss files included. Modules contain a bunch of development files that production doesn't need.
I would like to collect all the necessary files together in "./public/assets". I used to use 3-4 modules in a project and build them with grunt , but because in this project there are already 15 modules, and the structure is different for everyone, then it is impossible to write a universal task.
The question arose: how to automate the assembly so that you do not have to manually write a task for each module?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arseny, 2021-02-13
@SilenceOfWinter

In the main directory of the project, create a build file that will import the dependencies from node_modules and compile them into the final build. For scss, this is for example @import 'node_modules/..'. Popular solution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question