What's the use of vue bundled in here?

I have the pages of my 10 page site in themes/demo/pages.

What is the use of npm here ? Do I need to do npm run prod each time I deploy ?

Also I seem to have package.json and node_modules at 2 locations - one in / and the other at /themes/demo

PS: I just bought a one year license for my non-profit October 4 CMS site. So now I want to seriously dig into this platform.

The package.json file in the root directory is used for developing the CMS (modules and plugins). You won’t need to run that each time you deploy.

The demo theme also uses npm to import some libraries and it won’t need to run it there either.

The only time it might be needed is if you were using Tailwind in the theme or something like this. In which case, you’d need to run it every time the theme classes change.

package.json

{
    "name": "my-theme",
    "description": "My theme Tailwind theme.",
    "scripts": {
        "dev": "tailwindcss -i ./src/css/styles.css -o ./assets/css/styles.css --watch",
        "build": "tailwindcss -i ./src/css/styles.css -o ./assets/css/styles.css"
    },
    "dependencies": {
        "@tailwindcss/typography": "^0.5.9",
        "cross-env": "^7.0.3",
        "cssnano": "^6.0.0"
    },
    "devDependencies": {
        "autoprefixer": "^10.4.14",
        "postcss": "^8.4.21",
        "postcss-cli": "^10.1.0",
        "tailwindcss": "^3.3.1"
    }
}

tailwind.config.js

/** @type {import('tailwindcss').Config} */
module.exports = {
    content: [
        './layouts/**/*.{htm,js}',
        './partials/**/*.{htm,js}',
        './pages/**/*.{htm,js}'
    ]
}
1 Like

We are also using purgeJs on bootstrap as well as I’m compiling the whole bootstrap with it, so every time we make a changes (in css/custom scss || design) we had to run it. Gives ways to update caniuse package once in a while.

1 Like