Skip to content

Commit c70a6fe

Browse files
authored
build: Remove extra build step and generate msotypes on build (#9)
* ci: remove extra build from gh action * internal: Add generated msotypes to gitignore * build: Generate msotypes on build
1 parent 675e04a commit c70a6fe

5 files changed

Lines changed: 16 additions & 7349 deletions

File tree

.eslintrc.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
const extensions = ['.ts', '.js', '.jsx', '.json'];
1+
const extensions = ['.ts', '.tsx', '.js', '.jsx', '.json'];
22

33
module.exports = {
44
root: true,
5-
extends: ['@postmates', 'prettier'],
6-
plugins: ['import', 'prettier'],
5+
extends: [
6+
'@postmates',
7+
'prettier',
8+
'prettier/react',
9+
'prettier/standard',
10+
'prettier/@typescript-eslint',
11+
],
12+
plugins: ['prettier'],
713
env: { node: true },
814
settings: {
915
'import/extensions': extensions,
@@ -20,14 +26,14 @@ module.exports = {
2026

2127
// typescript
2228
'@typescript-eslint/explicit-function-return-type': 0,
23-
'@typescript-eslint/no-use-before-define': 0,
2429
},
2530
overrides: [
2631
{
2732
files: ['*.ts', '*.tsx'],
2833
rules: {
2934
// prefer consistency
3035
'@typescript-eslint/no-inferrable-types': 0,
36+
'@typescript-eslint/no-use-before-define': 0,
3137
'@typescript-eslint/explicit-function-return-type': 2,
3238
},
3339
},

.github/workflows/pr.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ jobs:
1010
uses: actions/setup-node@v1
1111
- name: Install dependencies
1212
run: yarn install --ignore-engines --frozen-lockfile
13-
- name: Build all files
14-
run: yarn run build
1513
- name: Validate conventional title
1614
uses: beemojs/conventional-pr-action@v1
1715
env:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ node_modules
55
# build
66
dist
77
tsconfig.tsbuildinfo
8+
packages/msotype/index.d.ts
89

910
# test
1011
coverage

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,24 @@
66
],
77
"scripts": {
88
"postinstall": "lerna bootstrap",
9-
"clean": "lerna exec \"rm -rf ./{dist,*.tsbuildinfo}\"",
9+
"clean": "rm -rf ./packages/*/{*.tsbuildinfo,dist}",
1010
"clean:prune": "rm -rf ./{,*/,**/*/}{node_modules,coverage,*.lock,*.log,*.tsbuildinfo,dist}",
11-
"build": "yarn clean && lerna run build --ignore=@email-types/scripts && yarn types",
11+
"build": "yarn clean && lerna run build --ignore=@email-types/scripts && yarn types && yarn run gen mso",
1212
"dev": "run-p dev:* ",
1313
"dev:all": "lerna run dev --parallel",
1414
"dev:types": "run-p \"types:* --watch\"",
15+
"gen": "yarn workspace @email-types/scripts build",
1516
"test": "yarn build && yarn lint && yarn jest:coverage",
1617
"jest": "jest --colors --logHeapUsage",
1718
"jest:coverage": "yarn run jest --coverage",
18-
"lint": "yarn run eslint .",
19-
"eslint": "eslint --ext js,jsx,ts,tsx --max-warnings=0 --report-unused-disable-directives",
19+
"lint": "eslint . --ext js,jsx,ts,tsx --max-warnings=0 --report-unused-disable-directives",
2020
"prettier": "prettier \"**/*.{js,jsx,ts,tsx,md,mdx,json}\" --write",
2121
"types": "tsc --build packages/*/tsconfig.json",
2222
"prepublishOnly": "NODE_ENV=production yarn run build",
2323
"release": "lerna publish",
2424
"release:publish": "lerna publish from-git",
2525
"release:version": "lerna version --conventional-commits --changelog-preset conventional-changelog-beemo --create-release github --push",
26-
"canary:version": "lerna version prerelease --preid canary --conventional-commits --changelog-preset conventional-changelog-beemo --create-release github --push",
27-
"emailtypes": "yarn workspace @email-types/scripts build"
26+
"canary:version": "lerna version prerelease --preid canary --conventional-commits --changelog-preset conventional-changelog-beemo --create-release github --push"
2827
},
2928
"lint-staged": {
3029
"**/*.{js,jsx,ts,tsx,md,mdx,json}": [

0 commit comments

Comments
 (0)