- Run
elm init
at the top-level (in the directory containing your separate Elm apps), creating a newelm.json
- If using elm-watch, run
elm-watch init
, creating a newelm-watch.json
- For each Elm app, open its
elm.json
and :- take the list of direct dependencies, install them all in your new
elm.json
- preferably using
elm-json
(although I don’t remember what doesn’t work with regularelm install
) - don’t worry about dependencies that are already installed, it will just ignore them. It’s safer to just mechanically copy them all.
- I guess you can encounter conflicts between dependencies of different versions. If that’s the case, you will have to decide on one version, and update code accordingly.
- preferably using
- do the same for test dependencies
- take the list of source-directories, add them to your new
elm.json
(usually something likemy-app/src
)- be careful to adapt the paths since you’re moving to the parent directory
- take the list of direct dependencies, install them all in your new
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(async function(){let elmDetected;if(typeof window.Elm==="object"){elmDetected=true}else{let scriptTags=document.scripts;let scriptIsElm=script=>script.match(/throw (new )?Error\([\'\"]https:\/\/github\.com\/elm\/core\/blob\/1\.0\.0\/hints\//);for(scriptTag of scriptTags){let scriptContents;if(!scriptTag.src){scriptContents=scriptTag.textContent}else{await fetch(scriptTag.src).then(response=>response.text()).then(text=>scriptContents=text).catch(err=>{console.error(err); scriptContents=null;})}if(scriptContents===null){continue;}if(scriptIsElm(scriptContents)){elmDetected=true;break}}}if(elmDetected){alert("%F0%9F%8C%B3 Yep, seems to be an Elm app! \\o/ %F0%9F%8C%B3")}else{alert("Nope, doesn%E2%80%99t seem to be Elm (but I might be wrong).")}})(); |
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf https://twitter.com/thomasf This is how i used it on a Debian Wheezy testing (https://www.debian.org/releases/testing/)
Discuss, ask questions, etc. here https://news.ycombinator.com/item?id=7445545