Publish versioned assets with CDN

Build release-ready assets, publish them with explicit version numbers, and use fixed version URLs for one exact production asset set.

Publish versioned assets with Smooth CDN

The problem

Some asset workflows need more than "just overwrite the previous build". You may want explicit release versions, stable URLs for past builds, and a clean way to switch what counts as the current production release.

Without structured versioning, teams often overwrite files, lose release traceability, and make it harder to reference the exact asset set tied to a given deployment.

Overwriting previous asset builds

No explicit release version in the URL

Harder to point at one exact asset set

Less control over staged asset rollout

Messier production asset references

Solution

Smooth CDN lets you define a version directly in project config, create that version during the release flow, publish it when ready, and then use fixed release URLs for one exact asset set.

1

Install and setup Smooth CDN CLI

Smooth CDN CLI is the main release interface for versioned asset publishing. It handles authentication, reads your config, and runs version-aware commands against the target project.

npm install -g @smoothcdn/cli
scdn login

2

Define config file with version setup

The version field in the config file is the key part of this workflow. It tells Smooth CDN which release version your next create, push, and publish commands should operate on.

Example .scdn.json file
{
  "project": "My Frontend Assets",
  "projectSlug": "my-frontend-assets",
  "version": "1.4.0",
  "sources": [
    "./dist/**/*.{js,css}",
    "./public/**/*.{png,jpg,svg,webp,json,mp4,mov,webm,pdf}"
  ],
  "replacePath": {
    "/dist/": "/",
    "/public/": "/"
  },
  "excludes": [
    "./dist/tmp/*"
  ]
}

3

Run deployment

These commands operate on the version defined in your .scdn.json file. That means the release flow stays explicit: create the version, upload files into that version, then publish that same version when it is ready to go live.

npm run build

scdn create-version
scdn push
scdn publish-version

4

Use CDN assets

After publishing, you can reference one exact release version in the URL or uselatest when consumers should always follow the currently published release.

Example usage with fixed version
<link
  rel="stylesheet"
  href="https://cdn.smoothcdn.com/user/my-frontend-assets/1.4.0/main.css"
/>
<script src="https://cdn.smoothcdn.com/user/my-frontend-assets/1.4.0/app.js"></script>

Example usage with latest
<link
  rel="stylesheet"
  href="https://cdn.smoothcdn.com/user/my-frontend-assets/latest/main.css"
/>
<script src="https://cdn.smoothcdn.com/user/my-frontend-assets/latest/app.js"></script>

What You get

A cleaner release-oriented asset workflow with explicit version values and predictable production URLs.

Explicit release version in config

Fixed-version CDN URLs for one exact asset set

Cleaner separation between release creation and go-live

Less risk of overwriting old production assets

Publish each asset release as its own version

Use explicit version numbers when one stable asset set should stay addressable over time.