elm-docs-download v0.1.1
Elm Documentation Downloader
Simple command line tool that downloads documentation.json for all installed dependencies in your project elm-stuff folder from package.elm-lang.org.
Install
It can be found in NPM as elm-docs-download so install it with:
npm install elm-docs-download --globalUsage
You can simply call it in your project folder:
elm-docs-downloadAlternatively you can provide a path to use as project folder (if you are not running the command from said directory)
elm-docs-download /usr/loca/my-projectFor more info you can always use the --help command
elm-docs-download --helpInfo
elm-docs-download searches your project trying to find the elm-stuff folder. Then it searches for all modules with an elm-package.json file and inside of their folder looks up a documentation.json file.
If this file is found it checks it's content to see if they match the author, name and version of the module.
If they match, then it won't download anything, but if they don't then documentation.json is downloaded from package.elm-lang.org.
It should be noted that elm-docs-download performs some modifications in this file.
The returned JSON from package.elm-lang.org is a list with all the modules provided in the library.
elm-docs-download generates a JSON file with an object instead, this object has 4 keys:
name: The package nameauthor: The package authorversion: The version of the packagemodules: The list of modules from the originaldependencies.jsonfrom package.elm-lang.org This modification is in order to fix the issue 149 from elm-make
In the future if issue 28 from elm-make and/or issue 240 from elm-package is solved there won't be any meaning in this package so this is a temporary solution
License
This project is licensed under MIT License with the following copyright: Copyright (c) 2017 - Pablo A. Mayobre (Positive07)