wunderio/WunderMachina

Add NVM

Closed this issue · 2 comments

Let developers write bash scripts to install their favorite node versions and do stuff.

This issue is super vague. I understand that you want more freedom but can you define your usecases instead?

  1. We do not want to commit generated code (css) and builds (node_modules) in repositories
  2. We do not want to force back-end developers to learn every new trend in front-end
  3. We want code to be documentation, so that front-ender can see script and learn from it

Typical use case is adding script to build process that installs development dependencies, compile and build front-end stuff (react, gulp, etc.), remove development dependencies, install runtime dependencies and exit.

This requires separate set of stacks and separate tasks to be run in various directories all over Drupal build.

For that to happen we will provide developers with NVM in WunderTools.

Lets say we need to compile CSS and install some runtime dependencies for theme. We will write bash script like...

nvm use v7.8.5
yarn install --dev
gulp production
yarn install
(exit, return status?)

This script can be added to build process (for back-end developers to get theme built) and to deploybot (to get theme built on environments). Front-enders can use this to glance at requirements and steps to build local stacks.