Skip to content

Commit cc8d5a1

Browse files
authored
Merge pull request #3 from microsoft/v2
Pull form forks
2 parents 62df567 + d477ead commit cc8d5a1

File tree

41 files changed

+1989
-78
lines changed

Some content is hidden

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

41 files changed

+1989
-78
lines changed

.github/CODEOWNERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,10 @@ packages/tsconfig-reference/copy/uk/**/*.md @AMashoshyna [translation] [uk]
4848
packages/typescriptlang-org/src/copy/uk/**/*.ts @AMashoshyna [translation] [uk]
4949
packages/typescriptlang-org/src/copy/uk.ts @AMashoshyna [translation] [uk]
5050
packages/documentation/copy/uk/**/*.md @AMashoshyna [translation] [uk]
51+
52+
# Collaborators for Polish Translation of the Website
53+
packages/playground-examples/copy/pl @msieroslawska @TomWebwalker [translation] [pl]
54+
packages/tsconfig-reference/copy/pl/**/*.md @msieroslawska @TomWebwalker [translation] [pl]
55+
packages/typescriptlang-org/src/copy/pl/**/*.ts @msieroslawska @TomWebwalker [translation] [pl]
56+
packages/typescriptlang-org/src/copy/pl.ts @msieroslawska @TomWebwalker [translation] [pl]
57+
packages/documentation/copy/pl/**/*.md @msieroslawska @TomWebwalker [translation] [pl]

.github/workflows/CI.yml

Lines changed: 29 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22
on: pull_request
33

44
jobs:
5-
test:
5+
tests:
66
runs-on: ubuntu-latest
77

88
steps:
@@ -41,57 +41,44 @@ jobs:
4141
- run: yarn bootstrap
4242
- run: yarn workspace typescriptlang-org build
4343

44-
# Blocked on https://github.com/Azure/static-web-apps/issues/147
45-
#
46-
47-
# PR deploys via static web apps
48-
# - name: "Make a fake 'app' for the azure project of the static HTML"
49-
# run: |
50-
# mkdir fakeapp
51-
# mv packages/typescriptlang-org/public fakeapp/public
52-
# ls fakeapp
53-
# ls fakeapp/public
54-
# echo '{ "name": "fake", "scripts": { "build": "" } }' > fakeapp/package.json
55-
56-
# - name: Build And Deploy
57-
# id: builddeploy
58-
# uses: Azure/[email protected]
59-
# if: github.event.base.repo.id == github.event.head.repo.id
60-
# with:
61-
# azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_NICE_MEADOW_0C9756810 }}
62-
# repo_token: ${{ secrets.GITHUB_TOKEN }}
63-
# action: "upload"
64-
# app_location: "fakeapp"
65-
# api_location: "api"
66-
# app_artifact_location: "public"
67-
6844
# Verify it compiles
6945
- run: yarn compile
7046
# Run all the package's tests
7147
- run: yarn test
7248
env:
7349
CI: true
7450

75-
- name: "Validates that TypeScript plugins work"
76-
run: npm init typescript-playground-plugin playground-my-plugin
77-
7851
# danger for PR builds
7952
- if: github.event_name == 'pull_request' && github.event.base.repo.id == github.event.head.repo.id
8053
run: "yarn danger ci"
8154
env:
8255
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8356
PR_DEPLOY_URL_ROOT: ${{ steps.deploy.outputs.static_web_app_url }}
84-
#
85-
# Blocked on https://github.com/Azure/static-web-apps/issues/147
86-
#
87-
# close_pull_request_job:
88-
# if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.base.repo.id == github.event.head.repo.id
89-
# runs-on: ubuntu-latest
90-
# name: Close Pull Request Job
91-
# steps:
92-
# - name: Close Pull Request
93-
# id: closepullrequest
94-
# uses: Azure/[email protected]
95-
# with:
96-
# azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_NICE_MEADOW_0C9756810 }}
97-
# action: "close"
57+
58+
- name: "Validates that TypeScript plugins work"
59+
run: |
60+
cd ..
61+
npm init typescript-playground-plugin playground-my-plugin
62+
63+
windows:
64+
runs-on: windows-latest
65+
66+
steps:
67+
# Check out, and set up the node infra
68+
- uses: actions/checkout@v1
69+
- uses: actions/setup-node@v1
70+
with:
71+
node-version: "13.x"
72+
73+
# Get local dependencies
74+
- run: yarn install
75+
env:
76+
YARN_CHECKSUM_BEHAVIOR: ignore
77+
78+
- run: yarn bootstrap
79+
- run: yarn build
80+
81+
- name: "Validates that TypeScript plugins work"
82+
run: |
83+
cd ..
84+
npm init typescript-playground-plugin playground-my-plugin

