New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

parcel-resolver-elm-bundle

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parcel-resolver-elm-bundle

Easy bundling of multiple elm source files into a single output with the parcel bundler

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
465
increased by21.73%
Maintainers
1
Weekly downloads
 
Created
Source

Parcel resolver elm bundle

This is a resolver for parcel to make it easier to bundle multiple elm source files into one.

It does the equivalent of this elm compiler command.

elm make MainA.elm MainB.elm MainC.elm

Usage

  1. Add the resolver to your .parcelrc before other resolvers.
{
  "extends": "@parcel/config-default",
  "resolvers": ["parcel-resolver-elm-bundle", "..."]
}
  1. Add a section elm-bundle section to your package.json, and define which elm entry points belong to a bundle.
{
  "elm-bundle": {
    "widget-a": [
      "./src/Main.elm",
      "./src/MainB.elm",
      "./src/MainC.elm"
    ]
  }
}
  1. Reference your defined bundle(s) from your JavaScript. Now, the files Main.elm, MainB.elm, MainC.elm from the src folder will be compiled into the same output.
import {Elm} from 'elm-bundle:widget-a';

How does it work?

Under the hood The resolver will rewrite this

import {Elm} from 'elm-bundle:widget-a';

into this

import {Elm} from './src/Main.elm?with=./MainB.elm&with=./MainC.elm';

Keywords

FAQs

Package last updated on 05 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc