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
- Sign in to travis and activate the build for your project.
- Sign in to coveralls and activate the build for your project.
- Replace {{github-user-name}}/{{github-app-name}} with your repo details like: "ospatil/generator-node-typescript".
0.3.31 (2020-07-22)
Manual Changes
🚨NOTE: if you are upgrading from version 0.3.30 or lower, manual action is needed!🚨
We've forked a bunch of the core vscode extensions to make them work better with Dendron. You will need to uninstall the previous extension and install the Dendron version of these extensions.
Changes you will need to make
Remove the following extensions and replace them with their Dendron *
counterparts. VSCode should automatically recommend that you install them but if not, you can find the extensions by adding Dendron
in front of the extension name (eg. Markdown Links -> Dendron Markdown Links)
- Markdown Links:
- why: support showing graphs based on dendron's hierarchy
- Markdown Preview Enhanced:
- why: Fix some link bugs and upcoming integration with how Dendron handles frontmatter
- Markdown Shortcuts:
- why: Remove some default keybindings that were interferring with Dendron bindings on Linux and Windows
- Markdown Notes:
- why: required for integrating new note creation via link with Dendron and other upcoming features
After you've made the above changes, you can run Developer: Reload Window
for the changes to take effect.
Features
- add reload index command (236b2ac)
- initialize default workbench with relative paths so that its portable btw devices (790ef50)
- upgrade settings command (c043090)