-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dbb9966
commit 05f024f
Showing
26 changed files
with
9,621 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
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,33 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. | ||
|
||
## Installation | ||
|
||
```console | ||
yarn install | ||
``` | ||
|
||
## Local Development | ||
|
||
```console | ||
yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
## Build | ||
|
||
```console | ||
yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
## Deployment | ||
|
||
```console | ||
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy | ||
``` | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
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,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
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,4 @@ | ||
{ | ||
"label": "Getting Started", | ||
"position": 1 | ||
} |
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 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Installing | ||
|
||
Generate a new React-Native app using the **@ajaysidhu/react-native-template**: | ||
|
||
```shell | ||
npx react-native init MyApp --template @ajaysidhu/react-native-template | ||
``` | ||
|
||
After that, we need to install the dependencies to use the project on iOS(you can skip this part, if you are using this on Android). | ||
|
||
Now run a simple: `npx pod-install` or `cd ios && pod install`. After that, you should be able to use the newly initialised app on both Platforms, iOS and Android. | ||
|
||
:::danger Take care | ||
|
||
The above command will fail if you have the global legacy `react-native-cli` installed. | ||
|
||
::: | ||
|
||
Make sure you uninstall it first(only if you have the old version of the `react-native-cli`): | ||
|
||
```shell | ||
yarn global remove react-native-cli | ||
``` | ||
|
||
or if using `npm` | ||
|
||
```shell | ||
npm uninstall -g react-native-cli | ||
``` | ||
|
||
## Older versions | ||
|
||
If you need to use an older version of react-native-template, then you will need to run a: | ||
|
||
```shell | ||
npx react-native init MyApp --template @ajaysidhu/react-native-template@version | ||
``` | ||
|
||
You can look at all versions, that I have published [here](https://github.com/ajaykumar97/react-native-template/releases). |
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,15 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Libraries | ||
|
||
- Navigation using [react-navigation (v5)](https://reactnavigation.org/) | ||
- State management using [redux](https://redux.js.org/) | ||
- Redux middleware [redux-saga](https://redux-saga.js.org/) | ||
- Env config management using [react-native-config](https://github.com/luggit/react-native-config) | ||
- Splash screen using [react-native-bootsplash](https://github.com/zoontek/react-native-bootsplash) | ||
- API request using [axios](https://github.com/axios/axios) | ||
- Localization using [react-native-localization](https://github.com/stefalda/ReactNativeLocalization) | ||
- Responsive UI using [react-native-size-matters](https://github.com/nirsky/react-native-size-matters) | ||
- Image caching using [react-native-fast-image](https://github.com/DylanVann/react-native-fast-image) |
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,40 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
# Project Structure | ||
|
||
``` | ||
root | ||
├── __tests__ | ||
├── android | ||
├── ios | ||
├── scripts | ||
├── src | ||
│ ├── assets | ||
│ │ ├── fonts | ||
│ │ ├── images | ||
│ │ └── index.js | ||
│ ├── commonComponents | ||
│ ├── localization | ||
| | ├── en.js | ||
| | └── index.js | ||
│ ├── navigation | ||
│ │ ├── AppNavigator.js | ||
│ │ ├── AuthNavigator.js | ||
│ │ └── MainNavigator.js | ||
│ ├── screens | ||
│ ├── store | ||
│ ├── utilities | ||
│ │ ├── constants | ||
│ │ ├── helperFunctions | ||
│ │ ├── layout.js | ||
│ │ ├── logger.js | ||
│ │ ├── NavigationService.js | ||
│ │ └── request.js | ||
│ └── App.js | ||
├── .env | ||
├── .env.production | ||
├── .env.staging | ||
└── index.js | ||
``` |
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,84 @@ | ||
const lightCodeTheme = require('prism-react-renderer/themes/github'); | ||
const darkCodeTheme = require('prism-react-renderer/themes/dracula'); | ||
|
||
/** @type {import('@docusaurus/types').DocusaurusConfig} */ | ||
module.exports = { | ||
title: 'React Native Template', | ||
tagline: 'Reduce project initialization time by 80%', | ||
url: 'https://your-docusaurus-test-site.com', | ||
baseUrl: '/', | ||
onBrokenLinks: 'throw', | ||
onBrokenMarkdownLinks: 'warn', | ||
favicon: 'img/favicon.ico', | ||
organizationName: 'ajaykumar97', | ||
projectName: 'react-native-template', | ||
themeConfig: { | ||
navbar: { | ||
title: 'React Native Template', | ||
logo: { | ||
alt: 'react-native-template Logo', | ||
src: 'img/logo.svg', | ||
}, | ||
items: [ | ||
{ | ||
type: 'doc', | ||
docId: 'getting-started/installing', | ||
position: 'left', | ||
label: 'Docs', | ||
}, | ||
{ | ||
href: 'https://github.com/ajaykumar97/react-native-template', | ||
label: 'GitHub', | ||
position: 'right', | ||
}, | ||
], | ||
}, | ||
footer: { | ||
style: 'dark', | ||
links: [ | ||
{ | ||
title: 'Docs', | ||
items: [ | ||
{ | ||
label: 'Installing', | ||
to: '/docs/getting-started/installing', | ||
}, | ||
{ | ||
label: 'Libraries', | ||
to: '/docs/getting-started/libraries', | ||
}, | ||
{ | ||
label: 'Project Structure', | ||
to: '/docs/getting-started/project-structure', | ||
}, | ||
], | ||
}, | ||
], | ||
copyright: 'Made with ❤️ by Ajay Kumar', | ||
}, | ||
prism: { | ||
theme: lightCodeTheme, | ||
darkTheme: darkCodeTheme, | ||
}, | ||
}, | ||
presets: [ | ||
[ | ||
'@docusaurus/preset-classic', | ||
{ | ||
docs: { | ||
sidebarPath: require.resolve('./sidebars.js'), | ||
editUrl: | ||
'https://github.com/ajaykumar97/react-native-template/edit/master/website/', | ||
}, | ||
blog: { | ||
showReadingTime: true, | ||
editUrl: | ||
'https://github.com/ajaykumar97/react-native-template/edit/master/website/blog/', | ||
}, | ||
theme: { | ||
customCss: require.resolve('./src/css/custom.css'), | ||
}, | ||
}, | ||
], | ||
], | ||
}; |
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,40 @@ | ||
{ | ||
"name": "docs", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"docusaurus": "docusaurus", | ||
"start": "docusaurus start", | ||
"build": "docusaurus build", | ||
"swizzle": "docusaurus swizzle", | ||
"deploy": "docusaurus deploy", | ||
"clear": "docusaurus clear", | ||
"serve": "docusaurus serve", | ||
"write-translations": "docusaurus write-translations", | ||
"write-heading-ids": "docusaurus write-heading-ids" | ||
}, | ||
"dependencies": { | ||
"@docusaurus/core": "2.0.0-beta.1", | ||
"@docusaurus/preset-classic": "2.0.0-beta.1", | ||
"@mdx-js/react": "^1.6.21", | ||
"@svgr/webpack": "^5.5.0", | ||
"clsx": "^1.1.1", | ||
"file-loader": "^6.2.0", | ||
"prism-react-renderer": "^1.2.1", | ||
"react": "^17.0.1", | ||
"react-dom": "^17.0.1", | ||
"url-loader": "^4.1.1" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.5%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
} | ||
} |
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,3 @@ | ||
module.exports = { | ||
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}], | ||
}; |
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,64 @@ | ||
import React from 'react'; | ||
import clsx from 'clsx'; | ||
import styles from './HomepageFeatures.module.css'; | ||
|
||
const FeatureList = [ | ||
{ | ||
title: 'Easy to Use', | ||
Svg: require('../../static/img/undraw_docusaurus_mountain.svg').default, | ||
description: ( | ||
<> | ||
Docusaurus was designed from the ground up to be easily installed and | ||
used to get your website up and running quickly. | ||
</> | ||
), | ||
}, | ||
{ | ||
title: 'Focus on What Matters', | ||
Svg: require('../../static/img/undraw_docusaurus_tree.svg').default, | ||
description: ( | ||
<> | ||
Docusaurus lets you focus on your docs, and we'll do the chores. Go | ||
ahead and move your docs into the <code>docs</code> directory. | ||
</> | ||
), | ||
}, | ||
{ | ||
title: 'Powered by React', | ||
Svg: require('../../static/img/undraw_docusaurus_react.svg').default, | ||
description: ( | ||
<> | ||
Extend or customize your website layout by reusing React. Docusaurus can | ||
be extended while reusing the same header and footer. | ||
</> | ||
), | ||
}, | ||
]; | ||
|
||
function Feature({Svg, title, description}) { | ||
return ( | ||
<div className={clsx('col col--4')}> | ||
<div className="text--center"> | ||
<Svg className={styles.featureSvg} alt={title} /> | ||
</div> | ||
<div className="text--center padding-horiz--md"> | ||
<h3>{title}</h3> | ||
<p>{description}</p> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default function HomepageFeatures() { | ||
return ( | ||
<section className={styles.features}> | ||
<div className="container"> | ||
<div className="row"> | ||
{FeatureList.map((props, idx) => ( | ||
<Feature key={idx} {...props} /> | ||
))} | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
} |
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,13 @@ | ||
/* stylelint-disable docusaurus/copyright-header */ | ||
|
||
.features { | ||
display: flex; | ||
align-items: center; | ||
padding: 2rem 0; | ||
width: 100%; | ||
} | ||
|
||
.featureSvg { | ||
height: 200px; | ||
width: 200px; | ||
} |
Oops, something went wrong.