forked from matthewp/robot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New project structure (matthewp#189)
* New project structure * Fix yaml syntax error * Drop Node 14 from CI * Add changesets With the bot * Add docs deploy to CI * Update lockfile * Add an export map * Update the contributing guide * Update packages/core/package.json Co-authored-by: Grant Kiely <[email protected]> --------- Co-authored-by: Grant Kiely <[email protected]>
- Loading branch information
Showing
29 changed files
with
10,843 additions
and
5,276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"robot3": minor | ||
--- | ||
|
||
Drop support for Node 14 | ||
|
||
This drops support for Node 14, with it no longer being supported by the LTS in February. Robot might still work in Node 14 but is not tested in our CI. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,21 +9,17 @@ jobs: | |
|
||
strategy: | ||
matrix: | ||
node-version: [14.x, 16.x, 18.x] | ||
node-version: [16.x, 18.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Puppeteer Container | ||
uses: ianwalter/[email protected] | ||
- name: npm install, build, and test | ||
run: | | ||
npm ci | ||
npm run server & | ||
npm run bundlesize | ||
npm test | ||
env: | ||
CI: true | ||
- name: Install | ||
run: npm ci | ||
- name: Bundle size | ||
run: npm run bundlesize --workspaces | ||
- name: Test | ||
run: npm run test --workspaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'packages/core/**' | ||
|
||
jobs: | ||
changelog: | ||
name: Changelog PR or Release | ||
if: ${{ github.ref_name == 'main' && github.repository_owner == 'matthewp' }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install NPM Dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build --workspaces | ||
|
||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: npm run changeset publish | ||
commit: '[ci] release' | ||
title: '[ci] release' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Deploy Site | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'docs/**' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build Site | ||
run: npm run --workspace=docs build | ||
|
||
- name: Sync Bucket | ||
uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --delete | ||
env: | ||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
DEST_DIR: '/' | ||
SOURCE_DIR: 'docs/_site' # optional: defaults to entire repository | ||
|
||
- name: Invalidate CDN | ||
uses: chetan/invalidate-cloudfront-action@master | ||
env: | ||
DISTRIBUTION: ${{ secrets.DISTRIBUTION }} | ||
PATHS: '/*' | ||
AWS_REGION: 'us-east-1' | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules/ | ||
.wireit/ | ||
_site/ | ||
.DS_Store | ||
machine.min.js | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Contributing | ||
|
||
## Tests | ||
|
||
Core tests are in `packages/core/test`. You can run then by first launching a server: | ||
|
||
```shell | ||
npm run --workspace=packages/core server | ||
``` | ||
|
||
And then loading `http://localhost:1965/test/test.html` in a browser. | ||
|
||
To run the tests from the CLI you can run: | ||
|
||
```shell | ||
npm test --workspace=packages/core | ||
``` | ||
|
||
## Submitting a PR | ||
|
||
When you submit a PR, be sure to add a changeset, which is used to automate the release process. | ||
|
||
```shell | ||
npm run changeset | ||
``` | ||
|
||
Answer the prompts which will create a file in the `.changeset/` folder. You can edit this file to write a description of the changes. | ||
|
||
## Releases | ||
|
||
Releases are automated with [changesets](https://github.com/changesets/changesets). Once a PR has been submitted, an action will create a new PR for the release. Submit that PR in order to release a new version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "robot-site", | ||
"private": true, | ||
"devDependencies": { | ||
"@11ty/eleventy": "^1.0.2", | ||
"@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0", | ||
"markdown-it": "^13.0.1", | ||
"markdown-it-toc-and-anchor": "^4.2.0" | ||
}, | ||
"scripts": { | ||
"build": "wireit", | ||
"dev": "wireit" | ||
}, | ||
"wireit": { | ||
"build": { | ||
"command": "eleventy --config=.eleventy.js" | ||
}, | ||
"dev": { | ||
"command": "eleventy --serve", | ||
"service": { | ||
"readyWhen": { | ||
"lineMatches": "Serving files" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.