Skip to content

Instantly share code, notes, and snippets.

@dongerardor
Last active June 19, 2026 17:53
Show Gist options
  • Select an option

  • Save dongerardor/b881d652bb47170ad662a954238d8989 to your computer and use it in GitHub Desktop.

Select an option

Save dongerardor/b881d652bb47170ad662a954238d8989 to your computer and use it in GitHub Desktop.
Bootstrap 5 with Sass boilerplate
#!/bin/bash
#USAGE:
#chmod +x crear-bootstrap.sh
#./crear-bootstrap.sh mi_proyecto
PROJECT_NAME=${1:-bootstrap_boilerplate}
mkdir "$PROJECT_NAME"
cd "$PROJECT_NAME" || exit
npm init -y
npm install bootstrap
npm install sass --save-dev
mkdir scss css
cat > scss/main.scss <<'EOF'
$primary: #1d0b49;
$secondary: #2c8d8a;
$success: #167823;
$danger: #4215b4;
$warning: #50bbb2;
$info: #301e5f;
$light: #7f5ed4;
$dark: #18093d;
@import "../node_modules/bootstrap/scss/bootstrap";
EOF
cat > index.html <<'EOF'
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Bootstrap Boilerplate</title>
<link rel="stylesheet" href="css/main.css">
</head>
<body class="container mt-4">
<h1 class="text-primary">Bootstrap con Sass</h1>
<button class="btn btn-primary">
Botón primary
</button>
</body>
</html>
EOF
npm pkg set scripts.watch="sass --watch scss/main.scss css/main.css"
npm pkg set scripts.build="sass scss/main.scss css/main.css"
npm run build
echo "Boilerplate creado en: $PROJECT_NAME"
echo "Para trabajar:"
echo "cd $PROJECT_NAME"
echo "npm run watch"
@dongerardor

Copy link
Copy Markdown
Author

Bootstrap + Sass Boilerplate

A minimal Bootstrap 5 + Sass boilerplate for quick experiments, learning, and small projects.

Features:

  • Bootstrap installed through npm
  • Sass compilation and watch mode
  • Simple project structure
  • Bootstrap theme customization through Sass variables
  • Ready-to-use build and watch scripts

This project was created as a lightweight starting point for learning and prototyping. Feel free to use, modify, and adapt it to your own needs.

If you're new to Bootstrap or Sass, this repository may serve as a simple reference implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment