@vode-app/create-spa (0.1.0-pre.39)

Published 2026-06-19 23:31:21 +02:00 by temir in vode-app/create-spa

Installation

@vode-app:registry=
npm install @vode-app/create-spa@0.1.0-pre.39
"@vode-app/create-spa": "0.1.0-pre.39"

About this package

Introduction

This template scaffolds a ...

Table of Contents

  1. Quick Start
  2. Documentation
  3. DevOps
    1. Change Management
    2. Publish

Quick Start

# placeholder:
    # <TEMPLATE_PACKAGE_NAME: @vode-app/create-spa
    # <TEMPLATE_NAME: @vode-app/spa

# print the latest version
npm info "@vode-app/create-spa" version

# create/update a package from the template in the current directory
npm create --no-install --no-git "@vode-app/spa@latest" .

# set metadata in package.json

npm update

Documentation

The following sections explain the configurations and conventions baked into the generated package. Useful when adapting it to fit specific needs.

<DOCUMENTATION>

nginx as a Static File Server

Location directives for serving the SPA and static files:

server {
    # ...

    # placeholder:
        # <VODE_APP_PATH: <VODE_APP_PATH>
        # <VODE_APP_SPA_PATH: <VODE_APP_SPA_PATH>
        # <DIST_PATH: <DIST_PATH>
    location <VODE_APP_PATH>/<VODE_APP_SPA_PATH> {
        root <DIST_PATH>;
        rewrite ^ /index.html break;
        gzip off;
        sub_filter '<base href="" />' '<base href="<VODE_APP_PATH>/" />';
        sub_filter_once on;
        add_header Cache-Control "no-store";
    }
    location <VODE_APP_PATH> {
        root <DIST_PATH>;
        rewrite ^<VODE_APP_PATH>/(.*)$ /$1 break;
        try_files $uri =404;
        add_header Cache-Control "no-store";
    }

    # ...
}

Copy dist/ to the server:

# placeholder:
    # <DIST_PATH: <DIST_PATH>
    # <STATIC_FILES_SERVER: <STATIC_FILES_SERVER>

ssh <STATIC_FILES_SERVER> "rm -Rf <DIST_PATH>/*"
scp -rp dist/* <STATIC_FILES_SERVER>:<DIST_PATH>
ssh <STATIC_FILES_SERVER> "find <DIST_PATH> -type d -exec chmod 755 {} +"
ssh <STATIC_FILES_SERVER> "find <DIST_PATH> -type f -exec chmod 644 {} +"

DevOps

npm install
npm update

npm run clean
npm run build
npm run tests

npx tsx dist/cli.bundle.js -- example/

Change Management

  1. Create a new branch for the change.
  2. Make the changes and commit.
  3. Bump the version in package.json.
  4. Add an entry for the new version in CHANGELOG.md.
  5. Pull-request the branch.
  6. Ensure package artifacts are current.
  7. Publish.

Publish

~/.npmrc or .npmrc:

@vode-app:registry=https://git.chimps.quest/api/packages/vode-app/npm/
//git.chimps.quest/api/packages/vode-app/npm/:_authToken=${VODE_APP_REGISTRY_AUTH_TOKEN}

~/.bunfig.toml or bunfig.toml:

[install.scopes]
"vode-app" = { url = "https://git.chimps.quest/api/packages/vode-app/npm/", token = "$VODE_APP_REGISTRY_AUTH_TOKEN" }
# git.chimps.quest/api/packages/vode-app/npm/
export VODE_APP_REGISTRY_AUTH_TOKEN=<AUTH_TOKEN>
# or
$env:VODE_APP_REGISTRY_AUTH_TOKEN = "<AUTH_TOKEN>"
npm publish

Dependencies

Development dependencies

ID Version
@types/node latest
esbuild latest
tsx latest
typescript ^6.0.3

Keywords

typescript template spa
Details
npm
2026-06-19 23:31:21 +02:00
1
temir.ra
MIT
45 KiB
Assets (1)
Versions (29) View all
0.1.0-pre.51 2026-07-05
0.1.0-pre.50 2026-07-05
0.1.0-pre.49 2026-07-05
0.1.0-pre.48 2026-07-05
0.1.0-pre.46 2026-07-01