MCPcopy Index your code
hub / github.com/reactive-python/reactpy / prepare_js_release

Function prepare_js_release

tasks.py:374–396  ·  view source on GitHub ↗
(
    context: Context, package: PackageInfo
)

Source from the content-addressed store, hash-verified

372
373
374def prepare_js_release(
375 context: Context, package: PackageInfo
376) -> Callable[[bool], None]:
377 node_auth_token = os.getenv("NODE_AUTH_TOKEN")
378 if node_auth_token is None:
379 msg = "NODE_AUTH_TOKEN environment variable must be set"
380 raise Exit(msg)
381
382 with context.cd(JS_DIR):
383 context.run("npm ci")
384 context.run("npm run build")
385
386 def publish(dry_run: bool) -> None:
387 with context.cd(JS_DIR):
388 if dry_run:
389 context.run(f"npm --workspace {package.name} pack --dry-run")
390 return
391 context.run(
392 f"npm --workspace {package.name} publish --access public",
393 env={"NODE_AUTH_TOKEN": node_auth_token},
394 )
395
396 return publish
397
398
399def prepare_py_release(

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected