/cookiecutter-js

Template webapp repo with webpack, JS/HTML/CSS

Primary LanguageJavaScriptApache License 2.0Apache-2.0

cookiecutter-js

A template for creating web applications. It uses webpack for bundling and building the application, and the codebase primarily consists of JavaScript, HTML, and CSS.

Use this template

New Repo with Github UI

On this template's repository navigate to Use this template > Create a new repository

With Cookiecutter CLI

  1. Ensure cookiecutter is installed (follow install guide here)
  2. if pipx is still recommended in cookiecutter install, run: pipx run cookiecutter gh:bjahnke/cookiecutter-js

Project Structure

The project structure includes a source directory (src/) containing the main HTML, JavaScript, and CSS files. Configuration for webpack is split into common, development, and production files. The project also includes an ESLint configuration file for maintaining code quality.

src/

  • index.html: Main HTML file for the application.
  • index.js: Main JavaScript file for the application.
  • styles.css: Main stylesheet for the application.

Project Management Files

  • webpack.common.js
  • webpack.dev.js
  • webpack.prod.js
  • eslint.config.mjs
  • package.json
  • LICENSE
  • .gitignore

Building and Running the Project

The package.json file contains various scripts for running and building the application:

  • npm start: Starts the webpack development server.
  • npm run watch: Builds the project with webpack in watch mode.
  • npm run build: Builds the project with webpack for production.

License

The project is licensed under the ISC License, as indicated in the LICENSE file.