Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update npm script #21

Merged
merged 2 commits into from
Jan 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion scripts/build_npm.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
import { build, emptyDir } from "./script_deps.ts";

/**
* This script builds the SDK for NPM.
*
* It is run from the root of the repository with:
* 'Deno run -A scripts/build_npm.ts 1.0.0'
*
* '1.0.0' is the version, or git tag, to use.
tomas-zijdemans-vipps marked this conversation as resolved.
Show resolved Hide resolved
*
* after running the script, the SDK can be published to NPM with:
* 'cd npm && npm publish --access public'
*
* @example Deno run -A scripts/build_npm.ts 1.0.0 && cd npm && npm publish --access public
*/

await emptyDir("./npm");

await build({
Expand All @@ -12,7 +26,7 @@ await build({
},
package: {
// package.json properties
name: "vipps_mobilepay_sdk",
name: "@vippsmobilepay/sdk",
version: Deno.args[0],
description: "Official SDK for Vipps MobilePay APIs",
license: "MIT",
Expand Down