Skip to content

Commit 476aac1

Browse files
authored
Merge pull request #69 from flextremedev/convert-to-monorepo
Convert to monorepo
2 parents 16a823a + 2b57da8 commit 476aac1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+14555
-2329
lines changed

.circleci/config.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ jobs:
1818
steps:
1919
- checkout
2020
- run: yarn install
21-
- run: yarn test:coverage
21+
- run: yarn web-test-coverage
22+
- run: yarn core-test-coverage
2223
- codecov/upload:
23-
file: coverage/*.json
24+
file: packages/web/coverage/*.json
2425
workflows:
2526
version: 2
2627
test:

.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "@flextremedev/eslint-config"
3+
}

.eslintrc.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

33
# dependencies
4-
/node_modules
4+
node_modules
55
/.pnp
66
.pnp.js
77

88
# testing
9-
/coverage
9+
coverage
1010

1111
# production
1212
/build

.prettierrc.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
{
2-
"trailingComma": "es5",
3-
"singleQuote": true,
4-
"jsxBracketSameLine": false
5-
}
1+
"@flextremedev/prettier-config"

package.json

Lines changed: 24 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,33 @@
11
{
2-
"name": "workout-interval-timer",
3-
"version": "0.1.0",
2+
"name": "interval-timer",
3+
"version": "1.0.0",
44
"private": true,
5-
"homepage": "https://workout-interval-timer.netlify.com",
6-
"dependencies": {
7-
"@testing-library/react": "^11.2.5",
8-
"@xstate/react": "^0.8.1",
9-
"date-fns": "^2.1.0",
10-
"react": "^17.0.2",
11-
"react-dom": "^17.0.2",
12-
"react-helmet": "^6.1.0",
13-
"react-scripts": "^4.0.3",
14-
"xstate": "^4.11.0"
15-
},
5+
"workspaces": [
6+
"packages/*"
7+
],
168
"scripts": {
17-
"start": "react-scripts start",
18-
"build": "react-scripts build",
19-
"test": "react-scripts test",
20-
"test:coverage": "yarn test --coverage --watchAll=false",
21-
"test:debug": "react-scripts --inspect-brk test --runInBand --no-cache",
22-
"eject": "react-scripts eject",
23-
"lint:fix": "eslint src/**/*.js --fix"
24-
},
25-
"lint-staged": {
26-
"src/**/*.js": [
27-
"yarn run --silent eslint",
28-
"git add"
29-
]
30-
},
31-
"husky": {
32-
"hooks": {
33-
"pre-commit": "lint-staged"
34-
}
35-
},
36-
"browserslist": {
37-
"production": [
38-
">0.2%",
39-
"not dead",
40-
"not op_mini all"
41-
],
42-
"development": [
43-
"last 1 chrome version",
44-
"last 1 firefox version",
45-
"last 1 safari version"
46-
]
9+
"core-test": "yarn workspace @interval-timer/core run test",
10+
"core-test-coverage": "yarn workspace @interval-timer/core run test --runInBand --coverage",
11+
"web": "yarn workspace @interval-timer/web run start",
12+
"web-build": "yarn workspace @interval-timer/web run build",
13+
"web-lint": "yarn workspace @interval-timer/web run lint:fix",
14+
"web-test-coverage": "yarn workspace @interval-timer/web run test:coverage",
15+
"web-test": "yarn workspace @interval-timer/web run test"
4716
},
4817
"devDependencies": {
49-
"eslint-config-prettier": "^6.2.0",
50-
"eslint-plugin-prettier": "^3.1.0",
51-
"eslint-plugin-react": "^7.14.3",
52-
"eslint-plugin-react-hooks": "^2.0.1",
18+
"@babel/preset-env": "^7.13.12",
19+
"@babel/preset-typescript": "^7.13.0",
20+
"@flextremedev/eslint-config": "^0.1.1",
21+
"@flextremedev/prettier-config": "^0.1.0",
22+
"@types/jest": "^26.0.22",
23+
"@types/node": "^14.14.37",
24+
"eslint": "^7.23.0",
25+
"eslint-config-prettier": "^7.0.0",
26+
"eslint-plugin-import": "^2.22.1",
27+
"eslint-plugin-prettier": "^3.3.1",
5328
"husky": "^3.0.5",
5429
"lint-staged": "^9.2.5",
55-
"prettier": "^1.18.2"
30+
"prettier": "^2.2.1",
31+
"typescript": "^4.2.3"
5632
}
5733
}

packages/.babelrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"presets": [
3+
["@babel/preset-env", { "targets": { "node": "10" } }],
4+
"@babel/preset-typescript"
5+
]
6+
}

packages/core/.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../.babelrc"
3+
}

packages/core/.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "@flextremedev/eslint-config-typescript",
3+
}

packages/core/jest.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
displayName: {
3+
name: 'Core',
4+
color: 'white',
5+
},
6+
coverageThreshold: {
7+
global: {
8+
branches: 100,
9+
functions: 100,
10+
lines: 100,
11+
statements: 100,
12+
},
13+
},
14+
};

0 commit comments

Comments
 (0)