npm-web-sampler

May 31, 2026 ยท View on GitHub

CODE_OF_CONDUCT | CONTRIBUTING | LICENSE | SECURITY | CHANGELOG | TODOs

  • pull_request
    • Semantic Pull-Request
    • Pull Request
    • helm
    • terraform
    • [C]ontinuous [I]ntegration: PR
  • main
    • Continuous Integration @ main
    • dependabot
  • any
    • MegaLinter
    • Deployment
    • Un-Deployment

AI

Summary

A web sampler of technologies and tools that can be used to quickly scaffold a web-project

  • npm
  • bower
  • pip ( & pipx)
  • grunt
  • jasmine: jest, testem & frisby
  • semantic-release: To automagically create releases
  • docker ( & docker-compose )
  • helm: To Deploy to Kubernetes
  • megalinter
  • parcel: Bundler

Motivation

This project goes to great lengths to prove all the DevOps & CI/CD work needed for something like simple static index.html.

This is ALL THE BELLS AND WHISTLES, but WITHOUT the Christmas tree ๐ŸŽ„.

Purpose

Demonstrate the amount of code and overhead needed for devops, even without having an actual project.

Package Managers

namefilelock filedestinationcomments
npmpackage.jsonpackage-lock.jsonnode_packages/Node packages
bowerbower.jsonrepositories/git clone {repo}@main
piprequirements*.txtrequirements.frozen.txt.venv/pip install -r requirements.txt
pipxrequirements.pipx.txt~/.local.bin/*pip executable-only packages

Warning

bower is DEPRECATED. We only use the task runner. But NOT the bower registry.

Note

gil (pip install) could replace bower for git clone {repo}@main functionality. I wish npm would allow this.

Task Runners

namefilecomments
npm/npxpackage.jsonSee scripts
yarnpackage.jsonSee scripts:yarn:*
gruntGruntfile.jsFor advanced tasks

Linting

toolfile
prettier.prettierrc*
htmllint.htmllintrc (via grunt)
lint-staged.lintstagedrc.json
standardx.eslintrc*

MegaLinter

+----MATCHING LINTERS-----+----------+----------------+------------+
| Descriptor | Linter     | Criteria | Matching files | Format/Fix |
+------------+------------+----------+----------------+------------+
| COPYPASTE  | jscpd      |          | project        | yes        |
| REPOSITORY | checkov    |          | project        | yes        |
| REPOSITORY | devskim    |          | project        | yes        |
| REPOSITORY | dustilock  |          | project        | yes        |
| REPOSITORY | git_diff   |          | project        | yes        |
| REPOSITORY | gitleaks   |          | project        | yes        |
| REPOSITORY | grype      |          | project        | yes        |
| REPOSITORY | kics       |          | project        | yes        |
| REPOSITORY | secretlint |          | project        | yes        |
| REPOSITORY | syft       |          | project        | yes        |
| REPOSITORY | trivy      |          | project        | yes        |
| REPOSITORY | trivy-sbom |          | project        | yes        |
| REPOSITORY | trufflehog |          | project        | yes        |
+------------+------------+----------+----------------+------------+
namefiledoes
MegaLinter.mega-linter.ymlMegaLinter: All-in-one linter
Code Spell Checker.cspell.jsonCode Spell Checker
DjLint.djlintrcDjLint: HTML, Markdown and YAML linter and formatter
Gherkin Lint.gherkin-lintrcGherkin Lint: Linter for Gherkin syntax
MarkdownLint.markdownlint.jsonMarkdownLint: Markdown style checker
JSCPD.jscpd.jsonJSCPD: Copy/Paste Detector
Lychee.lycheeignoreLychee: Link checker
Trivytrivy.yamlTrivy: Find vulnerabilities in container images and filesystems

Building

See Parcel docs.

Configuration

namefiledoes
HTML Nano.htmlnanorcMinification
PostHTML.posthtmlrcPostHTML: Tool to transform HTML/XML with JS plugins

Testing

[B]ehavior [D]riven [D]evelopment

  • features/
  • testem.yml: Test'em (run unit tests in all browsers)
  • __tests__/
    • *.unit.spec.js: jest+jasmine unit tests
    • *.rest.spec.js: jest+jasmine+frisby RESTful Integration tests
    • *.se.spec.js: jest+selenium Integration tests: (See below)
    • *.pw.spec.js: jest+playwright Integration tests

Selenium

Containerizing

Docker

Linux

Alpine VS Debian

FeatureDebianAlpine Linux
Base Size~100MB to 1GB~5MB (Node wrapper adds ~40MB)
C Libraryglibc (Standard GNU)musl (Ultra-lightweight)
Package Managerapt / apt-getapk
Shellbashsh (via BusyBox)
Debian

Note

Generated from Gemini

VersionCodenameToy Story MeaningCurrent Status in Docker
Debian 15DukeDuke Caboom (daredevil motorcyclist)Future release (planned).
Debian 14ForkyBonnie's homemade spork toyTesting branch (experimental).
Debian 13TrixieThe blue plastic TriceratopsCurrent Stable. Best for bleeding-edge compilers.
Debian 12BookwormThe smart green toy worm with a flashlightOld Stable. Highly compatible, default for most modern apps.
Debian 11BullseyeWoody's wooden toy horseOld-Old Stable. Getting older, actively nearing End of Life.
Debian 10BusterAndy's real-life pet dachshundArchived / EOL. Avoid using for new builds.
Debian 9StretchThe purple rubber toy octopusArchived / EOL. Deprecated across modern Docker builds.

See Linux Debian codenames

Dockerfiles

NamePurpose
DockerfileCurrent
Dockerfile.nextExperimental (future)

docker compose

Entry point for docker. It simplifies development by docker compose up-to-victory.

Setup

env

.env files

  1. Copy .env.*.local.example to .env.*.local and modify as needed. i.e.-
    1. .env.development.local.example

env/ folder

Convenient scripts to export FOO into memory,

  1. Copy .*.src.sh.example to .*.src.sh and modify as needed. i.e.-
    1. google.src.src.sh.example: For npx gemini CLI
    2. kaggle.src.sh.example: For kaggle CLI

Husky

Install:

$> npm run husky:install

See .husky/

Uninstall:

$> npm run husky:uninstall

Dependencies

  1. $> npm run setup
  2. $> npm install

Build

dist/

$> npm run dist

Test

Unit

$> npm test

Browsers

$> npm run testem:ci

Integration

$> npm run validate

Verify

Build + Test

$> npm run verify

w/ Docker

$> npm run verify:docker

References

Medium

Container-ization

GitHub

Logos

bower logo bower logo
BrowserBase.com
claude logo docker logo
frisby logo eslint logo gemini logo github logo
github actions logo github copilot logo grunt logo helm logo
husky logo jasmine logo jest logo junit logo
kubernetes logo lint-staged logo mega-linter logo node logo
npm logo ox security logo parcel logo pip logo
prettier logo selenium logo semantic-release logo
semantic-release
yarn logo