2.2.0 • Published 7 years ago

elm-project-loader v2.2.0

Weekly downloads
2
License
MIT
Repository
-
Last release
7 years ago

elm-project-loader

Specify location of main modules to build using an elm project file.

Usage

  1. Install the node package
npm install elm-project-loader
  1. Add the .elmproj webpack loader.
module: {
   loaders: [{
      test: /\.elmproj$/,
      loader: 'elm-project',
   }],

   noParse: /\.elmproj$/,
},
  1. Require an elm project file
var Elm = require('./path-to-elm-project.elmproj')

Project File Structure

A JSON file that specifies the location of the elm-package.json, the main files to build, and the root of your project files.

Assuming the file structure:

/app
   /src
   |   /elm
   |----  /Components
   |-------- /WidgetA
   |----------- Main.elm
   |-------- /WidgetB
   |----------- Main.elm
   |
   elm-package.json
   my-app.elmproj

The .elmproj file

{
   "elm-package-dir": "./",
   "main-modules": [
      "./src/elm/Components/WidgetA/Main.elm",
      "./src/elm/Components/WidgetB/Main.elm"
   ]
}
2.2.0

7 years ago

2.1.0

8 years ago

2.0.0

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago