Node.js noobie is trying to follow the tutorial - you need to change the link to jade on a pug

I am trying to follow this guide to learn about node.js:

http://cwbuecheler.com/web/tutorials/2014/restful-web-app-node-express-mongodb/

When I run "npm install", some of the messages I see include the following:

npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer

And then he goes ahead and seems to have configured the application anyway. My package.json file currently looks like this:

{
  "name": "testapp",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "start": "node ./bin/www"
  },
  "dependencies": {
    "body-parser": "~1.13.2",
    "cookie-parser": "~1.3.5",
    "debug": "~2.2.0",
    "express": "~4.13.1",
    "jade": "~1.11.0",
    "morgan": "~1.6.1",
    "serve-favicon": "~2.3.0",
    "mongodb": "^1.4.4",
    "monk": "^1.0.1"
  }
}

Questions: (these questions apply to both packages that I was warned about, but for discussion I'm just going to select jade / pug)

jade pug, package.json? , - ? , , npm? package.json npm?

, , , , node? , ... , , , . ... , .

, .

+4
2

, , . jade pug, :

npm uninstall jade --save

npm install pug --save 

, pug@1.1.0, , . , JSON https://docs.npmjs.com/files/package.json, . , .

, package.json, prune:

npm prune

, json ( )

, npm - . , , ,

nb: .pug .jade

+12

jade/pug Node.js/Express, :

app.set('view engine', 'pug')

npm install pug --save 

​​ pug@2.0.0-beta11 2017. .jade, , :

a(href="/#{link}")

to

a(href=link)

Breaking Changes # 2305

+2

Source: https://habr.com/ru/post/1649581/


All Articles