Skip to content

Commit

Permalink
add turborepo
Browse files Browse the repository at this point in the history
  • Loading branch information
akellbl4 committed Jul 22, 2022
1 parent 3d1a3fd commit 189166f
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 26 deletions.
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": {}
}
}

0 comments on commit 189166f

Please sign in to comment.