Skip to content

Commit b5893a7

Browse files
authored
refactor: use vite as build tool (#362)
1 parent 4633de8 commit b5893a7

Some content is hidden

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

56 files changed

+60323
-20416
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
parser: 'babel-eslint',
2+
parser: '@typescript-eslint/parser',
33
extends: [
44
'eslint:recommended',
55
'plugin:prettier/recommended',

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
env:
99
APP_NAME: Testing Playground
10-
NODE_VERSION: '12.x'
10+
NODE_VERSION: '18.x'
1111

1212
jobs:
1313
create-release:

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [opened, synchronize, reopened]
66

77
env:
8-
NODE_VERSION: '12.x'
8+
NODE_VERSION: '18.x'
99

1010
jobs:
1111
setup:
@@ -81,6 +81,7 @@ jobs:
8181
name: e2e Tests
8282
runs-on: ubuntu-latest
8383
needs: [setup]
84+
if: false # temporarily disabled
8485
steps:
8586
- name: Checkout
8687
uses: actions/checkout@v2
@@ -89,5 +90,5 @@ jobs:
8990
uses: cypress-io/github-action@v2
9091
with:
9192
start: npm start
92-
wait-on: http://localhost:1234
93+
wait-on: http://localhost:5173
9394
command: npm run cypress:run

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18.9.0

.parcelrc

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

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Please see [contributing.md] for more details. If you just want to run the playg
127127
git clone git@github.com:testing-library/testing-playground.git
128128
cd testing-playground
129129
npm ci
130-
npm run start
130+
npm run dev
131131
```
132132

133133
## Contributors
@@ -165,6 +165,7 @@ Thanks goes to these people ([emoji key][emojis]):
165165

166166
<!-- markdownlint-enable -->
167167
<!-- prettier-ignore-end -->
168+
168169
<!-- ALL-CONTRIBUTORS-LIST:END -->
169170

170171
This project follows the [all-contributors][all-contributors] specification.

_redirects

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/oembed /.netlify/functions/oembed 200!
2-
/api/gist/* /.netlify/functions/gist 200!
2+
/api/* /.netlify/functions/:splat 200!
33
/ /.netlify/functions/server 200!
4-
/* /.netlify/functions/server 200
4+
/* /.netlify/functions/server 200

cypress.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"baseUrl": "http://localhost:1234",
2+
"baseUrl": "http://localhost:5173",
33
"integrationFolder": "cypress/e2e"
44
}

cypress/plugins/index.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/// <reference types="cypress" />
2+
// ***********************************************************
3+
// This example plugins/index.js can be used to load plugins
4+
//
5+
// You can change the location of this file or turn off loading
6+
// the plugins file with the 'pluginsFile' configuration option.
7+
//
8+
// You can read more here:
9+
// https://on.cypress.io/plugins-guide
10+
// ***********************************************************
11+
12+
// This function is called when a project is opened or re-opened (e.g. due to
13+
// the project's config changing)
14+
15+
/**
16+
* @type {Cypress.PluginConfig}
17+
*/
18+
module.exports = (on, config) => {
19+
// `on` is used to hook into various events Cypress emits
20+
// `config` is the resolved Cypress config
21+
}

devtools/src/devtools/main.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
<meta charset="utf-8" />
55
</head>
66
<body>
7-
<script src="main.js"></script>
7+
<script src="main.js" type="module"></script>
88
</body>
99
</html>

devtools/src/devtools/pane.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
</head>
77
<body>
88
<div id="app" />
9-
<script src="pane.js"></script>
9+
<script src="pane.js" type="module"></script>
1010
</body>
1111
</html>

devtools/src/devtools/panel.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
</head>
77
<body>
88
<div id="app" />
9-
<script src="panel.js"></script>
9+
<script src="panel.js" type="module"></script>
1010
</body>
1111
</html>

devtools/src/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Simple and complete DOM testing playground that encourage good testing practices.",
55
"version": "1.16.0",
66
"version_name": "1.16.3",
7-
"minimum_chrome_version": "49",
7+
"minimum_chrome_version": "58",
88
"icons": {
99
"16": "icons/16-production.png",
1010
"32": "icons/32-production.png",
@@ -30,7 +30,7 @@
3030
"content_scripts": [
3131
{
3232
"matches": ["<all_urls>"],
33-
"js": ["content-script/contentScript.js"],
33+
"js": ["content-script/content-script.js"],
3434
"run_at": "document_start"
3535
}
3636
]

netlify.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
[build]
2-
command = "npm run build"
2+
command = "npm run build:public && npm run build:lambda"
33
functions = "./dist/server"
4-
publish = "./dist/client"
4+
publish = "./dist/public"
55

66
[dev]
7+
command = "npm run dev:public"
78
functions = "./src/lambda"
9+
autoLaunch = false
10+
publish = "."
811

912
[template.environment]
10-
GITHUB_GIST_TOKEN = "set token that has gist access"
13+
GITHUB_GIST_TOKEN = "set token that has gist access"

0 commit comments

Comments
 (0)