Skip to content

Commit

Permalink
refactor: simplify build process, remove attest CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
nickserv authored May 1, 2023
1 parent 964cf0e commit a50a2d4
Show file tree
Hide file tree
Showing 235 changed files with 2,208 additions and 6,553 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pnpm prChecks
You can also run any of these commands individually:

```sh @lineFrom:package.json:scripts/prChecks
"pnpm install && pnpm build && pnpm buildAttest && pnpm typecheck && pnpm lint && pnpm testRepo && pnpm docgen && pnpm buildSite"
"pnpm install && pnpm build && pnpm lint && pnpm checkFormat && pnpm testRepo && pnpm docgen && pnpm buildSite"
```

All of these commands will run as part of our CI process and must succeed in order for us to accept your Pull Request.
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ runs:
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 7.1.2
version: 8.3.1

- name: Setup Node (${{ inputs.node }})
uses: actions/setup-node@v3
Expand Down
22 changes: 6 additions & 16 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,8 @@ jobs:
- name: Setup repo
uses: ./.github/actions/setup

- name: Lint
run: pnpm lint

- name: Test
run: pnpm testRepo

- name: Docgen
run: pnpm docgen

- name: Site
run: pnpm buildSite
- name: prChecks
run: pnpm prChecks

compatibility:
needs: core
Expand All @@ -43,8 +34,10 @@ jobs:
include:
- os: ubuntu-latest
node: lts/-1
- os: ubuntu-latest
node: latest
# https://github.com/arktypeio/arktype/issues/738
# - os: ubuntu-latest
# node: latest
fail-fast: false

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -61,9 +54,6 @@ jobs:
- name: Test
run: pnpm testRepo

- name: Site
run: pnpm buildSite

prChecks:
needs: compatibility
timeout-minutes: 1
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ jobs:
- name: Setup repo
uses: ./.github/actions/setup

- name: Docgen
run: pnpm docgen

- name: Site
run: pnpm buildSite
- name: Build docs
run: pnpm buildDocs

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"--no-warnings=ExperimentalWarning"
],
"mochaExplorer.env": {
"ARKTYPE_CHECK_CMD": "--skipTypes"
"ATTEST_CONFIG": "{ \"skipTypes\": true }"
},
"testExplorer.useNativeTesting": true
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<!-- @snipEnd -->

```ts @blockFrom:dev/test/examples/type.ts
import { type } from "#arktype"
import { type } from "../../src/main.js"

// Definitions are statically parsed and inferred as TS.
export const user = type({
Expand Down Expand Up @@ -65,7 +65,7 @@ _Our APIs have mostly stabilized, but details may still change during the alpha/
[Try this example in-browser.](https://arktype.io/docs/scopes)

```ts @blockFrom:dev/test/examples/scope.ts
import { scope } from "#arktype"
import { scope } from "../../src/main.js"

// Scopes are collections of types that can reference each other.
export const types = scope({
Expand Down
1 change: 1 addition & 0 deletions dev/arktype.io/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
arktype.io
2 changes: 1 addition & 1 deletion dev/arktype.io/docs/demos/generated/demo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default `import { type } from "#arktype"
export default `import { type } from "../../src/main.js"
// Define your type...
export const pkg = type({
Expand Down
2 changes: 1 addition & 1 deletion dev/arktype.io/docs/demos/generated/optimized.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default `import { type, union } from "#arktype"
export default `import { type, union } from "../../src/main.js"
export const deepLeftOrRight = union(
{
Expand Down
2 changes: 1 addition & 1 deletion dev/arktype.io/docs/demos/generated/scope.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default `import { scope } from "#arktype"
export default `import { scope } from "../../src/main.js"
// Scopes are collections of types that can reference each other.
export const types = scope({
Expand Down
2 changes: 1 addition & 1 deletion dev/arktype.io/docs/demos/generated/type.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default `import { type } from "#arktype"
export default `import { type } from "../../src/main.js"
// Definitions are statically parsed and inferred as TS.
export const user = type({
Expand Down
10 changes: 4 additions & 6 deletions dev/arktype.io/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
"private": true,
"scripts": {
"dev": "docusaurus start",
"build": "ts-node ../scripts/buildArktypeIo.ts",
"build": "node --loader ts-node/esm ../scripts/docgen.ts && pnpm docusaurus build --out-dir dist && cp CNAME dist",
"typecheck": "tsc",
"serve": "docusaurus serve --dir dist",
"docgen": "cd .. && pnpm docgen"
"serve": "docusaurus serve --dir dist"
},
"dependencies": {
"@docusaurus/core": "2.4.0",
Expand All @@ -19,23 +18,22 @@
"@emotion/styled": "11.10.6",
"@mdx-js/react": "1.6.22",
"@mui/icons-material": "5.11.9",
"@mui/material": "5.11.10",
"@mui/lab": "5.0.0-alpha.121",
"@mui/material": "5.11.10",
"@stackblitz/sdk": "1.8.2",
"framer-motion": "6.5.1",
"prism-react-renderer": "1.3.5",
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"@types/node": "18.15.11",
"@docusaurus/module-type-aliases": "2.4.0",
"@docusaurus/types": "2.4.0",
"@tsconfig/docusaurus": "1.0.7",
"@types/node": "18.15.11",
"@types/react": "17.0.2",
"@types/react-dom": "17.0.2",
"arktype": "link:../..",
"ts-node": "10.9.1",
"typescript": "5.0.3"
},
"pnpm": {
Expand Down
Loading

0 comments on commit a50a2d4

Please sign in to comment.