ejs icon indicating copy to clipboard operation
ejs copied to clipboard

Shouldn't `jake` be a devDependency?

Open kirillgroshkov opened this issue 4 years ago • 13 comments

Shouldn't jake be a devDependency?

kirillgroshkov avatar Apr 24 '20 09:04 kirillgroshkov

I think it is because of the CLI that was added on Apr 19, 2020, so it is required to be a full dependency.

But to be clear in order to add this dependency you have added the following dependency tree

[email protected]
│ └─┬ [email protected]
│   ├── [email protected]
│   ├─┬ [email protected]
│   │ ├─┬ [email protected]
│   │ │ └─┬ [email protected]
│   │ │   └── [email protected]
│   │ ├── [email protected] deduped
│   │ └─┬ [email protected]
│   │   └── [email protected]
│   ├─┬ [email protected]
│   │ └── [email protected] deduped
│   └── [email protected] deduped

One of the major selling points of EJS IMO was no module dependencies, and would much rather have the CLI added a separate npm package then add these dependencies for a CLI we are not using

ben-tbotlabs avatar Apr 24 '20 15:04 ben-tbotlabs

I still think it was added by mistake

kirillgroshkov avatar Apr 24 '20 15:04 kirillgroshkov

Yes, Jake is currently a hard dependency of the new CLI. The desire for a separate CLI package is noted. I'll definitely consider it.

mde avatar Apr 24 '20 17:04 mde

I'll throw in my vote for a separate CLI

RyanZim avatar Apr 24 '20 18:04 RyanZim

@mde I'll vote for anything that reduces dependencies.

If you aren't using the cli and don't want the extra dependencies, just fork and remove Jake from the package.json file like I did. https://github.com/ryanburnette/ejs

ryanburnette avatar Apr 29 '20 13:04 ryanburnette

I'd also like to encourage cutting out the CLI into a separate package (ejs-cli). Having no dependencies was one of the biggest advantages of this library.

mourner avatar May 10 '20 15:05 mourner

Yes, it would be very nice to not include jake + (filelist minimatch chalk async) + (...inner). If anyone wants ejs as CLI, just npm install ejs-cli, or something. In favour, this library is key in the ecosystem.

allnulled avatar May 19 '20 17:05 allnulled

I think it may be that jake needs a free advertising space, Just kidding :)

zce avatar Jul 22 '20 16:07 zce

is there some update on the new ejs cli package to remove jake and all its dependencies from ejs again?

sseide avatar Dec 14 '21 09:12 sseide

Is the only reason that Jake is included in cli.js for argument parsing? It shouldn't be too difficult to write an inline parser for such a simple program. I hardly think that yet another NPM package is the best solution here.

arthanzel avatar Jan 05 '22 21:01 arthanzel

I'd be happy to consider a PR that implements this. It was just the fastest solution I had.

mde avatar Jan 09 '22 18:01 mde

I'd be happy to contribute one

arthanzel avatar Jan 09 '22 19:01 arthanzel

I use ejs because it is the most intuitive solution for js templating I have found, and coding templates with it is really easy. I proposed already to separate ejs-cli from ejs, if ejs could be loaded as a single UMD script file from the web, it would also be incredibly powerful to be used in the web, at the level of jQuery even. But anyway, this is an author's decision.

UPDATE: well. They are doing it already. And I guess they are not the only.

https://unpkg.com/[email protected]/ejs.min.js

allnulled avatar Jan 11 '22 15:01 allnulled