dwyl / learn-elm

:rainbow: discover the beautiful programming language that makes front-end web apps a joy to build and maintain!
https://github.com/dwyl/learn-elm
480 stars 41 forks source link

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

Open nelsonic opened 7 years ago

nelsonic commented 7 years ago

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?

SeanGallen commented 7 years ago

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.

nelsonic commented 7 years ago

@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 😉

SeanGallen commented 7 years ago

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