mirror of
https://github.com/bendtherules/github-delete-unused-repos.git
synced 2026-08-18 13:52:59 +00:00
8bc8aadffe7388c4c689e7c3bdac32af8e31e9a2
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.1.0 to 1.4.2. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](https://github.com/webpack/loader-utils/compare/v1.1.0...v1.4.2) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... 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
95.8%
JavaScript
4.2%