Socket
Socket
Sign inDemoInstall

@dendronhq/common-all

Package Overview
Dependencies
80
Maintainers
1
Versions
417
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @dendronhq/common-all

common-all


Version published
Weekly downloads
2.1K
increased by6.12%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Build Status Coverage Status MIT license

Using this module in other modules

Here is a quick example of how this module can be used in other modules. The TypeScript Module Resolution Logic makes it quite easy. The file src/index.ts is a barrel that re-exports selected exports from other files. The package.json file contains main attribute that points to the generated lib/index.js file and typings attribute that points to the generated lib/index.d.ts file.

If you are planning to have code in multiple files (which is quite natural for a NodeJS module) that users can import, make sure you update src/index.ts file appropriately.

Now assuming you have published this amazing module to npm with the name my-amazing-lib, and installed it in the module in which you need it -

  • To use the Greeter class in a TypeScript file -
import { Greeter } from "my-amazing-lib";

const greeter = new Greeter("World!");
greeter.greet();
  • To use the Greeter class in a JavaScript file -
const Greeter = require("my-amazing-lib").Greeter;

const greeter = new Greeter("World!");
greeter.greet();

Setting travis and coveralls badges

  1. Sign in to travis and activate the build for your project.
  2. Sign in to coveralls and activate the build for your project.
  3. Replace {{github-user-name}}/{{github-app-name}} with your repo details like: "ospatil/generator-node-typescript".

Keywords

FAQs

Last updated on 05 May 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc