-
Notifications
You must be signed in to change notification settings - Fork 45
Add fields to elm-package.json for argument-less elm-make #49
Comments
This is what I meant in #23. Sublime is already doing this 👍 I could migrate to use these fields. |
If only one Main is allowed in this proposal, then we can eliminate a class of errors by replacing e.g. @rehno-lindeque - you guys currently have a use case for multiple mains, right? Is there another way you could accomplish the same thing, such as multiple |
For that use case in Sublime we just assumed it's have to be passed into the CLI. |
@rtfeldman That's right - every widget we have has a |
What's your process currently? |
Mmm, well it's pretty simple really - I remember now that we're not even directly using elm_modules=`printf "\
\nsrc/Bom/Substitutes/Main.elm\
\nsrc/ConsignSource/Main.elm\
\nsrc/Footprint/Main/Overlay.elm\
\nsrc/Symbol/Main.elm\
\nsrc/Dashboard/Main.elm\
\nsrc/ProjectUpload/Main.elm\
\nsrc/Board/Main.elm\
\nsrc/UserPart/Main.elm\
\nsrc/UserSource/Main.elm"`
elm-make $elm_modules --output client/elm-components/elm-components.js --yes || die |
I still don't understand well. Should we use one large |
@jinjor at least for us, there's a huge amount of shared code that gets compiled into our javascript output. I'd say just open your |
Ah, now I understand what you meant, thanks. I'm not sure it should become the standard way, but in many cases it seems better considering browser cache. |
I want a way to add constraints appropriate for a package vs a product. (Products get exact constraints whereas packages get the widest verifiable constraints possible.) @laszlopandy, what do you think of making the |
A big +1 to making them mutually exclusive! We still accidentally mess this up all the time. Would be an added bonus if the |
Interesting, that seems very nice @rtfeldman. @rehno-lindeque, do you have opinions on this? (This would also be independent of a I am struggling to think of legitimate cases of something being both a package and a product. When we add support for "local packages" via I have been playing with the idea of having something like |
Maybe it should be named And then some projects are packages and some are products. That's determined by whether you use |
Love the idea of I'm not even sure what it would mean to import someone else's publicly-published package that had a Also as far as |
I wouldn't let that happen, so let's not go too deep into that. It was more a question of "are there times when a single project is legitimately both a package and a product?" But if that's ever the case, it seems like you could make 99% of things a package and the I think the I did a bit more thinking on the idea of pinning to exact dependencies. This would mean running I'm going to open an issue summarizing the current state of affairs. |
I propose adding two fields to
elm-package.json
:"main-modules" : [ "Main" ],
which would search forMain.elm
inside all definessource-directories
. Multiple main modules are also allowed."build-output" : "build/my-app.js",
which would be used as the default output pathWith this, instead of writing:
elm make src/Main.elm --output build/my-app.js
I can simply write:
elm make
and it will know what to do. This is a big win because you can checkout any elm project and build it without reading any instructions.
The text was updated successfully, but these errors were encountered: