1.0.0 • Published 3 years ago

@visma-connect-bv/example v1.0.0

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
3 years ago

Example package

This is an example package published to the public NPM repository. It is for educational purposes only.

Installation

You can add this as a dependency if you wish

npm install @visma-connect-by/example

Usage

Add the package to your project.

import example from "@visma-connect-bv/example"

Use it by calling the function in your code.

example()

The message "example package loaded" will appear in your console log.

Example

There is an example for browsers that support JavaScript modules.

Development

Some useful tips and tricks for development.

testing the code

In this package an example.html can be used to verify the working of the code.

testing the package

You can create a symbolic link in the global NPM folder for this folder.

npm link

Enter another NPM project where you want to use this package. Link the package into that node_modules folder.

npm link @visma-connect-bv/example

Now you can use the package like any other package.

publish the package

This package is published with user "visma-connect-bv" on the public NPM repository. Login at the commandline.

npm login

Verify if your project is indeed ready to be published. If so, you can publish a scoped private package with a simple command if you signed up to be able to use that.

npm publish

To publish a scoped public package add a parameter.

npm publish --access public

The package can now be found at https://www.npmjs.com/package/@visma-connect-bv/example for public use.

As a good security practice you should log out again :-)

npm logout

Happy coding!