mirror of
https://github.com/bendtherules/react-to-markdown.git
synced 2026-08-18 13:53:11 +00:00
dependabot/npm_and_yarn/json5-and-jest-2.2.3
Bumps [json5](https://github.com/json5/json5) to 2.2.3 and updates ancestor dependency [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest). These dependencies need to be updated together. Updates `json5` from 2.1.1 to 2.2.3 - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](https://github.com/json5/json5/compare/v2.1.1...v2.2.3) Updates `jest` from 23.6.0 to 29.3.1 - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/jest/commits/v29.3.1/packages/jest) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect - dependency-name: jest dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com>
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.tsfile 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
Greeterclass in a TypeScript file -
import { Greeter } from "my-amazing-lib";
const greeter = new Greeter("World!");
greeter.greet();
- To use the
Greeterclass in a JavaScript file -
const Greeter = require('my-amazing-lib').Greeter;
const greeter = new Greeter('World!');
greeter.greet();
Setting travis and coveralls badges
Languages
TypeScript
100%