Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nowmade/graphql-utils

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nowmade/graphql-utils

Utils to clean graphql documents

  • 1.0.7
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 15 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc