shenanigans-manager
Manages locally installed FullScreenShenanigans modules for development.
shenanigans-manager
is a development dependency of all FullScreenShenanigans modules.
It sets up files that are kept standard across the repositories, such as GitHub templates, README.md
s, and test infrastructure.
It can also be used as a CLI while developing those modules locally.
CLI
npm install -g shenanigans-manager
shenanigans-manager --help
The shenanigans-manager
CLI provides commands that are often useful for developing multiple modules.
The full list of commands is in src/Commands
.
Each command may take in some parameters, while all commands can also be extended with:
--directory
: Sets a different root directory to search for repositories under.--all
: Run the command on all repositories (overrides any --repository
CLL flags).
complete-setup
The complete-setup
command will create a directory with all repositories npm link
ed to each other in the current directory:
shenanigans-manager complete-setup
This is particularly useful if you'd like to develop multiple modules at once.
Note: this will take many, many minutes.
Note: if you see npm errors, check npm's instructions here.
Examples
Opening a repository's page on GitHub:
shenanigans-manager open-on-github --repository EightBittr
Running TSLint in --fix
mode across all repositories under C:/Code/Shenanigans
:
shenanigans-manager tslint-fix --all --directory C:/Code/Shenanigans
exec
Consider using a cmd or batch script instead of --exec
with --all
:
- Mac/Linux:
for d in ./*/ ; do (cd "$d" && command); done
- Windows:
for /d %i in (C:\Code\Shenanigans\*) do ( cd "%i" & command )
Configuration
For now, src/settings.ts
/src/settings.js
stores the default directory and repository names that will be manipulated.
Development
Fork the repository on GitHub, clone it, and install dependencies:
git clone https://github.com/<your-name>/shenanigans-manager
cd shenanigans-manager
npm install
Use npm run src
to completely rebuild.
npm run src:tsc
(tsc -p .
) rebuilds TypeScript files.npm run watch
(tsc -p . -watch
) rebuilds in watch mode.