Skip to content

Commit c73d5f9

Browse files
v9 (TypeScript conversion) (#1087)
1 parent 6259c65 commit c73d5f9

File tree

109 files changed

+5704
-6326
lines changed

Some content is hidden

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

109 files changed

+5704
-6326
lines changed

.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"presets": [
3+
"@babel/preset-typescript",
34
["@babel/preset-env", { "modules": false }],
4-
"@babel/preset-react"
5+
["@babel/preset-react", { "runtime": "automatic" }]
56
],
67
"plugins": [
78
"@babel/plugin-proposal-object-rest-spread",

.eslintrc

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"plugin:react/recommended",
66
"plugin:prettier/recommended",
77
"plugin:react-hooks/recommended",
8-
"prettier/react"
8+
"prettier"
99
],
1010
"plugins": [
1111
"prettier",
@@ -44,6 +44,16 @@
4444
{
4545
"allowTemplateLiterals": true
4646
}
47-
]
48-
}
49-
}
47+
],
48+
"react/jsx-uses-react": "off",
49+
"react/react-in-jsx-scope": "off"
50+
},
51+
"overrides": [
52+
{
53+
"files": ["*.ts", "*.tsx"],
54+
"rules": {
55+
"react/prop-types": "off"
56+
}
57+
}
58+
]
59+
}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Please describe the tests that you ran to verify your changes. Provide instructi
2828
- [ ] I have performed a self-review of my own code
2929
- [ ] I have commented my code, particularly in hard-to-understand areas
3030
- [ ] I have made corresponding changes to the documentation
31-
- [ ] I have updated type definitions in `index.d.ts` for any breaking API changes
3231
- [ ] My code follows the style guidelines of this project (I have run `yarn format`)
3332
- [ ] I have added tests that prove my fix is effective or that my feature works
3433
- [ ] New and existing unit tests pass locally with my changes (I have run `yarn test`)

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ on:
1313
pull_request:
1414
branches:
1515
- main
16+
# TODO(v9): Remove when targeting branch at `main` for real release.
17+
- v9
1618
paths:
1719
- '**'
1820
- '!docs/**'
@@ -23,7 +25,7 @@ jobs:
2325
runs-on: ubuntu-latest
2426
strategy:
2527
matrix:
26-
node-version: [10.x, 12.x, 14.x, 15.x]
28+
node-version: [12.x, 14.x, 16.x]
2729
steps:
2830
- uses: actions/checkout@v2
2931
- uses: actions/setup-node@v2

.prettierignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
yarn.lock
22
package.json
3+
tsconfig.json
34
node_modules
45
es
56
lib
67
dist
8+
docs
79
.nova
8-
.vscode
10+
.vscode

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Changelog
22

3+
## 9.0.0-beta.7
4+
5+
- Ensured types for styled-system based components are included with Spectacle core
6+
7+
## 9.0.0-beta.6
8+
9+
- Fixed path for emitting type declarations
10+
11+
## 9.0.0-beta.5
12+
13+
- Removed dependency on Node assert
14+
15+
## 9.0.0-beta.3
16+
17+
- Added TypeScript development example
18+
19+
## 9.0.0-beta.2
20+
21+
- webpack 5 upgrade (@carlos-kelly)
22+
23+
## 9.0.0-beta.1
24+
25+
- Finished initial pass of TypeScript conversion (@scottrippey)
26+
327
## 8.5.0
428

529
- Add styled-system position and layout functions to CodePane, Progress, Markdown components [#1079](https://github.com/FormidableLabs/spectacle/pull/1079)

CONTRIBUTING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ ahead and submit a PR, make sure that you have done the following:
168168
- Run all checks using `yarn check-ci`.
169169
- Run `yarn build-one-page` and check + commit changes to `examples/one-page.html`
170170
- Check that both the core library and _all_ examples build: `yarn build && yarn build-examples`.
171-
- Update the [type definitions](./index.d.ts) for anything that modifies the Spectacle API,
172-
like breaking changes or new features.
173171
- Everything else included in our [pull request checklist](.github/PULL_REQUEST_TEMPLATE.md).
174172

175173
### Releasing a new version to NPM

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ Spectacle's documentation lives on our [docs site](https://www.formidable.com/op
2424
Notice something inaccurate or confusing? Feel free to [open an issue](https://github.com/FormidableLabs/spectacle/issues)
2525
or [make a pull request](https://github.com/FormidableLabs/spectacle/pulls) to help improve the documentation for everyone!
2626
The source for our docs site lives in this repo in the [`docs`](https://github.com/FormidableLabs/spectacle/blob/main/docs/README.md) folder.
27+
28+
### Maintenance Status
29+
30+
**Active:** Formidable is actively working on this project, and we expect to continue for work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.

docs/content/basic-concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $ npm install --save spectacle
1717

1818
## Getting Started with Development
1919

20-
The `src` directory contains all the source for the Spectacle library. All components designed to be part of the Spectacle API must be exported in `src/index.js`.
20+
The `src` directory contains all the source for the Spectacle library. All components designed to be part of the Spectacle API must be exported in `src/index.tsx`.
2121

2222
#### JavaScript-based Decks
2323

docs/content/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ For more info about the query parameters Spectacle supports, please check out ou
1515

1616
## Can I write my presentation in TypeScript?
1717

18-
Yes - Spectacle types are shipped with the package, so you can safely use Spectacle in any `.ts` or `.js` presentation without a separate type definition import. Check out [the exported types](https://github.com/FormidableLabs/spectacle/blob/main/index.d.ts) for a complete list.
18+
Yes - Spectacle types are shipped with the package, so you can safely use Spectacle in any `.ts` or `.js` presentation without a separate type definition import.

0 commit comments

Comments
 (0)