11ty / eleventy-base-blog

A starter repository for a blog web site using the Eleventy static site generator.

Home Page:https://eleventy-base-blog.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can I use eleventy installed in node_modules?

rnike opened this issue · comments

commented

Hello, I'm new to eleventy and have a question while starting with this repo.

I'm curious about why the scripts in package.json be using npx @11ty/eleventy instead of eleventy installed in node_modules with npm install since @11ty/eleventy is already added as a dependency?

I am changing package.json to below

   "scripts": {
-    "build": "npx @11ty/eleventy",
-    "bench": "DEBUG=Eleventy:Benchmark* npx @11ty/eleventy",
-    "watch": "npx @11ty/eleventy --watch",
-    "serve": "npx @11ty/eleventy --serve",
-    "start": "npx @11ty/eleventy --serve",
-    "debug": "DEBUG=* npx @11ty/eleventy"
+    "build": "eleventy",
+    "bench": "DEBUG=Eleventy:Benchmark* eleventy",
+    "watch": "eleventy --watch",
+    "serve": "eleventy --serve",
+    "start": "eleventy --serve",
+    "debug": "DEBUG=* eleventy"
   },

I assume the functionality will still be the same after the change and the performance will be better because it skips the npx stuff and uses eleventy installed in node_modules.

But I may probably be wrong, please correct me if so, thanks.

This is an automated message to let you know that a helpful response was posted to your issue and for the health of the repository issue tracker the issue will be closed. This is to help alleviate issues hanging open waiting for a response from the original poster.

If the response works to solve your problem—great! But if you’re still having problems, do not let the issue’s closing deter you if you have additional questions! Post another comment and we will reopen the issue. Thanks!