diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 000000000000..85c7a12ba561 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,30 @@ +name: Build Website + +on: + pull_request + +jobs: + build: + runs-on: ubuntu-latest + + steps: + # Check out, and set up the node/ruby infra + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + + # Get local dependencies + - run: yarn install + - run: yarn bootstrap + - run: yarn build + + # PR: Deploy if we can + - name: Deploy PR Version + if: github.event_name == 'pull_request' + run: 'if test -z "$NOW_ACCESS_TOKEN"; then echo "Skipping deploy"; + else npx now packages/typescriptlang-org/public/ --token="$NOW_ACCESS_TOKEN" --name="typescript-v2-$PR_NUMBER"; fi' + env: + NOW_ACCESS_TOKEN: ${{ secrets.NOW_ACCESS_TOKEN }} + PR_NUMBER: ${{ github.event.pull_request.number }} + + # Run any tests + - run: yarn workspaces run test --ci diff --git a/.gitignore b/.gitignore index b6abc8c6b387..7ba136028fe9 100644 --- a/.gitignore +++ b/.gitignore @@ -66,5 +66,3 @@ typings/ # tdsx dist -packages/typescriptlang-org/schema.json -packages/typescriptlang-org/apollo.config.js diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000000..afa7d068e8d7 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "semi": false, + "printWidth": 120 +} diff --git a/.vscode/settings.json b/.vscode/settings.json index b335def2f441..234e1d96ad19 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,13 @@ { "files.exclude": { "**/.rts2_cache*": true - } -} \ No newline at end of file + }, + "workbench.colorCustomizations": { + "activityBar.background": "#3178C6", + "activityBar.foreground": "#000000", + "activityBar.inactiveForeground": "#15202b99", + "activityBarBadge.background": "#ffffff", + "activityBarBadge.foreground": "#15202b" + }, + "peacock.color": "#3178C6", +} diff --git a/package.json b/package.json index 327b66ba0270..042e69952305 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "husky": { "hooks": { - "pre-push": "git-branch-is v2 && yarn run clean && yarn run build || echo 'skipping'" + "pre-push": "git-branch-is v2 && yarn run clean && yarn run build || echo 'skipping'" } } } diff --git a/packages/playground/package.json b/packages/playground/package.json index b8c7b0625795..3ec1b5218423 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -5,7 +5,8 @@ "license": "MIT", "scripts": { "start": "parcel index.html", - "build": "parcel build index.html" + "build": "parcel build index.html", + "test": "echo 'no tests'" }, "dependencies": { "react-app-polyfill": "^1.0.0" diff --git a/packages/sandbox/package.json b/packages/sandbox/package.json index 4fab8833306d..3a305d63e0fb 100644 --- a/packages/sandbox/package.json +++ b/packages/sandbox/package.json @@ -10,7 +10,7 @@ "scripts": { "start": "tsdx watch", "build": "tsdx build", - "test": "tsdx test --env=jsdom", + "test": "echo 'no tests'; #tsdx test --env=jsdom", "lint": "tsdx lint" }, "peerDependencies": { diff --git a/packages/tsconfig-reference/package.json b/packages/tsconfig-reference/package.json index 73a417082477..11d762e17fb2 100644 --- a/packages/tsconfig-reference/package.json +++ b/packages/tsconfig-reference/package.json @@ -4,6 +4,7 @@ "scripts" : { "generate-json": "yarn ts-node scripts/generateJSON.ts", "generate-markdown": "yarn ts-node --project tsconfig.json scripts/generateMarkdown.ts ", - "build": "yarn generate-json; yarn generate-markdown" + "build": "yarn generate-json; yarn generate-markdown", + "test": "echo 'no tests'" } } diff --git a/packages/typescriptlang-org/.gitignore b/packages/typescriptlang-org/.gitignore index e86fe25559ba..4a0033595689 100644 --- a/packages/typescriptlang-org/.gitignore +++ b/packages/typescriptlang-org/.gitignore @@ -67,3 +67,12 @@ yarn-error.log .pnp.js # Yarn Integrity file .yarn-integrity + +# The TS auto-complete stuff +schema.json +apollo.config.js + +# backstop files +_tests/backstop_data/bitmaps_test +_tests/backstop_data/engine_scripts +_tests/backstop_data/html_report diff --git a/packages/typescriptlang-org/README.md b/packages/typescriptlang-org/README.md index bc76aff06647..8ab8cb701e91 100644 --- a/packages/typescriptlang-org/README.md +++ b/packages/typescriptlang-org/README.md @@ -1,94 +1,28 @@ -

