Coder Social home page Coder Social logo

eifoshm / example-typescript-monorepo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dalinarkholin/example-typescript-monorepo

1.0 0.0 0.0 145.95 MB

An attempt to bundle a pure typescript, react-native, core, api, web, and infrastructure code into a monorepo.

JavaScript 9.75% TypeScript 26.94% Python 8.78% Java 14.41% Objective-C 39.31% HTML 0.81%

example-typescript-monorepo's Introduction

Example Typescript Monorepo

The purpose of this repository is to provide a clear and concise Typescript architecture based on clean architecture principles.

Setup

  • Clone the project
  • Run yarn
  • Run yarn run watch (builds the javascript from typescript)

You will need to run this before running the below commands for the separate projects.

React Native IOS

  • In a new terminal run yarn run native:start
  • In a new terminal run yarn run native:ios

API

Web

Todo:

  • React Native Android.
  • Tests

Working with React Native modules

I won't get into all the details , but I would recommend looking into yarns hoisting mechanism. Check it out here

I think react-native + modules + yarn workspaces are working more nicely(make sure yarn is up to date). But if you have issues with modules being in the wrong place I would start there.

Adding a Second Native IOS Project

Please note this steps are mostly untested, and I can't recommend you use this repository for this approach. However, I will support as best as I can.

  • checkout a new branch
  • copy the native folder and paste it into /packages
  • rename the new folder to your app name, or however you like
  • cd packages/newNativePackage
  • npm install react-native-rename -g
  • react-native-rename newNativePackageName (this can be different from folder name)
  • Modify existing /native/ paths to /newNativePackage/
    • including:
      • /package.json (copy paste scripts relating to native and rename the commands and paths associated to newNativePackage)
      • Globally search for /native and native/ in newNativePackage and rename those to newNativePackage. (ignore the ios files(I think))
  • cd packages/native and run react-native upgrade (not sure this is nessasary) Say yes to everything except .babelrc
  • cd packages/newNativePackage and run react-native upgrade (not sure this is nessasary) Say yes to everything except .babelrc
  • In both native projects delete the ios/build folders.
  • Open the projects one at a time in xcode and build/fix signing certs, etc.
  • Try running the projects via package.json scripts.

example-typescript-monorepo's People

Contributors

dalinarkholin avatar

Stargazers

 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.