0.19.1-1.2.1-1 • Published 6 months ago

lamdera v0.19.1-1.2.1-1

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
6 months ago

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:

  1. You can download lamdera directly from the downloads page. This is all the npm installer does, but with extra HTTP requests to npmjs.com servers, making it slower and adding more failure points.
  2. 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.