npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

coralite-scripts

v0.29.6

Published

Configuration and scripts for Create Coralite.

Downloads

2,151

Readme

Coralite Scripts

Welcome to Coralite Scripts, a lightweight script toolset for building and serving Coralite applications. This guide walks you through setting up your local development environment using the provided coralite-scripts package and configuration files.


Project Structure

Coralite expects a standard folder layout:

my-coralite-site/
├── src/
│   ├── pages/        # Your page components (e.g., `about.html`, `index.html`)
│   ├── scss/         # SCSS/Sass/CSS styles
│   └── components/   # Reusable component files
├── public/           # Static assets (CSS, JS, images)
├── dist/             # Output directory for built site (auto-generated)
├── coralite.config.js # Configuration file
└── package.json      # Scripts & dependencies

Step 1: Configure coralite.config.js

Create or update your config file with the following:

import { defineConfig } from 'coralite-scripts'

export default defineConfig({
  output: 'dist',
  public: 'public',
  pages: 'src/pages',
  components: 'src/components',
  styles: {
    type: 'scss', // can be 'scss', 'sass', or 'css'
    input: 'src/scss'
  },
  // Optional: copy static assets from other packages
  assets: [
    { pkg: 'some-package', path: 'dist/asset.js', dest: 'assets/asset.js' }
  ],
  // Optional: ignore processing elements with specific attributes
  ignoreByAttribute: [
    { name: 'data-ignore', value: 'true' }
  ],
  // Optional: skip rendering elements with specific attributes
  skipRenderByAttribute: [
    { name: 'data-skip', value: 'true' }
  ]
})

This tells Coralite where to find your source files, compile CSS from SCSS/Sass/CSS, and serve static assets. It also sets up advanced features like copying static assets or ignoring/skipping rendering of specific elements based on attributes.


Step 2: Start the Development Server

Update your package.json scripts to include:

{
  "scripts": {
    "start": "coralite-scripts start",
    "build": "coralite-scripts build"
  }
}

Then start the dev server:

npm run start

The server runs on http://localhost:3000 by default.


Live Development Features

Coralite provides real-time development workflows out of the box:

| Feature | How It Works | |-------|-------------| | Live Reload | Automatically reloads browser when any .html, .scss, .sass, or .css file changes. | | Hot CSS Updates | Sass/SCSS files are compiled instantly and injected into your page via Server-Sent Events (SSE). | | File Watching | Monitors src/pages, src/scss, public, and src/components. | | Dev Logs | Shows real-time build times, file changes, and status codes in terminal. |


How it works under the hood

  • Routing: /index.html, /aboutabout.html
  • HTML Compilation: Pages are compiled with embedded live reload scripts during development.
  • Sass/CSS Support: .scss, .sass, or .css files are auto-compiled to CSS in dist/css.
  • Server-Sent Events (SSE): Used for real-time updates without full page refresh.

No extra tooling needed — everything is built-in!


Example usage

  1. Create a new file at src/pages/about.html:

    <!DOCTYPE html>
    <html lang="en">
      <head><title>About</title></head>
      <body><h1>Welcome to Coralite!</h1></body>
    </html>
  2. Visit http://localhost:3000/about in your browser — it loads instantly.

  3. Edit the file → see auto-reload!

  4. Add a new SCSS file at src/scss/style.scss, and import it into an HTML page via <link rel="stylesheet" href="/css/style.css">.


Feedback? Found a bug or want a feature? Open an issue on our Codeberg repository!

Happy building with Coralite!