phase2 / p2-theme-core

Core configuration for Pattern Lab Starter/Particle v9
16 stars 22 forks source link

Reduce dependencies initiative #18

Open EvanLovely opened 7 years ago

EvanLovely commented 7 years ago

I'd like to get less dependencies in so we can have quicker npm installs. We can look for tasks that can be done with vanilla JS that don't need a plugin and also look for dependencies that our dependencies pull in that can be used. Here's a few ideas:

Additionally, I'd like to move more towards plain node & JS and less gulp. I still think gulp is fantastic for the command line execution of tasks and all of it's watches, but those commands just fire functions, so we shouldn't need to abstract them away unless there's a benefit. One benefit is the use of in-memory streams via .pipe() for multiple transformation of files; like CSS and JS.

grayside commented 7 years ago

Avoid she'll commands for filesystem, node.js fs package helps with portability.

You could potentially use vinyl directly for memory filesystem, but at that point you're creating your own lightweight task runner.

RedLucas commented 7 years ago

Regarding removing lodash... You could always just include a subset of this dependency such as https://www.npmjs.com/package/lodash.templatesettings.

I'm personally a fan of including something like lodash, because while you can always write stuff yourself, it can make your own code cleaner to use something like lodash instead.

Having said that, I'm just trying to contribute.