-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Base website setup with Docusaurus (#374)
* initial stab at docusarus website * switch colors to brown, do some TODOs * kill webpack svg * delete duplicate hmr files * fix(eslint): addressed all eslint issues
- Loading branch information
Showing
30 changed files
with
2,315 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
# CLI Commands | ||
--- | ||
id: cli | ||
title: CLI Commands | ||
--- | ||
|
||
## `haul init` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
docs/Configuring Your Project.md → docs/Configuring_Your_Project.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
id: getting_started | ||
title: Getting Started | ||
sidebar_label: Add Haul to your project | ||
--- | ||
|
||
Start by adding Haul as a dependency to your React Native project (use `react-native init MyProject` to create one if you don't have a project): | ||
|
||
```bash | ||
yarn add --dev haul | ||
``` | ||
|
||
If you're on a React Native version >= 0.43, add the following in `android/app/build.gradle` somewhere before the `apply from: "../../node_modules/react-native/react.gradle"` statement: | ||
|
||
``` | ||
project.ext.react = [ | ||
cliPath: "node_modules/haul/bin/cli.js" | ||
] | ||
``` | ||
|
||
To configure your project to use haul, run the following: | ||
|
||
```bash | ||
yarn haul init | ||
``` | ||
|
||
This will automatically add the configuration needed to make Haul work with your app, e.g. add `webpack.haul.js` to your project, which you can customise to add more functionality. | ||
|
||
Next, you're ready to start the development server: | ||
|
||
```bash | ||
yarn haul start -- --platform ios | ||
``` | ||
|
||
Finally, reload your app to update the bundle or run your app just like you normally would: | ||
|
||
```bash | ||
react-native run-ios | ||
``` | ||
|
||
<p align="center"> | ||
<img width="635" src="https://cloud.githubusercontent.com/assets/2464966/24395888/8957aba8-13a1-11e7-96a3-70d34d4b5069.png" /> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
docs/hmr/guides/react-native-navigation.md → docs/HMR_react-native-navigation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
docs/hmr/guides/react-navigation.md → docs/HMR_react-navigation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
node_modules | ||
.DS_Store | ||
lib/core/metadata.js | ||
lib/core/MetadataBlog.js | ||
website/translated_docs | ||
website/build/ | ||
website/yarn.lock | ||
website/node_modules | ||
|
||
website/i18n/* | ||
!website/i18n/en.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/** | ||
* 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'); | ||
|
||
class Footer extends React.Component<*> { | ||
docUrl(doc, language) { | ||
const baseUrl = this.props.config.baseUrl; | ||
return `${baseUrl}docs/${language ? `${language}/` : ''}${doc}`; | ||
} | ||
|
||
pageUrl(doc, language) { | ||
const baseUrl = this.props.config.baseUrl; | ||
return baseUrl + (language ? `${language}/` : '') + doc; | ||
} | ||
|
||
render() { | ||
return ( | ||
<footer className="nav-footer" id="footer"> | ||
<section className="sitemap"> | ||
<a href={this.props.config.baseUrl} className="nav-home"> | ||
{this.props.config.footerIcon && ( | ||
<img | ||
src={this.props.config.baseUrl + this.props.config.footerIcon} | ||
alt={this.props.config.title} | ||
width="66" | ||
height="58" | ||
/> | ||
)} | ||
</a> | ||
<div> | ||
<h5>Docs</h5> | ||
<a href={this.docUrl('getting_started.html', this.props.language)}> | ||
Getting Started | ||
</a> | ||
<a href={this.docUrl('cli.html', this.props.language)}>Guides</a> | ||
</div> | ||
<div> | ||
<h5>Community</h5> | ||
<a href={this.pageUrl('users.html', this.props.language)}> | ||
User Showcase | ||
</a> | ||
<a | ||
href="http://stackoverflow.com/questions/tagged/haul" | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
> | ||
Stack Overflow | ||
</a> | ||
<a | ||
href="https://slack.callstack.com/" | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
> | ||
Project Chat | ||
</a> | ||
<a | ||
href="https://twitter.com/callstackio" | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
> | ||
</a> | ||
</div> | ||
<div> | ||
<h5>More</h5> | ||
<a href={this.props.config.repoUrl}>GitHub</a> | ||
</div> | ||
</section> | ||
<section className="copyright">{this.props.config.copyright}</section> | ||
</footer> | ||
); | ||
} | ||
} | ||
|
||
module.exports = Footer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"_comment": "This file is auto-generated by write-translations.js", | ||
"localized-strings": { | ||
"next": "Next", | ||
"previous": "Previous", | ||
"tagline": "A command line tool for developing React Native apps", | ||
"cli": "CLI Commands", | ||
"codepush": "Integrating Haul with CodePush", | ||
"configuration": "Configuration", | ||
"configuring_your_project": "Configuring Your Project", | ||
"getting_started": "Getting Started", | ||
"Add Haul to your project": "Add Haul to your project", | ||
"hmr_api": "Haul HMR API", | ||
"hmr_react_native_navigation": "HMR setup with `react-native-navigation`", | ||
"hmr_react_navigation": "HMR setup with `react-navigation`", | ||
"hmr_setup": "Hot Module Replacement setup", | ||
"API": "API", | ||
"react-native-navigation": "react-native-navigation", | ||
"react-navigation": "react-navigation", | ||
"Setup": "Setup", | ||
"recipes": "Recipes", | ||
"Docs": "Docs", | ||
"CLI": "CLI", | ||
"GitHub": "GitHub", | ||
"Getting Started": "Getting Started", | ||
"Guides": "Guides", | ||
"Hot Module Reloading": "Hot Module Reloading" | ||
}, | ||
"pages-strings": { | ||
"Help Translate|recruit community translators for your project": "Help Translate", | ||
"Edit this Doc|recruitment message asking to edit the doc source": "Edit", | ||
"Translate this Doc|recruitment message asking to translate the docs": "Translate" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"scripts": { | ||
"examples": "docusaurus-examples", | ||
"start": "docusaurus-start", | ||
"build": "docusaurus-build", | ||
"publish-gh-pages": "docusaurus-publish", | ||
"write-translations": "docusaurus-write-translations", | ||
"version": "docusaurus-version", | ||
"rename-version": "docusaurus-rename-version" | ||
}, | ||
"devDependencies": { | ||
"docusaurus": "^1.0.5" | ||
}, | ||
"eslintConfig": { | ||
"rules": { | ||
"react/no-multi-comp": 0, | ||
"import/no-unresolved": 0, | ||
"import/no-extraneous-dependencies": 0 | ||
} | ||
} | ||
} |
Oops, something went wrong.