lamdera
v0.19.1-1.3.2
Published
npm install wrapper for Lamdera
Downloads
1,580
Maintainers
Readme
Lamdera NPM Installer
Lamdera is a delightful platform for full-stack web apps built with Elm.
The Lamdera compiler is a super-set of the Elm compiler and a drop-in replacement: you can use lamdera
on your existing non-Lamdera Elm projects in the same way you use elm
.
Beware of Elm IDE gotchas, you'll need to set Lamdera as your Elm compiler.
What is this package for?
Normal installs ❌
Use the instructions here instead.
Lamdera has no dependency on npm
to develop locally, so there's no reason to introduce it unless you specifically want to use npm
for other reasons.
It will also mean you have duplicate copies of the lamdera binary in every single node_modules
.
Tooling author ✅
If you're a tooling author, use Lamdera as a dependency and npm as a distribution method, then you could use this package to manage the dependency and installation.
npm install --save-dev lamdera@latest
It still has the duplication per node_modules
problem.
Multiple versions ⚠️
You could also use this package to use different versions of Lamdera in different projects. I.e. npm install lamdera@latest
in each project and use the binary at ./node_modules/.bin/lamdera
for compilation. However this is generally not recommended. Lamdera users should always use the latest release, as that's what is used when you do a lamdera deploy
.
Continuous integration ⚠️
This works, but there are usually faster and more reliable options:
- You can download
lamdera
directly from the downloads page. This is all thenpm
installer does, but with extra HTTP requests tonpmjs.com
servers, making it slower and adding more failure points. - Many continuous integration pipelines offer ways to cache files (i.e. github actions cache) to make builds faster and more reliable.
That said, it will definitely work to use the npm
installer on CI if you prefer that option.
Install Locally
The following command should download the latest Lamdera binary:
npm install lamdera@latest
You should be able to run npx lamdera --version
within your project and see 0.19.1
(the base Elm version), or --version-full
to see the full Elm + Lamdera release version. Now you can develop with npx lamdera live
.