Giter Club home page Giter Club logo

sharing-typescript-code-libraries's Introduction

Examples of sharing TypeScript code libraries

This repo contains examples of sharing TypeScript code between projects.

If you like this project, please star this repo and support my work

You can watch the video here: https://www.youtube.com/watch?v=y76n6Ow83YQ

Of course you can share a TypeScript code library by publishing it (publicly or privately) to the npm registry and installing it using the npm command.

Likewise you can publish (publicly or privately) a TypeScript code library on GitHub and then install directly from there.

Often though we'll want to share TypeScript code between just a couple of projects or between backend and frontend, but we might not want to have to publish the library to a place where it can be installed by npm (because it seems like overkill to do that when working with a mono- or multi- repo).

Luckily we can share TypeScript code more directly using TypeScript project references.

This repo contains some examples of doing that.

The nodejs-example subdirectory shows the most basic example of sharing a TypeScript code library into TypeScript Node.js application using TypeScript project references. This is as simple as it gets.

The microservices-example subdirectory shows how to share a TypeScript code library into a Docker image. This is useful when we have an application composed of multiple TypeScript microservices and we'd like to share code libraries between them.

The microservices example uses ts-project-bundle to bundle the TypeScript project and its libraries ready to be included in the Docker image.

The microservices-and-front-example subdirectory shows how to share a TypeSript code library between a Docker image and a React frontend.

Stay tuned -- a live stream or blog post about this will be announce soon!

Follow the developer for updates.

sharing-typescript-code-libraries's People

Contributors

ashleydavis 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.