(07-19-2020, 12:35 PM)captain-sensible Wrote: ok I will give you the quickish, around the houses answer where i give you an example of installing gulp using npm.
I just used npm to install gulp into a new development directory called "appstarter" yes i have no imagination but it keeps the reduces the amount of decisions.
I'm on Linux (slackware - of course :^) )
So i did a change directory to (the root of the directory ) /var/www/htdocs/appstarter
I did re-use previous package.json i will put it here for perusal .
Code:
{
"name": "CI4",
"version": "1.0.0",
"description": "sass & gulp",
"main": "gulpfile.js",
"dependencies": {
"bootstrap": "^4.5.0",
"browser-sync": "^2.26.10",
"gulp-autoprefixer": "^6.1.0",
"gulp-clean": "^0.4.0",
"gulp-clean-css": "^4.3.0",
"gulp-concat": "^2.6.1",
"gulp-minify-css": "^1.2.4",
"gulp-rename": "^1.4.0",
"gulp-sass": "^4.1.0",
"gulp-uglify": "^3.0.2"
},
"devDependencies": {
"gulp": "^4.0.2",
"gulp-sourcemaps": "^2.6.5"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "andy",
"license": "ISC"
}
SO all i had to do was run :
which was done from the root of the appstarter dir
I put a gulpfile.js also at the root ; so i simply take that into consideration with converting scss into css.
Couple of things though; i'm a bit old school have known and previously used composer and begining to see the benefits when things need up dating. So you see "bootstrap": "^4.5.0" in the package.json , well i decided to use composer for the sass version of bootstrap which is :
Code:
composer require twbs/bootstrap
Also for me on Linux i needed to install nodejs
I first as root ran :
[CODE]
# npm install --global gulp-cli
[/CODE}
If I am not wrong, you are using gulp to bundle the assets in the root directory and outputs it in public directory. So that you can access it. Seems Legit.