Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add turborepo #1409

Merged
merged 1 commit into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
node_modules
extracted-messages
public
*.log
.env
tsconfig.tsbuildinfo
coverage
.turbo
public
dist
!remark42
14 changes: 0 additions & 14 deletions frontend/.lintstagedrc.js

This file was deleted.

9 changes: 9 additions & 0 deletions frontend/apps/remark42/.lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const eslint = 'eslint --fix';
const stylelint = 'stylelint --fix';
const prettier = 'prettier --write';

module.exports = {
'./**/*.{ts,tsx,js,jsx,cjs,mjs}': [eslint, prettier],
'./**/*.css': [stylelint, prettier],
'./templates/**.html': [stylelint, prettier],
};
15 changes: 6 additions & 9 deletions frontend/apps/remark42/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,22 @@
"version": "0.16.0",
"license": "MIT",
"scripts": {
"dev": "cross-env REMARK_URL=http://127.0.0.1:8080 webpack serve --mode development",
"start": "cross-env REMARK_API_BASE_URL=https://demo.remark42.com webpack serve --mode development",
"build": "webpack --mode production",
"build:analyze": "webpack --mode production --analyze",
"start": "cross-env REMARK_API_BASE_URL=https://demo.remark42.com webpack serve --mode development",
"dev": "cross-env REMARK_URL=http://127.0.0.1:8080 webpack serve --mode development",
"lint": "run-p lint:*",
"lint:scripts": "eslint --max-warnings=0 \"**/*.{ts?(x),js}\"",
"lint:styles": "stylelint \"app/**/*.css\" \"templates/**\"",
"lint:scripts": "eslint --max-warnings=0 \"**/*.{ts?(x),?(c)js}\"",
"test": "jest",
"coverage": "jest --coverage",
"format": "prettier --write \"./**/*.{js,ts,tsx,css,html}\"",
"size-check": "cross-env NODE_ENV=production npm run build && size-limit",
"type-check": "tsc -p tsconfig.json --noEmit",
"translation-check": "run-s translation:extract translation:check",
"size": "cross-env NODE_ENV=production npm run build && size-limit",
"format": "prettier --write \"./**/*.{js,ts,tsx,css,html}\"",
"translation:extract": "formatjs extract --out-file=./extracted-messages/messages.json \"**/*.{ts,tsx}\" --ignore=\"**/*.d.ts\"",
"translation:generate": "node ./tasks/generateDictionary.js",
"translation:check": "node ./tasks/checkTranslation.js",
"lint-staged:format": "prettier --write",
"lint-staged:lint:styles": "stylelint --fix",
"lint-staged:lint:scripts": "eslint --fix"
"translation:check": "node ./tasks/checkTranslation.js"
},
"engines": {
"node": ">=16.15 <=17.*",
Expand Down
4 changes: 2 additions & 2 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions frontend/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://turborepo.org/schema.json",
"baseBranch": "origin/master",
"pipeline": {
"dev": {},
"start": {},
"build": {
"outputs": ["public/**"]
},
"lint": {
"inputs": ["**/*.tsx", "**/*.ts", "**/*.css"]
},
"lint:styles": {
"inputs": ["**/*.css"]
},
"lint:scripts": {
"inputs": ["**/*.tsx", "**/*.ts"]
},
"test": {
"inputs": ["**/*.tsx", "**/*.ts"]
},
"coverage": {
"inputs": ["**/*.tsx", "**/*.ts"]
},
"type-check": {
"inputs": ["**/*.tsx", "**/*.ts"]
},
"format": {}
}
}