Skip to content

docs: Publish website #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
version: 2

aliases:
- &filter-only-master
branches:
only:
- master

defaults: &defaults
docker:
- image: circleci/node:10
Expand Down Expand Up @@ -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 "[email protected]"
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
Expand All @@ -64,3 +81,7 @@ workflows:
- tests:
requires:
- install-dependencies
- deploy-website:
requires:
- install-dependencies
filters: *filter-only-master
31 changes: 3 additions & 28 deletions website/core/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,18 @@ class Footer extends React.Component {
</a>
<div>
<h5>Docs</h5>
<a
href={this.docUrl(
'getting-started.html'
// TODO: fix i18n
/* , this.props.language */
)}
>
<a href={this.docUrl('getting-started.html', this.props.language)}>
Getting Started
</a>

<a
href={this.docUrl(
'api.html'
// TODO: fix i18n
/* , this.props.language */
)}
>
<a href={this.docUrl('api.html', this.props.language)}>
API Reference
</a>
</div>
<div>
<h5>Community</h5>
<a
href="http://stackoverflow.com/questions/tagged/"
href="http://stackoverflow.com/questions/tagged/react-native-testing-library"
target="_blank"
rel="noreferrer noopener"
>
Expand All @@ -82,19 +70,6 @@ class Footer extends React.Component {
</div>
</section>

{/* <a
href="https://code.facebook.com/projects/"
target="_blank"
rel="noreferrer noopener"
className="fbOpenSource"
>
<img
src={`${this.props.config.baseUrl}img/oss_logo.png`}
alt="Facebook Open Source"
width="170"
height="45"
/>
</a> */}
<section className="copyright">{this.props.config.copyright}</section>
</footer>
);
Expand Down
9 changes: 7 additions & 2 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"name": "react-native-testing-library-website",
"version": "0.0.0",
"private": true,
"scripts": {
"examples": "docusaurus-examples",
"start": "docusaurus-start",
Expand All @@ -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"
}
}
51 changes: 0 additions & 51 deletions website/pages/en/help.js

This file was deleted.

74 changes: 2 additions & 72 deletions website/pages/en/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -51,12 +37,6 @@ const SplashContainer = props => (
</div>
);

// const Logo = props => (
// <div className="projectLogo">
// <img src={props.img_src} alt="Project Logo" />
// </div>
// );

const ProjectTitle = () => (
<React.Fragment>
<h2 className="projectTitle">
Expand All @@ -71,7 +51,6 @@ class HomeSplash extends React.Component {
render() {
return (
<SplashContainer>
{/* <Logo img_src={imgUrl('docusaurus.svg')} /> */}
<div className="inner">
<ProjectTitle />
</div>
Expand All @@ -80,60 +59,11 @@ class HomeSplash extends React.Component {
}
}

const Block = props => (
<Container
padding={['bottom', 'top']}
id={props.id}
background={props.background}
>
<GridBlock align="center" contents={props.children} layout={props.layout} />
</Container>
);

const Features = () => (
<Block layout="fourColumn">
{[
{
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',
},
]}
</Block>
);

// const FeatureCallout = () => (
// <div
// className="productShowcaseSection paddingBottom"
// style={{ textAlign: 'center' }}
// >
// <h2>Feature Callout</h2>
// <MarkdownBlock>These are features of this project</MarkdownBlock>
// </div>
// );

class Index extends React.Component {
render() {
const language = this.props.language || '';

return (
<div>
<HomeSplash language={language} />
<div className="mainContainer">
<Features />
{/* <FeatureCallout /> */}
</div>
</div>
);
return <HomeSplash language={language} />;
}
}

Expand Down
49 changes: 0 additions & 49 deletions website/pages/en/users.js

This file was deleted.

28 changes: 28 additions & 0 deletions website/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down