Publish Typescript Package to Github & NPM

Welcome to my channel Code Labs Javascript
Learn Geek stuff [Angular, React, Redux, Nodejs, Web development, Docker, AWS, Vue JS, All about Javascript]

Hi, I’m Tarun - a full-stack software developer based out of India. I build open-source projects and write about modern JavaScript, Node.js, design and web development.

What is GEEK

Buddha Community

Publish Typescript Package to Github & NPM
Jason Thomas

Jason Thomas

1596424707

Publishing TypeScript Packages with GitHub Actions

How to automatically build for JavaScript and publish to a release on GitHub

GitHub Actions are a recent addition to GitHub which allow you to do a lot of CI (Continuous Integration) work directly on GitHub, without having to go through the effort of setting up a CI system like Travis CI, CircleCI or Drone (which is what we mainly use at my workplace, City Pantry).

Using GitHub Actions, you can automatically create builds, run tests, and even deploy, using a (relatively) simple YAML syntax. As a private developer on the free plan, you get 2000 Action minutes per month, which should be plenty to give them a try — and if your repository is public, you get unlimited minutes!

I had a project which was written in TypeScript, but it needed to be consumed by Node-RED, which requires compiled JavaScript bundles. It’s easy enough to point Node-RED at a GitHub repository as a package source and it will work things out using the configuriation in package.json; but I didn’t want to have to commit compiled code to the repository.

Actions to the rescue! In this post, we will walk through how to automatically compile and package a TypeScript project, and attach the compiled tar file to the release, so it can be downloaded from a URL like https://github.com/paullessing/proj/releases/download/v1.0.0/package.tgz

#typescript #npm #javascript #github #developer

Dexter  Goodwin

Dexter Goodwin

1615003180

Private Npm Packages in Github Package Registry

So you’ve come to a point in your developer where you seem to be repeating and/or copy~pasting the same piece of code across multiple projects. It could be some utility functions that are really helpful for the way you like to do things in code or it could a set of typescript types, you wish your frontend and backend code to share — whatever the case you’ll probably want to create your own npm package.

If you’ve landed here by chance, you might ask, “Why not use npmjs.com?” If you don’t mind your package to be public, sure, by all means, however, private packages on there will cost you money, not a lot, but some, which is not the case with Github package registry.

Create the package

For this example, we’ll use  https://tsdx.io/ to scaffold our package, quite simply because it takes care of all the config that is usually needed when you want to setup a typescript project from scratch:

npx tsdx create mylib

You’ll be given a couple of options to choose from, but those will not affect how you can publish the package later. Once the installation is complete, you’ll need to:

cd mylib

#npm #typescript #github

Edison  Stark

Edison Stark

1603861600

How to Compare Multiple GitHub Projects with Our GitHub Stats tool

If you have project code hosted on GitHub, chances are you might be interested in checking some numbers and stats such as stars, commits and pull requests.

You might also want to compare some similar projects in terms of the above mentioned stats, for whatever reasons that interest you.

We have the right tool for you: the simple and easy-to-use little tool called GitHub Stats.

Let’s dive right in to what we can get out of it.

Getting started

This interactive tool is really easy to use. Follow the three steps below and you’ll get what you want in real-time:

1. Head to the GitHub repo of the tool

2. Enter as many projects as you need to check on

3. Hit the Update button beside each metric

In this article we are going to compare three most popular machine learning projects for you.

#github #tools #github-statistics-react #github-stats-tool #compare-github-projects #github-projects #software-development #programming

Nandu Singh

Nandu Singh

1589902524

How to publish Typescript Package to NPM

Learn how to create and Publish an NPM module in TypeScript

#node.js #npm #typescript