packages/create-typescript-playground-plugin/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A template for creating new plugins for the TypeScript playground.
99
<p><b>Step 3</b>: Open the playground in your browser, click "Options" and enable <code>"Connect to localhost:5000"</code></p>
1010
<p><b>Step 4</b>: Refresh, and see the new tab. That's your plugin up and running</p>
1111
<p>&nbsp;</p>
12-
<p>That's all the pieces working in tandem, now you can make changes to the template and build out your plugin. The plugin in dev mode will always become forefront when connected, so you can re-load without a lot off clicks. To understand the template's technology, read the <a href='https://github.com/microsoft/TypeScript-Website/blob/v2/packages/create-playground-plugin/template/CONTRIBUTING.md'>CONTRIBUTING.md</a></p>
12+
<p>That's all the pieces working in tandem, now you can make changes to the template and build out your plugin. The plugin in dev mode will always become forefront when connected, so you can re-load without a lot off clicks. To understand the template's technology, read the <a href='https://github.com/microsoft/TypeScript-Website/blob/v2/packages/create-typescript-playground-plugin/template/CONTRIBUTING.md'>CONTRIBUTING.md</a></p>
1313

1414
<h2>Alternatives</h2>
1515
<p>There are community-run templates for Playground plugins which bootstrap your plugin with well-known view libraries:</p>

packages/create-typescript-playground-plugin/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const install = () => {
2626
child.on("close", code => {
2727
if (code !== 0) {
2828
reject()
29+
process.exitCode = 1
2930
return
3031
}
3132
resolve()

packages/create-typescript-playground-plugin/template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"url": "https://github.com/[you]/[repo]"
1313
},
1414
"scripts": {
15-
"build": "rollup -c rollup.config.js;",
15+
"build": "rollup -c rollup.config.js",
1616
"compile": "tsc",
1717
"bootstrap": "node scripts/getDTS.js",
1818
"start": "concurrently -p \"[{name}]\" -n \"ROLLUP,SITE\" -c \"bgBlue.bold,bgMagenta.bold\" \"yarn rollup -c rollup.config.js --watch\" \"yarn serve dist\"",

packages/documentation/copy/en/reference/JSX.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ function ComponentFoo(prop: FooProp) {
133133
return <AnotherComponent name={prop.name} />;
134134
}
135135

136-
const Button = (prop: {value: string}, context: { color: string }) => <button>
136+
const Button = (prop: {value: string}, context: { color: string }) => <button />
137137
```
138138

139139
Because a Function Component is simply a JavaScript function, function overloads may be used here as well:

packages/documentation/copy/en/tutorials/Babel with TypeScript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The downside to using babel is that you don't get type checking during the trans
3131

3232
In addition to that, Babel cannot create `.d.ts` files for your TypeScript which can make it harder to work with your project if it is a library.
3333

34-
To fix these issues, you would probably want to set up a command to type check your project using TSC. This likely means duplicating some of your babel config into a corresponding [`tsconfig.json`](/tconfig) and ensuring these flags are enabled:
34+
To fix these issues, you would probably want to set up a command to type check your project using TSC. This likely means duplicating some of your babel config into a corresponding [`tsconfig.json`](/tsconfig) and ensuring these flags are enabled:
3535

3636
```json tsconfig
3737
"compilerOptions": {

0 commit comments

Comments
 (0)