cordis/makefile

57 lines
1.4 KiB
Makefile

watch-tsc:
./node_modules/.bin/tsc --watch -p ./src/tsconfig.json
watch-sass:
./node_modules/.bin/sass --watch ./src/client/webapp/index.scss ./dist/client/webapp/index.css
lint-autofix:
./node_modules/.bin/eslint ./src --ext .js,.jsx,.ts,.tsx --fix
lint:
./node_modules/.bin/eslint ./src --ext .js,.jsx,.ts,.tsx
build-tsc:
./node_modules/.bin/tsc -p ./src/tsconfig.json
build-sass:
./node_modules/.bin/sass ./src/client/webapp/styles/styles.scss ./dist/client/webapp/styles/styles.css
build: lint build-tsc build-sass
test:
node ./node_modules/ts-jest/cli.js
move:
cp -r ./src/client/webapp/font/* ./dist/client/webapp/font
cp -r ./src/client/webapp/img/* ./dist/client/webapp/img
cp ./src/client/webapp/index.html ./dist/client/webapp/index.html
cp -r ./src/server/scripts/resources ./dist/server/scripts/resources
cp -r ./src/server/ssl ./dist/server/ssl
mkdir -p ./dist/server/invites
clean:
mkdir -p ./dist
rm -r ./dist || true
rm -r ./db || true
reset-server:
psql postgres postgres < ./src/server/sql/init.sql
node ./dist/server/scripts/setup-test-servers.js
create-invite:
node ./dist/server/scripts/create-cordis-file.js
create-example-roles:
node ./dist/server/scripts/example-roles.js
create-memes-messages:
node ./dist/server/scripts/insert-2000-memes-messages.js
full-reset: clean build move reset-server create-invite
start-server:
node ./dist/server/app.js
start-client:
./node_modules/.bin/electron ./dist/client/main.js