Mix compiler that ensures npm packages are installed.
Add to your project's compilers list to automatically install
npm dependencies during mix compile:
def project do
[
compilers: [:npm | Mix.compilers()],
...
]
endChecks if npm.lock exists and node_modules/ is populated.
Only runs the full install if needed.