Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shouldn't jake be a devDependency? #510

Open
kirillgroshkov opened this issue Apr 24, 2020 · 13 comments
Open

Shouldn't jake be a devDependency? #510

kirillgroshkov opened this issue Apr 24, 2020 · 13 comments

Comments

@kirillgroshkov
Copy link

Shouldn't jake be a devDependency?

@ben-tbotlabs
Copy link

ben-tbotlabs commented Apr 24, 2020

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

┬ ejs@3.1.2
│ └─┬ jake@10.6.1
│   ├── async@0.9.2
│   ├─┬ chalk@2.4.2
│   │ ├─┬ ansi-styles@3.2.1
│   │ │ └─┬ color-convert@1.9.3
│   │ │   └── color-name@1.1.3
│   │ ├── escape-string-regexp@1.0.5 deduped
│   │ └─┬ supports-color@5.5.0
│   │   └── has-flag@3.0.0
│   ├─┬ filelist@1.0.1
│   │ └── minimatch@3.0.4 deduped
│   └── minimatch@3.0.4 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

@kirillgroshkov
Copy link
Author

I still think it was added by mistake

@mde
Copy link
Owner

mde commented Apr 24, 2020

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.

@RyanZim
Copy link
Collaborator

RyanZim commented Apr 24, 2020

I'll throw in my vote for a separate CLI

@ryanburnette
Copy link

ryanburnette commented Apr 29, 2020

@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

@mourner
Copy link

mourner commented May 10, 2020

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.

@allnulled
Copy link

allnulled commented May 19, 2020

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.

@zce
Copy link

zce commented Jul 22, 2020

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

@sseide
Copy link

sseide commented Dec 14, 2021

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

Repository owner deleted a comment from mourner Dec 14, 2021
@arthanzel
Copy link

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.

@mde
Copy link
Owner

mde commented Jan 9, 2022

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

@arthanzel
Copy link

I'd be happy to contribute one

@allnulled
Copy link

allnulled commented Jan 11, 2022

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/ejs@3.1.6/ejs.min.js

arthanzel added a commit to arthanzel/ejs that referenced this issue Jan 25, 2022
EJS CLI introduced `jake` as a prod dependency. The only reason for
this was to use jake's argument parsing code. The code was embedded
into utils.js instead and jake was made into a dev dependency. This PR
returns EJS to zero prod dependencies.

See https://github.com/jakejs/jake/blob/master/lib/parseargs.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants