@songexapp/sdk
v0.0.1
Published
Song-Ex SDK - Hello World
Readme
@songexapp/sdk
Song-Ex SDK – works in JavaScript (CommonJS), ES6 (ESM), and TypeScript projects.
Installation
npm install @songexapp/sdkUsage
JavaScript (CommonJS)
const { hello, greet } = require("@songexapp/sdk");
console.log(hello()); // "Hello from @songexapp/sdk!"
console.log(greet("World")); // "Hello, World!"ES6 / ESM
import { hello, greet } from "@songexapp/sdk";
console.log(hello()); // "Hello from @songexapp/sdk!"
console.log(greet("World")); // "Hello, World!"TypeScript
import { hello, greet } from "@songexapp/sdk";
const msg: string = hello();
console.log(msg);
console.log(greet("TypeScript"));Development
npm install
npm run build
npm run watch # watch mode for developmentLocal testing (npm link)
To test the SDK locally before publishing:
# 1. Build and register the SDK globally
npm run build
npm link
# 2. Go to the example app and link
cd examples/hello-world
npm run link
# 3. Run the examples
node test-cjs.cjs
node test-esm.mjs
npx tsx test-ts.tsSee examples/hello-world/README.md for more options (direct path link, npm pack).
License
MIT
