A
A
Anton M2020-08-26 11:55:03
CMS
Anton M, 2020-08-26 11:55:03

How to make friends with the build system cms?

I recently started integrating layout into MODX and the question arose about setting up the build.
I have webpack automation set up. Image compression, scss compilation, etc. are configured in it. It works on a local node.js server.
Now the development goes like this: I write the code locally, compile it and upload it to the server in the assets folder.

Is it possible to develop directly on the server?

And so, to use purecss. The way it works is that it goes through all the html files and matches them with style classes. But in MODX the code is usually divided into chunks.

I see this method: sync the assets folder on the server with the local folder. Accordingly, when changing it, you will not need to manually upload files to the server. But then you will need a small crutch for purgecss. It turns out that it is necessary to add the necessary classes corresponding to the classes in the chunks to the local html file.
And another point is that a bunch of npm packages are downloaded locally, and if someone else needs to fix something on the site, they will first need to deploy the project locally.

Do you know other solutions to this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2020-08-26
@SilenceOfWinter

Most ide's have a "Create a project from existing files" option with the ability to specify a remote ftp server - first, the ide downloads the files to the project and syncs them with ftp.
it makes sense to use purgecss already at the stage of creating a build + store css in files and load / group using Dmitrijs Balcers in css files of blocks / chunks i.e. create "modules": button.css, form.css, list,css and import them in block/chunk style - left_menu.css(button.css, list,css), right_menu.css(button.css, list,css, form.css)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question