Giter Club home page Giter Club logo

ozcanzaferayan / react-native-web-template Goto Github PK

View Code? Open in Web Editor NEW
56.0 4.0 6.0 6.3 MB

Template project for sharing code between iOS, Android & Web using monorepo

Home Page: https://medium.com/@ZaferAyan/react-native-web-nas%C4%B1l-kullan%C4%B1l%C4%B1r-monorepo-kavram%C4%B1-nedir-cc54e5ec34e6

License: MIT License

TypeScript 35.96% JavaScript 8.16% Starlark 3.14% Java 8.95% Ruby 11.32% Objective-C 21.51% HTML 10.96%
react react-native react-native-web monorepo yarn-workspaces boilerplate typescript

react-native-web-template's Introduction

React Native Web Template

React Native template project for creating iOS, Android and Web apps

With this monorepo project, you can develop mobile & web projects with React Native and React Native Web. You can check this Turkish blog about how this project developed.

How this template created?

You can check out this Turkish Github blog post

Usage

OS X:

yarn install
cd packages/mobile
npm install -g wml
wml add ../common ./node_modules/@monorepo/common
open . -a iterm && wml start
open . -a iterm && cd ../common && yarn watch
open . -a iterm && cd ../mobile/ios && pod install && cd ../ && npx react-native run-ios -- --reset-cache
open . -a iterm && cd ../web && yarn start
cd ../../ && code .

Windows:

Notes:

  • wml is not working on windows so you can use Grunt instead of wml.
  • iterm is not exist in windows. Therefore you can use cmder instead of iterm.
  • Cmder has no duplicate tab command. So you can duplicate tabs manually by right clicking current tab and selecting "Restart or duplicate" > "Duplicate root"
yarn install && cd packages/common && npm install grunt --save-dev && npm install grunt-contrib-watch --save-dev && npm install grunt-sync --save && grunt --watch
# Duplicate tab
cd ../common && yarn watch
# Duplicate tab
cd ../mobile && npx react-native run-android -- --reset-cache
# Duplicate tab
cd ../web && yarn start
# Duplicate tab
code .

Adding library to common module

If you added library to common module like react-native-svg, you have to add that library into mobile package. And nohoist array.

{
  "name": "mobile",
  "workspaces": {
    "nohoist": [
      "react-native",
      "react-native/**",
      "react-native-svg",
      "react-native-svg/**"
    ]
  },
  "dependencies": {
    "react": "16.8.6",
    "react-native": "0.60.5",
    "react-native-svg": "^11.0.1"
  }
}

Development setup

For development, you should install these CLI tools:

  • Node ^8.11
  • npm ^6.2.0
  • yarn ^1.22.0
  • wml

Release History

  • 0.1.0
    • The first proper release
    • ADD: Add project files

Meta

Zafer AYAN โ€“ @ZaferAyan โ€“ [email protected]

Distributed under the MIT license. See LICENSE for more information.

https://github.com/ozcanzaferayan/react-native-web-template

Contributing

  1. Fork it (https://github.com/ozcanzaferayan/react-native-web-template)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

react-native-web-template's People

Contributors

ozcanzaferayan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.