Welcome Guest, Not a member yet? Register   Sign In
Recommended path for npm
#5

(This post was last modified: 07-19-2020, 12:44 PM by captain-sensible.)

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 :

Code:
npm install

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}
Reply


Messages In This Thread
Recommended path for npm - by aswinkumar863 - 07-13-2020, 05:27 AM
RE: Recommended path for npm - by jreklund - 07-13-2020, 05:43 AM
RE: Recommended path for npm - by aswinkumar863 - 07-15-2020, 04:02 AM
RE: Recommended path for npm - by captain-sensible - 07-19-2020, 12:35 PM
RE: Recommended path for npm - by aswinkumar863 - 07-21-2020, 11:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB