diff --git a/.circleci/config.yml b/.circleci/config.yml index ef951a2b2..b1fc158f9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,11 @@ version: 2 +aliases: + - &filter-only-master + branches: + only: + - master + defaults: &defaults docker: - image: circleci/node:10 @@ -49,6 +55,17 @@ jobs: - store_artifacts: path: coverage destination: coverage + deploy-website: + <<: *defaults + steps: + - checkout + - run: + name: Deploying to GitHub Pages + command: | + git config --global user.email "thymikee@users.noreply.github.com" + git config --global user.name "Michał Pierzchała" + echo "machine github.com login thymikee password $GITHUB_TOKEN" > ~/.netrc + cd website && yarn install && GIT_USER=thymikee yarn run publish-gh-pages workflows: version: 2 @@ -64,3 +81,7 @@ workflows: - tests: requires: - install-dependencies + - deploy-website: + requires: + - install-dependencies + filters: *filter-only-master diff --git a/website/core/Footer.js b/website/core/Footer.js index 4f6e807a9..f58e5298a 100644 --- a/website/core/Footer.js +++ b/website/core/Footer.js @@ -34,30 +34,18 @@ class Footer extends React.Component {
Docs
- + Getting Started - + API Reference
Community
@@ -82,19 +70,6 @@ class Footer extends React.Component {
- {/* - Facebook Open Source - */}
{this.props.config.copyright}
); diff --git a/website/package.json b/website/package.json index 04776b1e7..6c6c2a605 100644 --- a/website/package.json +++ b/website/package.json @@ -1,4 +1,7 @@ { + "name": "react-native-testing-library-website", + "version": "0.0.0", + "private": true, "scripts": { "examples": "docusaurus-examples", "start": "docusaurus-start", @@ -8,7 +11,9 @@ "version": "docusaurus-version", "rename-version": "docusaurus-rename-version" }, - "devDependencies": { - "docusaurus": "^1.5.1" + "dependencies": { + "docusaurus": "^1.5.1", + "react": "^16.8.1", + "react-dom": "^16.8.1" } } diff --git a/website/pages/en/help.js b/website/pages/en/help.js deleted file mode 100644 index 60809c369..000000000 --- a/website/pages/en/help.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -const CompLibrary = require('../../core/CompLibrary.js'); - -const Container = CompLibrary.Container; -const GridBlock = CompLibrary.GridBlock; - -const siteConfig = require(`${process.cwd()}/siteConfig.js`); - -function docUrl(doc, language) { - return `${siteConfig.baseUrl}docs/${language ? `${language}/` : ''}${doc}`; -} - -class Help extends React.Component { - render() { - const language = this.props.language || ''; - const supportLinks = [ - { - content: 'Ask questions about the documentation and project', - title: 'Join the community', - }, - { - content: "Find out what's new with this project", - title: 'Stay up to date', - }, - ]; - - return ( -
- -
-
-

Need help?

-
-

This project is maintained by a dedicated group of people.

- -
-
-
- ); - } -} - -module.exports = Help; diff --git a/website/pages/en/index.js b/website/pages/en/index.js index c2614859d..5d3da9483 100644 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -5,28 +5,14 @@ * LICENSE file in the root directory of this source tree. */ -const React = require('react'); // eslint-disable-line import/no-extraneous-dependencies - -const { - // MarkdownBlock, - Container, - GridBlock, -} = require('../../core/CompLibrary.js'); // eslint-disable-line import/no-unresolved +const React = require('react'); const siteConfig = require(`${process.cwd()}/siteConfig.js`); -// function imgUrl(img) { -// return `${siteConfig.baseUrl}img/${img}`; -// } - function docUrl(doc, language) { return `${siteConfig.baseUrl}docs/${language ? `${language}/` : ''}${doc}`; } -// function pageUrl(page, language) { -// return siteConfig.baseUrl + (language ? `${language}/` : '') + page; -// } - class Button extends React.Component { render() { return ( @@ -51,12 +37,6 @@ const SplashContainer = props => ( ); -// const Logo = props => ( -//
-// Project Logo -//
-// ); - const ProjectTitle = () => (

@@ -71,7 +51,6 @@ class HomeSplash extends React.Component { render() { return ( - {/* */}
@@ -80,60 +59,11 @@ class HomeSplash extends React.Component { } } -const Block = props => ( - - - -); - -const Features = () => ( - - {[ - { - content: - 'Built on top of `react-test-renderer`, letting you always be up to date with latest React features', - // image: imgUrl('docusaurus.svg'), - imageAlign: 'top', - title: 'Lightweight', - }, - { - content: - 'Prevents you from testing implementation details because we stand this is a very bad practice', - // image: imgUrl('docusaurus.svg'), - imageAlign: 'top', - title: 'Opinionated', - }, - ]} - -); - -// const FeatureCallout = () => ( -//
-//

Feature Callout

-// These are features of this project -//
-// ); - class Index extends React.Component { render() { const language = this.props.language || ''; - return ( -
- -
- - {/* */} -
-
- ); + return ; } } diff --git a/website/pages/en/users.js b/website/pages/en/users.js deleted file mode 100644 index b03fb812a..000000000 --- a/website/pages/en/users.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -const CompLibrary = require('../../core/CompLibrary.js'); - -const Container = CompLibrary.Container; - -const siteConfig = require(`${process.cwd()}/siteConfig.js`); - -class Users extends React.Component { - render() { - if ((siteConfig.users || []).length === 0) { - return null; - } - - const editUrl = `${siteConfig.repoUrl}/edit/master/website/siteConfig.js`; - const showcase = siteConfig.users.map(user => ( - - {user.caption} - - )); - - return ( -
- -
-
-

Who is Using This?

-

This project is used by many folks

-
-
{showcase}
-

Are you using this project?

- - Add your company - -
-
-
- ); - } -} - -module.exports = Users; diff --git a/website/yarn.lock b/website/yarn.lock index 292bdae22..75f07ef33 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -4593,6 +4593,16 @@ react-dom@^16.5.0: prop-types "^15.6.2" scheduler "^0.11.2" +react-dom@^16.8.1: + version "16.8.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.1.tgz#ec860f98853d09d39bafd3a6f1e12389d283dbb4" + integrity sha512-N74IZUrPt6UiDjXaO7UbDDFXeUXnVhZzeRLy/6iqqN1ipfjrhR60Bp5NuBK+rv3GMdqdIuwIl22u1SYwf330bg== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + scheduler "^0.13.1" + react-error-overlay@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-4.0.1.tgz#417addb0814a90f3a7082eacba7cee588d00da89" @@ -4608,6 +4618,16 @@ react@^16.5.0: prop-types "^15.6.2" scheduler "^0.11.2" +react@^16.8.1: + version "16.8.1" + resolved "https://registry.yarnpkg.com/react/-/react-16.8.1.tgz#ae11831f6cb2a05d58603a976afc8a558e852c4a" + integrity sha512-wLw5CFGPdo7p/AgteFz7GblI2JPOos0+biSoxf1FPsGxWQZdN/pj6oToJs1crn61DL3Ln7mN86uZ4j74p31ELQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + scheduler "^0.13.1" + read-all-stream@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/read-all-stream/-/read-all-stream-3.1.0.tgz#35c3e177f2078ef789ee4bfafa4373074eaef4fa" @@ -4916,6 +4936,14 @@ scheduler@^0.11.2: loose-envify "^1.1.0" object-assign "^4.1.1" +scheduler@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.1.tgz#1a217df1bfaabaf4f1b92a9127d5d732d85a9591" + integrity sha512-VJKOkiKIN2/6NOoexuypwSrybx13MY7NSy9RNt8wPvZDMRT1CW6qlpF5jXRToXNHz3uWzbm2elNpZfXfGPqP9A== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + seek-bzip@^1.0.3: version "1.0.5" resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc"