Test npm package for GitHub Packages deployment.
Create a .npmrc file in your project root or home directory:
@machbase:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN
Note: Replace
YOUR_GITHUB_TOKENwith a GitHub Personal Access Token that hasread:packagespermission.
npm install @machbase/npm-pkg-testconst { greet, getVersion, add } = require('@machbase/npm-pkg-test');
console.log(greet('Machbase')); // Hello, Machbase! This is @machbase/npm-pkg-test package.
console.log(getVersion()); // 1.0.0
console.log(add(1, 2)); // 3Returns a greeting message.
Returns the package version.
Returns the sum of two numbers.
MIT