Skip to content

Recommendations for migrating to pug? #17

Description

@TysonAndre

EDIT: It seems like connect-jade-static was an unused dependency of the project I'm looking at. Leaving this open in case it helps anyone with similar issues

For example, a new major release could be published that supported pug instead of jade, add .pug to ext and allowedExt, and warn if files still end in .jade the first time they get loaded.

The following patch seems to be the minimum needed to switch to pug (version is arbitrary). npm test passes with that.

Or would you recommend another project - I'm not sure of the status of this repo

diff --git a/index.js b/index.js
index 927e648..1a2ddf8 100644
--- a/index.js
+++ b/index.js
@@ -1,6 +1,6 @@
 var path = require('path'),
   fs = require('fs'),
-  jade = require('jade'),
+  jade = require('pug'),
   url = require('url'),
   assert = require('assert');
 
diff --git a/package.json b/package.json
index e29229b..dee4cab 100644
--- a/package.json
+++ b/package.json
@@ -21,7 +21,7 @@
     "compile"
   ],
   "dependencies": {
-    "jade": "*"
+    "pug": "^2.0.4"
   },
   "devDependencies": {
     "mocha": ">=1.12.0"

Activity

  1. runk commented on Mar 12, 2020

    @runk
    Owner

    I'm happy to add you as a maintainer if you keen to fix it. ;)

  2. TysonAndre commented on Mar 12, 2020

    @TysonAndre
    Author

    EDIT: It seems like connect-jade-static was an unused dependency of the project I'm looking at. Leaving this open in case it helps anyone with similar issues

    Thanks - I'd be interested if I was actively using it, but I don't think I'd be able to validate it properly or be responsive enough since the dependency turned out to be unused and I'm busy with other projects.

  3. runk commented on Mar 12, 2020

    @runk
    Owner

    Yeah, I'm in the same boat. 🤷‍♂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions