Coder Social home page Coder Social logo

json-forms's Introduction

Typescript NPM Package Starter

My template for creating npm packages using typescript.

  • TS to JS
  • Testing via Jest, includes coverage
  • ESLint
  • Ignore files to ensure minimal code is stored/shipped

NPM link: @el3um4s/typescript-npm-package-starter

Getting Started

To create a new project based on this template using degit:

npx degit el3um4s/typescript-npm-package-starter

Then install the dependencies with

npm install

Now update the name field in package.json with your desired package name. Then update the homepage field in package.json. And finally add your code.

Build the package

Run

npm run build

Test the package

You can test the code with Jest

npm test

You can find the test coverage in coverage/lcov-report/index.html.

Check dependencies

You can check and upgrade dependencies to the latest versions, ignoring specified versions. with npm-check-updates:

npm run check-updates

You can also use npm run check-updates:minor to update only patch and minor.

Instead npm run check-updates:patch only updates patch.

Publish

First commit the changes to GitHub. Then login to your NPM account (If you don’t have an account you can do so on https://www.npmjs.com/signup)

npm login

Then run publish:

npm publish

If you're using a scoped name use:

npm publish --access public

Bumping a new version

To update the package use:

npm version patch

and then

npm publish

Install and use the package

To use the package in a project:

npm i @el3um4s/typescript-npm-package-starter

and then in a file:

import { ciao } from "@el3um4s/typescript-npm-package-starter";

const b = ciao("mondo");
console.log(b); // Ciao Mondo

json-forms's People

Contributors

mahdichaari01 avatar

Watchers

 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.