0

I have created a TypeScript module named My.Models that contains several models and I have two applications that need to use this module, neither currently use TypeScript.

The applications are a client-side Angular application and a server-side node.js application.

What is an approach that would enable me to make changes to the My.Models module, and then easily have those changes passed on to the consuming applications?

1 Answer 1

1

The easiest way is to publish your module to npm. This may require a couple of changes to your angular setup if you aren't already using npm modules in your angular app. We use webpack with Angular which allows you to write and require common js modules(NPM). Browserify is another option for using common js modules. If you don't want to do 100% commonjs/npm then you'd need to publish to npm for your node app and bower for your angular app.

Then you just publish a new release of your shared module after you make your changes and then you can update your Angular app and Node app.

You can use private npm modules or just publish your module to git(How to install a private NPM module without my own registry?)

Sign up to request clarification or add additional context in comments.

1 Comment

Excellent. Thanks for the options.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.