@@ -30,7 +30,7 @@ Or directly via the provided shell script:
3030
3131Add the ` --debug ` and ` --console ` flags to get output in the terminal window.
3232
33- ## Usage with docker
33+ ### Using docker
3434
3535To create the image, execute the following command from the repository root:
3636
@@ -49,3 +49,84 @@ Example:
4949``` bash
5050docker run -v ~ /solution-238382y7sds7fsadfasj23j:/solution exercism/javascript-analyzer two-fer /solution
5151```
52+
53+ ## Tools
54+
55+ We use various tools to maintain this repository and this analyzer. In order
56+ to contribute to the _ code_ of this track, you'll need NodeJS (LTS or higher)
57+ installed, with some of the [ ` bin/* ` ] [ file-bin ] files having extra dependencies,
58+ as listed in their file-level commentary.
59+
60+ ### ` analyze ` (.sh, .bat)
61+
62+ ``` shell
63+ ./bin/analyze.sh two-fer ~ /folder/to/solution -dcp
64+ ```
65+
66+ This runs the analyzer using ` two-fer ` as exercise and a path to a solution.
67+ Most scripts, including this one, accept a wide range of flags to change or
68+ enhance the behaviour, as coded in [ ` execution_options.ts ` ] [ file-execution-options ] .
69+
70+ Run with the ` -h ` / ` --help ` flag to get a list of flags and their description.
71+
72+ ``` shell
73+ ./bin/analyze.sh --help
74+ ```
75+
76+ You'll most likely want ` -dcp ` (` --debug ` ,` --console ` and ` --pretty ` ) during
77+ development, which enables console output (instead of ` stdout ` /` stderr ` ) and
78+ shows ` logger.log ` as well as ` logger.error ` and ` logger.fatal ` . It will also
79+ format the output JSON with 2 space indentation, both in the output file and
80+ the console.
81+
82+ If you wish to _ preview_ the actual messages, pass in ` --noTemplates ` to use
83+ the analyzer ` Comment ` Factories to generate actual messages. If the comment
84+ factories are kept in-sync with ` website-copy ` , it will be the exact same
85+ output as on the site.
86+
87+ ### ` batch ` (.sh, .bat)
88+
89+ ``` shell
90+ ./bin/batch.sh two-fer -cp
91+ ```
92+
93+ Runs all the fixtures in ` ~/test/fixtures/two-fer ` through the analyzer, giving
94+ a summary at the end with all results. This places an ` analysis.json ` in the
95+ source fixture folder.
96+
97+ You'll most likely want ` -cp ` (` --console ` and ` --pretty ` ) during development,
98+ which enables console output (instead of ` stdout ` /` stderr ` ) and formats the
99+ output JSON with 2 space indentation.
100+
101+ If you wish to _ preview_ the actual messages, pass in ` --noTemplates ` to use
102+ the analyzer ` Comment ` Factories to generate actual messages. If the comment
103+ factories are kept in-sync with ` website-copy ` , it will be the exact same
104+ output as on the site.
105+
106+ ### ` remote ` (.sh, .bat)
107+
108+ ``` shell
109+ ./bin/remote.sh https://exercism.io/tracks/javascript/exercises/two-fer/solutions/df3bb5d7131c44ea9c62206cc8d6c225 -dcp --dry
110+ ```
111+
112+ You need the [ ` exercism ` cli] [ cli ] in order for this to work. It takes an
113+ _ exercism solution url_ . and downloads it using the ` exercism ` cli. It then
114+ runs the analyzer on it.
115+
116+ You'll most likely want ` -dcp --dry ` (` --debug ` , ` --pretty ` , ` --console ` and
117+ ` dry run ` ) during development, which enables console output (instead of
118+ ` stdout ` /` stderr ` ), shows ` logger.log ` as well as ` logger.error ` and
119+ ` logger.fatal ` , pretty prints the JSON output and disables writing the output
120+ to ` analysis.json ` .
121+
122+ You can pass the following type of URLs:
123+
124+ - Published solutions: ` /tracks/javascript/exercises/<slug>/<id> `
125+ - Mentor solutions: ` /mentor/solutions/<id> `
126+ - Your solutions: ` /my/solutions/<id> `
127+ - Private solutions: ` /solutions/<id> `
128+
129+ If you wish to _ preview_ the actual messages, pass in ` --noTemplates ` to use
130+ the analyzer ` Comment ` Factories to generate actual messages. If the comment
131+ factories are kept in-sync with ` website-copy ` , it will be the exact same
132+ output as on the site.
0 commit comments