learn-elm icon indicating copy to clipboard operation
learn-elm copied to clipboard

package.json AND elm-package.json (do we need both) ?

Open nelsonic opened this issue 8 years ago • 3 comments

While I understand that these two files serve different purposes, I wonder if we need both and/or if we could infer one from the other?

nelsonic avatar Nov 11 '16 23:11 nelsonic

Everything I have come across says Elm is its own and separate entity. So for small projects, elm's package works fine by itself. As the community grows larger and more packages are added to the elm-packages, the need to use the normal "package.json" will grow smaller even for large projects.

Now, saying this, Elm is designed to be incorporated into larger Javascript projects. So it is made to work with a 'normal' package.json'. In How to Use Elm at Work (http://elm-lang.org/blog/how-to-use-elm-at-work), it is stress to go slow when bringing it into a large existing project.

I guess my answer to your question, is it depends on the size and needs of the project you are building.

SeanGallen avatar Dec 16 '16 23:12 SeanGallen

@SeanGallen thanks for your answer. I guess we need to contextualise the question ... We need to ensure that even the smallest module has continuous integration so we know the "build status" of every part of our stack. I don't know if Travis-CI will build an elm package without node, but as soon as we confirm this we can ditch the package.json 😉

nelsonic avatar Dec 16 '16 23:12 nelsonic

Thank you for your reply. I am still learning more about Travis-CI so I cannot answer this question with certainty but I did a quick research and found Elm's community has a Testing repo which Build passing from Travis-CI. Here is a link to it. https://github.com/elm-community/elm-test Node and npm are still used if you look at the .travis.yml file but a "node package.json" is unneeded.

I am making an assumption here so forgive me but if the testing platform can get a travis build passing status I would wager the code you TDD using the platform should also get a build status passing. (if you pass the tests.) Also, Elm is designed to fit in with Node and JS similar to how C++ was designed for C so if we need to bring in a "normal" package.json we can do so.

Again, this is only my opinion. I would love to hear your opinion especially since I need to sharp my Travis.CI knowledge

SeanGallen avatar Dec 17 '16 01:12 SeanGallen