forked from thecodingmachine/react-native-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📚 (Docs): new documentation design (thecodingmachine#296)
- Loading branch information
1 parent
3e1dce8
commit b4f7cc7
Showing
43 changed files
with
4,283 additions
and
3,282 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
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,41 @@ | ||
module.exports = { | ||
globals: { | ||
React: true, | ||
JSX: true, | ||
}, | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
}, | ||
extends: [ | ||
'plugin:react/recommended', | ||
'airbnb', | ||
'plugin:@docusaurus/recommended', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.jsx', '.ts', '.tsx'], | ||
}, | ||
}, | ||
}, | ||
plugins: [ | ||
'react', | ||
'@typescript-eslint', | ||
'@docusaurus', | ||
], | ||
rules: { | ||
'react/jsx-filename-extension': [2, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }], | ||
'import/no-unresolved': [2, { ignore: ['^@theme', '^@docusaurus', '^@site'] }], | ||
'react/jsx-props-no-spreading': 'off', | ||
'react/no-array-index-key': 'off', | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,12 +1,3 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @format | ||
*/ | ||
|
||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
6 changes: 1 addition & 5 deletions
6
documentation/blog/2020-04-19-React-Native-Boilerplate-3.0.0.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,6 @@ | ||
jed: | ||
name: Jérémy dollé | ||
title: Maintainer of the React Native Boilerplate | ||
url: https://github.com/JeremyDolle | ||
image_url: https://avatars.githubusercontent.com/u/15814069?v=4 | ||
|
4 changes: 2 additions & 2 deletions
4
.../docs/1_Introduction/1_1_RNBoilerplate.md → documentation/docs/1_Introduction.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 |
---|---|---|
@@ -1,73 +1,142 @@ | ||
/** @type {import('@docusaurus/types').DocusaurusConfig} */ | ||
module.exports = { | ||
title: 'React Native Boilerplate', | ||
tagline: 'Ready to use react native architecture based on Separation of Concerns.', | ||
// @ts-check | ||
// Note: type annotations allow type checking and IDEs autocompletion | ||
|
||
const lightCodeTheme = require('prism-react-renderer/themes/github'); | ||
const darkCodeTheme = require('prism-react-renderer/themes/dracula'); | ||
|
||
/** @type {import('@docusaurus/types').Config} */ | ||
const config = { | ||
title: 'The React Native Boilerplate', | ||
tagline: 'Simple, Lightweight and Scalable.', | ||
url: 'https://thecodingmachine.github.io', | ||
baseUrl: '/react-native-boilerplate/', | ||
onBrokenLinks: 'warn', | ||
onBrokenLinks: 'throw', | ||
onBrokenMarkdownLinks: 'warn', | ||
favicon: 'img/favicon.png', | ||
organizationName: 'thecodingmachine', | ||
projectName: 'react-native-boilerplate', | ||
themeConfig: { | ||
algolia: { | ||
apiKey: '870ae81ec981530781f32849c55a593f', | ||
indexName: 'rnboilerplate', | ||
contextualSearch: true, | ||
}, | ||
navbar: { | ||
title: 'RNBoilerplate', | ||
logo: { | ||
alt: 'React Native Boilerplate', | ||
src: 'img/TOM-small.png', | ||
}, | ||
items: [ | ||
{ | ||
to: 'docs/Introduction', | ||
activeBasePath: 'docs', | ||
label: 'Docs', | ||
position: 'left', | ||
}, | ||
{ | ||
to: '/blog', | ||
label: 'Blog', | ||
position: 'left' | ||
}, | ||
{ | ||
href: 'https://github.com/thecodingmachine/react-native-boilerplate', | ||
label: 'GitHub', | ||
position: 'right', | ||
i18n: { | ||
defaultLocale: 'en', | ||
locales: ['en'], | ||
}, | ||
plugins: [ | ||
async function myPlugin() { | ||
return { | ||
name: 'docusaurus-tailwindcss', | ||
configurePostCss(postcssOptions) { | ||
// eslint-disable-next-line global-require | ||
postcssOptions.plugins.push(require('tailwindcss')); | ||
// eslint-disable-next-line global-require | ||
postcssOptions.plugins.push(require('autoprefixer')); | ||
return postcssOptions; | ||
}, | ||
], | ||
}, | ||
footer: { | ||
style: 'dark', | ||
logo: { | ||
alt: 'Facebook Open Source Logo', | ||
src: 'img/TOM.png', | ||
}, | ||
copyright: `Copyright © ${new Date().getFullYear()} TheCodingMachine, Inc. Built with Docusaurus.`, | ||
}; | ||
}, | ||
}, | ||
], | ||
presets: [ | ||
[ | ||
'@docusaurus/preset-classic', | ||
{ | ||
'classic', | ||
/** @type {import('@docusaurus/preset-classic').Options} */ | ||
({ | ||
docs: { | ||
sidebarPath: require.resolve('./sidebars.js'), | ||
editUrl: | ||
'https://github.com/thecodingmachine/react-native-boilerplate/edit/master/website-documentation/docs', | ||
}, | ||
blog: { | ||
showReadingTime: true, | ||
// Please change this to your repo. | ||
editUrl: | ||
'https://github.com/thecodingmachine/react-native-boilerplate/edit/master/website-documentation/blog', | ||
}, | ||
theme: { | ||
customCss: require.resolve('./src/css/custom.css'), | ||
}, | ||
}, | ||
}), | ||
], | ||
], | ||
|
||
themeConfig: | ||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */ | ||
({ | ||
algolia: { | ||
appId: '9PEYN0H12D', | ||
indexName: 'rnboilerplate', | ||
apiKey: '870ae81ec981530781f32849c55a593f', | ||
contextualSearch: true, | ||
}, | ||
colorMode: { | ||
respectPrefersColorScheme: true, | ||
}, | ||
navbar: { | ||
title: 'React Native Boilerplate', | ||
logo: { | ||
alt: 'React Native Boilerplate', | ||
src: 'img/TOM-small.png', | ||
}, | ||
items: [ | ||
{ | ||
type: 'doc', | ||
docId: 'Introduction', | ||
position: 'left', | ||
label: 'Docs', | ||
}, | ||
{ to: '/blog', label: 'Blog', position: 'left' }, | ||
{ | ||
href: 'https://github.com/thecodingmachine/react-native-boilerplate', | ||
label: 'GitHub', | ||
position: 'right', | ||
}, | ||
], | ||
}, | ||
footer: { | ||
style: 'dark', | ||
links: [ | ||
{ | ||
title: 'Docs', | ||
items: [ | ||
{ | ||
label: 'Installation', | ||
to: '/docs/Installation', | ||
}, | ||
{ | ||
label: 'Theme', | ||
to: '/docs/Theme', | ||
}, | ||
{ | ||
label: 'Loading data at startup', | ||
to: '/docs/SplashScreenLoadingData', | ||
}, | ||
{ | ||
label: 'Redux toolkit', | ||
to: '/docs/ReduxStore', | ||
}, | ||
{ | ||
label: 'Internationalization', | ||
to: '/docs/AddALangTranslation', | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'More', | ||
items: [ | ||
{ | ||
label: 'Blog', | ||
to: '/blog', | ||
}, | ||
{ | ||
label: 'GitHub', | ||
href: 'https://github.com/thecodingmachine/react-native-boilerplate', | ||
}, | ||
], | ||
}, | ||
], | ||
copyright: `Copyright © ${new Date().getFullYear()} React Native Boilerplate, by TheCodingMachine. Built with Docusaurus.`, | ||
}, | ||
prism: { | ||
theme: lightCodeTheme, | ||
darkTheme: darkCodeTheme, | ||
}, | ||
}), | ||
}; | ||
|
||
module.exports = config; |
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
Oops, something went wrong.