- - Gatsby - -

-

- UI Fabric Gatsby.js -

+## TypeScript Website -Kick off your project with this UI Fabric boilerplate. This starter ships with the main Gatsby configuration files you might need to get up and running blazing fast with the blazing fast app generator for React. +This a pretty traditional Gatsby site. You can start it up via: -## πŸš€ Quick start +```sh +yarn start +``` -1. **Create a Gatsby site.** +Which starts up a dev server. - Use the Gatsby CLI to create a new site, specifying the UI Fabric starter. +### Visual Regression Testing - ```sh - # create a new Gatsby site using the UI Fabric starter - gatsby new my-uifabric-starter https://github.com/kenotron/gatsby-starter-uifabric - ``` +Right now one of the main ways in which the site is tested is via visual regression testing using +[BackstopJS](https://github.com/garris/BackstopJS). Currently this is directly tied to Orta's computers +and set-up so it isn't feasible for others to run them. -1. **Start developing.** +To run them from this folder: - Navigate into your new site’s directory and start it up. +```sh +# install globally +# npm install -g backstopjs - ```sh - cd my-uifabric-starter/ - gatsby develop - ``` +# To run the tests +backstop test -1. **Open the source code and start editing!** - - Your site is now running at `http://localhost:8000`! - - _Note: You'll also see a second link: _`http://localhost:8000/___graphql`_. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the [Gatsby tutorial](https://www.gatsbyjs.org/tutorial/part-five/#introducing-graphiql)._ - - Open the `my-uifabric-starter` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes and the browser will update in real time! - -## 🧐 What's inside? - -A quick look at the top-level files and directories you'll see in a Gatsby project. - - . - β”œβ”€β”€ node_modules - β”œβ”€β”€ src - β”œβ”€β”€ .gitignore - β”œβ”€β”€ .prettierrc - β”œβ”€β”€ gatsby-browser.js - β”œβ”€β”€ gatsby-config.js - β”œβ”€β”€ gatsby-node.js - β”œβ”€β”€ gatsby-ssr.js - β”œβ”€β”€ LICENSE - β”œβ”€β”€ package-lock.json - β”œβ”€β”€ package.json - └── README.md - -1. **`/node_modules`**: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed. - -2. **`/src`**: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template. `src` is a convention for β€œsource code”. - -3. **`.gitignore`**: This file tells git which files it should not track / not maintain a version history for. - -4. **`.prettierrc`**: This is a configuration file for [Prettier](https://prettier.io/). Prettier is a tool to help keep the formatting of your code consistent. - -5. **`gatsby-browser.js`**: This file is where Gatsby expects to find any usage of the [Gatsby browser APIs](https://www.gatsbyjs.org/docs/browser-apis/) (if any). These allow customization/extension of default Gatsby settings affecting the browser. - -6. **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. (Check out the [config docs](https://www.gatsbyjs.org/docs/gatsby-config/) for more detail). - -7. **`gatsby-node.js`**: This file is where Gatsby expects to find any usage of the [Gatsby Node APIs](https://www.gatsbyjs.org/docs/node-apis/) (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process. - -8. **`gatsby-ssr.js`**: This file is where Gatsby expects to find any usage of the [Gatsby server-side rendering APIs](https://www.gatsbyjs.org/docs/ssr-apis/) (if any). These allow customization of default Gatsby settings affecting server-side rendering. - -9. **`LICENSE`**: Gatsby is licensed under the MIT license. - -10. **`package-lock.json`** (See `package.json` below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. **(You won’t change this file directly).** - -11. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the project’s name, author, etc). This manifest is how npm knows which packages to install for your project. - -12. **`README.md`**: A text file containing useful reference information about your project. - -## πŸŽ“ Learning Gatsby - -Looking for more guidance? Full documentation for Gatsby lives [on the website](https://www.gatsbyjs.org/). Here are some places to start: - -- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.org/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process. - -- **To dive straight into code samples, head [to our documentation](https://www.gatsbyjs.org/docs/).** In particular, check out the _Guides_, _API Reference_, and _Advanced Tutorials_ sections in the sidebar. - -## πŸ’« Deploy - -[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://azuredeploy.net/?repository=https://github.com/kenotron/gatsby-starter-uifabric) - -[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/kenotron/gatsby-starter-uifabric) +# To agree to changes +backstop approve +``` diff --git a/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Index_0_document_0_phone.png b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Index_0_document_0_phone.png new file mode 100644 index 000000000000..46981cb7b53b Binary files /dev/null and b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Index_0_document_0_phone.png differ diff --git a/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Index_0_document_1_tablet.png b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Index_0_document_1_tablet.png new file mode 100644 index 000000000000..f6ce2a3aeae7 Binary files /dev/null and b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Index_0_document_1_tablet.png differ diff --git a/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Index_0_document_2_computer.png b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Index_0_document_2_computer.png new file mode 100644 index 000000000000..451195eec813 Binary files /dev/null and b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Index_0_document_2_computer.png differ diff --git a/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Old_Handbook_Example_0_viewport_0_phone.png b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Old_Handbook_Example_0_viewport_0_phone.png new file mode 100644 index 000000000000..4ff2c4a8c475 Binary files /dev/null and b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Old_Handbook_Example_0_viewport_0_phone.png differ diff --git a/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Old_Handbook_Example_0_viewport_1_tablet.png b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Old_Handbook_Example_0_viewport_1_tablet.png new file mode 100644 index 000000000000..fbf465440b6a Binary files /dev/null and b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Old_Handbook_Example_0_viewport_1_tablet.png differ diff --git a/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Old_Handbook_Example_0_viewport_2_computer.png b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Old_Handbook_Example_0_viewport_2_computer.png new file mode 100644 index 000000000000..b7983835c200 Binary files /dev/null and b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_Old_Handbook_Example_0_viewport_2_computer.png differ diff --git a/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_TSConfig_Example_0_viewport_0_phone.png b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_TSConfig_Example_0_viewport_0_phone.png new file mode 100644 index 000000000000..475c37a90d8f Binary files /dev/null and b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_TSConfig_Example_0_viewport_0_phone.png differ diff --git a/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_TSConfig_Example_0_viewport_1_tablet.png b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_TSConfig_Example_0_viewport_1_tablet.png new file mode 100644 index 000000000000..8fb776ffb662 Binary files /dev/null and b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_TSConfig_Example_0_viewport_1_tablet.png differ diff --git a/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_TSConfig_Example_0_viewport_2_computer.png b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_TSConfig_Example_0_viewport_2_computer.png new file mode 100644 index 000000000000..9d8dd37ce768 Binary files /dev/null and b/packages/typescriptlang-org/_tests/backstop_data/bitmaps_reference/backstop_default_TSConfig_Example_0_viewport_2_computer.png differ diff --git a/packages/typescriptlang-org/backstop.json b/packages/typescriptlang-org/backstop.json new file mode 100644 index 000000000000..e456a617a639 --- /dev/null +++ b/packages/typescriptlang-org/backstop.json @@ -0,0 +1,62 @@ +{ + "id": "backstop_default", + "viewports": [ + { + "label": "phone", + "width": 320, + "height": 480 + }, + { + "label": "tablet", + "width": 1024, + "height": 768 + }, + { + "label": "computer", + "width": 1280, + "height": 900 + } + ], + "onBeforeScript": "puppet/onBefore.js", + "onReadyScript": "puppet/onReady.js", + "scenarios": [ + { + "label": "Index", + "url": "file:///Users/ortatherox/dev/typescript/new-website/packages/typescriptlang-org/public/index.html", + "misMatchThreshold" : 0.1 + }, + { + "label": "Old Handbook Example", + "url": "file:///Users/ortatherox/dev/typescript/new-website/packages/typescriptlang-org/public/docs/handbook/functions.html", + "misMatchThreshold" : 0.1, + "selectors": [ + "viewport" + ] + }, + + { + "label": "TSConfig Example", + "url": "file:///Users/ortatherox/dev/typescript/new-website/packages/typescriptlang-org/public/tsconfig/index.html", + "misMatchThreshold" : 0.1, + "selectors": [ + "viewport" + ] + } + ], + "paths": { + "bitmaps_reference": "_tests/backstop_data/bitmaps_reference", + "bitmaps_test": "_tests/backstop_data/bitmaps_test", + "engine_scripts": "_tests/backstop_data/engine_scripts", + "html_report": "_tests/backstop_data/html_report", + "ci_report": "_tests/backstop_data/ci_report" + }, + "report": ["browser"], + "engine": "puppeteer", + "engineOptions": { + "args": ["--no-sandbox"] + }, + "asyncCaptureLimit": 5, + "asyncCompareLimit": 50, + "debug": false, + "debugWindow": false +} diff --git a/packages/typescriptlang-org/gatsby-config.js b/packages/typescriptlang-org/gatsby-config.js index d737866aa5b8..f390a40667e6 100644 --- a/packages/typescriptlang-org/gatsby-config.js +++ b/packages/typescriptlang-org/gatsby-config.js @@ -1,10 +1,17 @@ // https://github.com/gatsbyjs/gatsby/issues/1457 -require('ts-node').register({ files: true }) +require("ts-node").register({ files: true }) module.exports = { plugins: [ + // Creates TS types for queries during `gatsby dev` "gatsby-plugin-codegen", - `gatsby-plugin-typescript`, + // Support ts/tsx files in src + "gatsby-plugin-typescript", + + // Let's you edit the head from inside a react tree + "gatsby-plugin-react-helmet", + + // Grabs the old handbook markdown files { resolve: `gatsby-source-filesystem`, options: { @@ -12,6 +19,7 @@ module.exports = { name: `handbook-v1`, }, }, + // Grabs file from the tsconfig reference { resolve: `gatsby-source-filesystem`, options: { @@ -19,6 +27,7 @@ module.exports = { name: `tsconfig-reference`, }, }, + // Markdown support { resolve: `gatsby-transformer-remark`, options: { diff --git a/packages/typescriptlang-org/package.json b/packages/typescriptlang-org/package.json index dad2a2120e8f..3ee4e7de7bff 100644 --- a/packages/typescriptlang-org/package.json +++ b/packages/typescriptlang-org/package.json @@ -9,13 +9,16 @@ "develop": "gatsby develop", "format": "prettier --write src/**/*.{js,jsx}", "start": "npm run develop", - "serve": "gatsby serve" + "serve": "gatsby serve", + "test": "echo 'no tests'" }, "dependencies": { + "@types/react-helmet": "^5.0.14", "@uifabric/fluent-theme": "^7.1.4", "@uifabric/react-cards": "^0.108.2", "gatsby": "^2.15.29", "gatsby-plugin-codegen": "^1.0.4", + "gatsby-plugin-react-helmet": "^3.1.13", "gatsby-plugin-sharp": "^2.2.28", "gatsby-remark-copy-linked-files": "^2.1.24", "gatsby-remark-images": "^3.1.25", @@ -28,6 +31,7 @@ "prismjs": "^1.17.1", "react": "^16.10.2", "react-dom": "^16.10.2", + "react-helmet": "^5.2.1", "ts-node": "^8.4.1" }, "devDependencies": { diff --git a/packages/typescriptlang-org/src/components/layout.tsx b/packages/typescriptlang-org/src/components/layout.tsx index 5f4e14d78141..0f3288f035ad 100644 --- a/packages/typescriptlang-org/src/components/layout.tsx +++ b/packages/typescriptlang-org/src/components/layout.tsx @@ -1,52 +1,18 @@ import React from "react" import { Link } from "gatsby" +import { SiteNav } from "./layout/TopNav" declare const __PATH_PREFIX__: string export class Layout extends React.Component { render() { - const { location, title, children } = this.props - const rootPath = `${__PATH_PREFIX__}/` - let header - - header = ( -

- - {title} - -

- ) - + const { children } = this.props return ( -
-
{header}
+
+
{children}
-
- Old stuff - Β© {new Date().getFullYear()}, Built with - {` `} - Gatsby -
-
+
) } } diff --git a/packages/typescriptlang-org/src/components/layout/TopNav.css b/packages/typescriptlang-org/src/components/layout/TopNav.css new file mode 100644 index 000000000000..0adfc5c7f657 --- /dev/null +++ b/packages/typescriptlang-org/src/components/layout/TopNav.css @@ -0,0 +1,49 @@ +/* + +There isn't a collapsible nav bar in the fabric components, and it is unwieldy to +set up something like that on a styles basis, so it's in the CSS. + +*/ + +#top-menu { + background-color: #3178c6; + user-select: none; + clear: both; + display: flex; + justify-content: space-between; + height: 3rem; +} + +#top-menu > .left { + display: flex; + flex-direction: row; +} + +#top-menu > .right { + display: flex; + flex-direction: row-reverse; + justify-self: flex-end; +} + +#top-menu .nav { + display: inline-block; + text-decoration: none; +} + +#top-menu .nav ul { + padding: 0; + margin: 0; +} + +#top-menu .nav-item { + font-size: 1rem; + text-decoration: none; + border: 1px solid transparent; + display: inline-block; +} + +#top-menu .nav-item a { + display: block; + color: #262626; + padding: 0.8rem 0.5em 0.7em; +} diff --git a/packages/typescriptlang-org/src/components/layout/TopNav.tsx b/packages/typescriptlang-org/src/components/layout/TopNav.tsx new file mode 100644 index 000000000000..c34420361d7e --- /dev/null +++ b/packages/typescriptlang-org/src/components/layout/TopNav.tsx @@ -0,0 +1,51 @@ +import React from "react" +import { Text, FontWeights } from "office-ui-fabric-react" +import { Helmet } from "react-helmet"; +import { Link } from "gatsby" +import { IComponentStyles } from "office-ui-fabric-react/lib/Foundation"; + +import "./TopNav.css" + +export type Props = { + centeredLayout?: boolean +} + +const boldStyle: IComponentStyles = { + root: + { fontWeight: FontWeights.semibold, color: "white", textDecoration: "none" } +} + +export const SiteNav = (props: Props) => +
+ + + + +
+
+ + + TypeScript + + + +
+ +
+ +
+
+
diff --git a/packages/typescriptlang-org/src/lib/theme.ts b/packages/typescriptlang-org/src/lib/theme.ts new file mode 100644 index 000000000000..807376e11bc3 --- /dev/null +++ b/packages/typescriptlang-org/src/lib/theme.ts @@ -0,0 +1,32 @@ +import { loadTheme } from 'office-ui-fabric-react'; + +// https://fabricweb.z5.web.core.windows.net/pr-deploy-site/refs/heads/master/theming-designer/index.html + +export const palette = { + themePrimary: '#3178c6', + themeLighterAlt: '#f5f9fd', + themeLighter: '#d9e7f6', + themeLight: '#b9d2ee', + themeTertiary: '#7aaadd', + themeSecondary: '#4688ce', + themeDarkAlt: '#2d6eb3', + themeDark: '#265d97', + themeDarker: '#1c446f', + neutralLighterAlt: '#f8f8f8', + neutralLighter: '#f4f4f4', + neutralLight: '#eaeaea', + neutralQuaternaryAlt: '#dadada', + neutralQuaternary: '#d0d0d0', + neutralTertiaryAlt: '#c8c8c8', + neutralTertiary: '#7da5be', + neutralSecondary: '#5d8ca9', + neutralPrimaryAlt: '#417494', + neutralPrimary: '#00273f', + neutralDark: '#174a6a', + black: '#093855', + white: '#ffffff', +} as const + +loadTheme({ + palette +}); diff --git a/packages/typescriptlang-org/src/pages/index.css b/packages/typescriptlang-org/src/pages/index.css index 41f37f25013c..536e537884e7 100644 --- a/packages/typescriptlang-org/src/pages/index.css +++ b/packages/typescriptlang-org/src/pages/index.css @@ -1,26 +1,13 @@ -.App { - text-align: center; -} - -.App-logo { - animation: App-logo-spin infinite 20s linear; - height: 40vmin; - pointer-events: none; -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; +html { + background-color: #FAF9F8; } -html { - background-color: #E5E5E5; +body { + margin: 0; + -webkit-font-smoothing: antialiased; + color: #333; + font-family: "Segoe UI Web (West European)","Segoe UI",-apple-system,BlinkMacSystemFont,Roboto,"Helvetica Neue",sans-serif; + font-size: 14px; } body, diff --git a/packages/typescriptlang-org/src/templates/handbook.tsx b/packages/typescriptlang-org/src/templates/handbook.tsx index dd021efe1cfe..475d541d77ab 100644 --- a/packages/typescriptlang-org/src/templates/handbook.tsx +++ b/packages/typescriptlang-org/src/templates/handbook.tsx @@ -1,13 +1,9 @@ -// @ts-check import React from "react" import { Link, graphql } from "gatsby" -import {BlogPostBySlug} from "./__generated__/BlogPostBySlug" -// import Bio from "../components/bio" -import {Layout} from "../components/layout" -// import SEO from "../components/seo" -// import { rhythm, scale } from "../utils/typography" +import { BlogPostBySlug } from "./__generated__/BlogPostBySlug" +import { Layout } from "../components/layout" -class BlogPostTemplate extends React.Component<{ pageContext: any, data: BlogPostBySlug}> { +class BlogPostTemplate extends React.Component<{ pageContext: any, data: BlogPostBySlug }> { render() { const post = this.props.data.markdownRemark if (!post) { @@ -18,9 +14,10 @@ class BlogPostTemplate extends React.Component<{ pageContext: any, data: BlogPo const { previous, next } = this.props.pageContext return ( - -
-
+
+
+
+
  • {previous && ( diff --git a/packages/typescriptlang-org/src/templates/tsconfigReference.tsx b/packages/typescriptlang-org/src/templates/tsconfigReference.tsx index d4accb61dc43..6b44791949ed 100644 --- a/packages/typescriptlang-org/src/templates/tsconfigReference.tsx +++ b/packages/typescriptlang-org/src/templates/tsconfigReference.tsx @@ -1,9 +1,9 @@ import React from "react" import { graphql } from "gatsby" -import {TSConfigReferenceTemplate} from "./__generated__/TSConfigReferenceTemplate" -import {Layout} from "../components/layout" +import { TSConfigReferenceTemplate } from "./__generated__/TSConfigReferenceTemplate" +import { Layout } from "../components/layout" -class TSConfigReferenceTemplateComponent extends React.Component<{ pageContext: any, data: TSConfigReferenceTemplate}> { +class TSConfigReferenceTemplateComponent extends React.Component<{ pageContext: any, data: TSConfigReferenceTemplate }> { render() { console.log(this.props) const post = this.props.data.markdownRemark @@ -15,9 +15,12 @@ class TSConfigReferenceTemplateComponent extends React.Component<{ pageContext: return ( +
    +

    TSConfig Reference

    -
    - +
    +
    + ) } diff --git a/yarn.lock b/yarn.lock index 3307562bfc6e..7bdac9d440d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1000,6 +1000,13 @@ dependencies: regenerator-runtime "^0.13.2" +"@babel/runtime@^7.6.3": + version "7.6.3" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.6.3.tgz#935122c74c73d2240cafd32ddb5fc2a6cd35cf1f" + integrity sha512-kq6anf9JGjW8Nt5rYfEuGRaEAaH1mkv3Bbu6rYvLOpPh/RusSJXuKPEAoZ7L7gybZkchE8+NV5g9vKF4AGAtsA== + dependencies: + regenerator-runtime "^0.13.2" + "@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237" @@ -1973,6 +1980,13 @@ dependencies: "@types/react" "*" +"@types/react-helmet@^5.0.14": + version "5.0.14" + resolved "https://registry.yarnpkg.com/@types/react-helmet/-/react-helmet-5.0.14.tgz#a07979ccb2cee088e74e735c84058fc8607d32e4" + integrity sha512-Q73FFg7+LjblfSQUNbnjrwy2T1avBP8yevEgNrkDjyz1rBbnXkuOQcEV7I5wvmAic9FLUk0CnkLieEDej84Zkw== + dependencies: + "@types/react" "*" + "@types/react@*", "@types/react@^16.8.12", "@types/react@^16.8.6": version "16.9.2" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.2.tgz#6d1765431a1ad1877979013906731aae373de268" @@ -7292,6 +7306,13 @@ gatsby-plugin-page-creator@^2.1.24: lodash "^4.17.15" micromatch "^3.1.10" +gatsby-plugin-react-helmet@^3.1.13: + version "3.1.13" + resolved "https://registry.yarnpkg.com/gatsby-plugin-react-helmet/-/gatsby-plugin-react-helmet-3.1.13.tgz#0ba9e2e902ae490b45c898cffece6e17689da9ee" + integrity sha512-O3Fvxm76t58RPVUz0Fo2tbXeJnXV6vmlLnKBPMz+smr0Mtx8vnGP1Pi6DuWdRepJsnVespNNth/L8n7iucQCYQ== + dependencies: + "@babel/runtime" "^7.6.3" + gatsby-plugin-sharp@^2.2.28: version "2.2.28" resolved "https://registry.yarnpkg.com/gatsby-plugin-sharp/-/gatsby-plugin-sharp-2.2.28.tgz#673c503a9585c88e66bb82e3c76ff860c006d917" @@ -13196,7 +13217,7 @@ prompts@^2.0.1, prompts@^2.2.1: kleur "^3.0.3" sisteransi "^1.0.3" -prop-types@^15.5.10, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -13475,6 +13496,21 @@ react-error-overlay@^3.0.0: resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-3.0.0.tgz#c2bc8f4d91f1375b3dad6d75265d51cd5eeaf655" integrity sha512-XzgvowFrwDo6TWcpJ/WTiarb9UI6lhA4PMzS7n1joK3sHfBBBOQHUc0U4u57D6DWO9vHv6lVSWx2Q/Ymfyv4hw== +react-fast-compare@^2.0.2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-2.0.4.tgz#e84b4d455b0fec113e0402c329352715196f81f9" + integrity sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw== + +react-helmet@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-5.2.1.tgz#16a7192fdd09951f8e0fe22ffccbf9bb3e591ffa" + integrity sha512-CnwD822LU8NDBnjCpZ4ySh8L6HYyngViTZLfBBb3NjtrpN8m49clH8hidHouq20I51Y6TpCTISCBbqiY5GamwA== + dependencies: + object-assign "^4.1.1" + prop-types "^15.5.4" + react-fast-compare "^2.0.2" + react-side-effect "^1.1.0" + react-hot-loader@^4.12.14: version "4.12.14" resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.12.14.tgz#81ca06ffda0b90aad15d6069339f73ed6428340a" @@ -13509,6 +13545,13 @@ react-reconciler@^0.21.0: prop-types "^15.6.2" scheduler "^0.15.0" +react-side-effect@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-1.2.0.tgz#0e940c78faba0c73b9b0eba9cd3dda8dfb7e7dae" + integrity sha512-v1ht1aHg5k/thv56DRcjw+WtojuuDHFUgGfc+bFHOWsF4ZK6C2V57DO0Or0GPsg6+LSTE0M6Ry/gfzhzSwbc5w== + dependencies: + shallowequal "^1.0.1" + react@^16.10.2: version "16.10.2" resolved "https://registry.yarnpkg.com/react/-/react-16.10.2.tgz#a5ede5cdd5c536f745173c8da47bda64797a4cf0" @@ -14651,7 +14694,7 @@ shallow-copy@~0.0.1: resolved "https://registry.yarnpkg.com/shallow-copy/-/shallow-copy-0.0.1.tgz#415f42702d73d810330292cc5ee86eae1a11a170" integrity sha1-QV9CcC1z2BAzApLMXuhurhoRoXA= -shallowequal@^1.1.0: +shallowequal@^1.0.1, shallowequal@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==