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

create-webpack-starter

v1.1.3

Published

Create a webpack starter with Pug, SCSS, TS and more

Readme

create-webpack-starter

npm version changelog license

Scaffold a modern webpack project using production-ready SPA or MPA templates powered by the frontend ecosystem

Built on top of:

  • @razerspine/webpack-core
  • @razerspine/pug-ui-kit
  • @razerspine/starter-core-scripts

⚠️ Versions prior to 1.1.0 do not include SPA support.


🚀 Quick Start

npx create-webpack-starter my-app

Starts an interactive setup where you choose:

  • Project type (SPA or MPA)
  • Style preprocessor (SCSS or Less)
  • Script language (JavaScript or TypeScript)

⚙️ Non-interactive Usage (Recommended for CI)

npx create-webpack-starter my-app \
  --app-type mpa \
  --style scss \
  --script ts \
  --no-install

All feature flags must be provided together in non-interactive mode.


🧩 Options

| Option | Description | |---------------------------|------------------------------------| | --app-type <spa \| mpa> | Project architecture type | | --style <scss \| less> | CSS preprocessor | | --script <js \| ts> | Script language | | --no-install | Skip dependency installation | | --dry-run | Show actions without writing files | | -v, --version | Show CLI version |


🏗 Project Architectures

SPA (Single Page Application)

SPA templates include:

  • Built-in Router (Singleton pattern)
  • BaseComponent lifecycle
  • Proxy-based reactive state
  • Automatic mount → render → bind → update orchestration
  • Declarative navigation (data-link)
  • Programmatic navigation (Router.navigate())

SPA Lifecycle

Route change
  ↓
destroy() previous component
  ↓
new Page(root)
  ↓
mount()
  ↓
render()
  ↓
bind events
  ↓
update()
  ↓
onInit()

Memory safety is handled automatically via:

  • cleanup registry
  • Proxy disconnect
  • delegated event binding

Best for:

  • dashboards
  • admin panels
  • applications
  • client-side routed projects

MPA (Multi Page Application)

MPA templates use the same reactive engine but without Router.

Includes:

  • Multi-entry webpack setup
  • Independent page scripts
  • Proxy-based reactivity via createStore
  • Manual binding with applyBindings
  • Optional delegated events via bindClickEvents and bindForms

Best for:

  • landing pages
  • marketing sites
  • traditional multipage websites

📦 Template Resolution

Templates are resolved automatically based on selected features.

Example combinations:

| Type | Style | Script | Internal Template Key | |------|-------|--------|-----------------------| | SPA | SCSS | TS | spa-pug-scss-ts | | SPA | SCSS | JS | spa-pug-scss-js | | SPA | Less | TS | spa-pug-less-ts | | SPA | Less | JS | spa-pug-less-js | | MPA | SCSS | TS | mpa-pug-scss-ts | | MPA | SCSS | JS | mpa-pug-scss-js | | MPA | Less | TS | mpa-pug-less-ts | | MPA | Less | JS | mpa-pug-less-js |

Users never select template names directly. The CLI resolves the correct template internally.


📁 Generated Project Structure

Example (SPA):

src/
  assets/
    scripts/
      app.ts
      routes.ts
  views/
    layout/
    pages/
  types/
webpack.config.js
tsconfig.json
postcss.config.js

Example (MPA):

src/
  assets/
  views/
    layout/
    pages/
webpack.config.js

Generated projects are:

  • Fully standalone
  • Not coupled to the CLI
  • Ready for production builds
  • Safe to deploy immediately

🎁 What You Get

  • Production-grade webpack configuration
  • Pug template system
  • SCSS or Less support
  • JavaScript or TypeScript support
  • SPA Router (SPA mode)
  • Reactive View Engine (SPA & MPA)
  • Clean scalable project structure
  • Memory-safe component lifecycle (SPA)
  • Fully standalone output

📚 Documentation

Detailed documentation is available in the /docs directory:


🧪 Testing

This project uses real end-to-end tests to verify:

  • project scaffolding
  • flag-based resolution
  • dry-run behavior
  • invalid combinations handling
  • filesystem correctness

Tests simulate real npx usage.


📋 Requirements

  • Node.js >= 18
  • npm / pnpm / yarn

🛠 How It Works

  1. CLI validates selected flags
  2. Internal template is resolved
  3. Files are copied
  4. Dependencies are installed (unless disabled)
  5. Project is ready to run

📄 License

This project is licensed under the ISC License.