Install all dependencies
./bin/install
Setup local MySQL:
mysql -uroot os_moderator < packages/backend-core/seed/initial-database.sql
./bin/osmod migrate
./bin/osmod ...
migrate
Migrate the database upmigrate:undo
Reverse a database migrationusers:create
Create new OS Moderator usersusers:get-token
Get a JWT token for a user specified by id or emaildenormalize
Re-run denormalize countsexec
Run a subcommand with app.yaml environmentcomments:recalculate-text-sizes
Using node-canvas, recalculate comment heights at a given width.comments:calculate-text-size
Using node-canvas, calculate a single comment height at a given width.comments:recalculate-top-scores
Recalculate comment top scores.comments:rescore
Rescore comment.
Create OS Moderator users via the command line.
Create a human user:
./bin/osmod users:create --group general --name "Name" --email "email@example.com"
Create a service user:
./bin/osmod users:create --group service --name "Robot"
Get JWT tokens for existing users via the command line:
By user id:
./bin/osmod users:get-token --id 4
By email:
./bin/osmod users:get-token --email "email@example.com"
Runs local server on :8080
and front-end on :8000
./bin/watch
Uses Lerna to publish to the different npm packages
./bin/publish
./bin/lint
optionally you can run lint-fix to attempt auto-fixing most lint errors
./bin/lint-fix
Diffs storyshots of the current code against the last saved.
./bin/storybook
To update stories that need new snapshots, go to packages/frontend-web
and run
npm run storybook:test -- -u