Unverified Commit c0ee49b4 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Move type generating (#7147)

* Move types to run on prepublish in each package

* Update circleci to list dist
parent 463c8435
......@@ -74,16 +74,16 @@ commands:
environment:
BROWSERSTACK: 'true'
BROWSER_NAME: 'firefox'
generate_types:
steps:
- run:
name: Generate types
command: yarn run types-next-server && yarn run types-next
save_npm_token:
steps:
- run:
name: Potentially save npm token
command: '([[ ! -z $NPM_TOKEN ]] && echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc) || echo "Did not write npm token"'
list_dist:
steps:
- run:
name: List dist files
command: 'ls **/dist/*'
publish_canary:
steps:
- run:
......@@ -134,7 +134,7 @@ jobs:
steps:
- *attach_workspace
- save_npm_token
- generate_types
- list_dist
- publish_canary
- publish_stable
......
......@@ -19,13 +19,11 @@
"lint-fix": "standard --fix && standard --fix --parser typescript-eslint-parser --plugin typescript packages/**/*.ts",
"prettier": "prettier --single-quote --no-semi --write examples/**/*.js && yarn lint-fix",
"typescript": "lerna run typescript",
"prepublish": "lerna run prepublish && yarn run types-next-server && yarn run types-next",
"prepublish": "lerna run prepublish",
"publish-canary": "lerna version prerelease --preid canary --force-publish && release --pre",
"publish-stable": "lerna version --force-publish",
"lint-staged": "lint-staged",
"next": "./packages/next/dist/bin/next",
"types-next": "tsc --declaration --emitDeclarationOnly --declarationDir ./packages/next/dist --project ./packages/next",
"types-next-server": "tsc --declaration --emitDeclarationOnly --declarationDir ./packages/next-server/dist --project ./packages/next-server"
"next": "./packages/next/dist/bin/next"
},
"pre-commit": "lint-staged",
"lint-staged": {
......
......@@ -28,7 +28,7 @@
"scripts": {
"build": "taskr",
"release": "taskr release",
"prepublish": "npm run release",
"prepublish": "npm run release && yarn types",
"typescript": "tsc --noEmit --declaration",
"types": "tsc --declaration --emitDeclarationOnly --declarationDir dist"
},
......
......@@ -42,8 +42,9 @@
"scripts": {
"build": "taskr",
"release": "taskr release",
"prepublish": "npm run release",
"typescript": "tsc --noEmit --declaration"
"prepublish": "npm run release && yarn types",
"typescript": "tsc --noEmit --declaration",
"types": "tsc --declaration --emitDeclarationOnly --declarationDir dist"
},
"taskr": {
"requires": [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment