Skip to content

🚨NOT MAINTAINED! ⚑ Frontend boilerplate for static websites using Gulp/BrowserSync/Pug/Sass

License

Notifications You must be signed in to change notification settings

melanieseltzer/static-frontend-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Static Frontend Boilerplate

dependencies Status devDependencies Status contributions welcome

An easy starter boilerplate for static websites, to get you up and coding quickly. Uses Gulp and BrowserSync for local development, Sass for preprocessing, and Pug for templating πŸ”₯

πŸ‘‰ Getting Started

Prerequisites

Installing

Clone repo and cd into project directory:

git clone git@github.com:melanieseltzer/static-frontend-boilerplate.git
cd static-frontend-boilerplate

Install dependencies:

npm install

πŸš€ Commands

Serve locally from tmp. BrowserSync watches for changes in src and automatically reloads the browser:

gulp serve

Build the dist directory for deployment:

gulp build

Deploy dist directory to GitHub Pages (gh-pages branch):

gulp deploy

Delete tmp and dist folders for easy cleanup:

gulp clean (both)
gulp clean:tmp
gulp clean:dist

πŸ“ Folder Structure

Develop your site in the src directory. Production code is built to dist. Dev server runs from tmp. It is not intended to be committed to the repo (it's deleted automatically on production build), but commit it if you wish.

static-frontend-boilerplate/
|β€”β€” dist/
|   |β€”β€” assets/
|   |   |β€”β€” img/
|   |   |   |β€”β€” # optimized images
|   |   |β€”β€” fonts/
|   |   |β€”β€” pdfs/
|   |   |β€”β€” etc...
|   |β€”β€” css/
|   |   |β€”β€” all.css (packaged and minified)
|   |   |β€”β€” all.css.gz (gzip compression)
|   |β€”β€” js/
|   |   |β€”β€” all.js (packaged and minified)
|   |   |β€”β€” all.js.gz (gzip compression)
|   |β€”β€” test-directory/
|   |   |β€”β€” index.html
|   |   |β€”β€” index.html.gz (gzip compression)
|   |β€”β€” index.html
|   |β€”β€” index.html.gz (gzip compression)
|β€”β€” src/
|   |β€”β€” assets/
|   |   |β€”β€” img/
|   |   |   |β€”β€” # unoptimized images
|   |   |β€”β€” fonts/
|   |   |β€”β€” pdfs/
|   |   |β€”β€” etc...
|   |β€”β€” js/
|   |   |β€”β€” all.js
|   |β€”β€” styles/
|   |   |β€”β€” base/
|   |   |β€”β€” components/
|   |   |β€”β€” helpers/
|   |   |β€”β€” layout/
|   |   |β€”β€” pages/
|   |   |β€”β€” all.scss
|   |β€”β€” views/
|   |   |β€”β€” includes/
|   |   |   |β€”β€” _footer.pug
|   |   |   |β€”β€” _header.pug
|   |   |   |β€”β€” _scripts.pug
|   |   |   |β€”β€” _styles.pug
|   |   |β€”β€” layouts/
|   |   |   |β€”β€” _default.pug
|   |   |β€”β€” test-directory/
|   |   |   |β€”β€” index.pug
|   |   |β€”β€” index.pug
|β€”β€” tmp/
|   |β€”β€” assets/
|   |   |β€”β€” img/
|   |   |   |β€”β€” # unoptimized images
|   |   |β€”β€” fonts/
|   |   |β€”β€” pdfs/
|   |   |β€”β€” etc...
|   |β€”β€” css/
|   |   |β€”β€” all.css
|   |   |β€”β€” all.css.map
|   |β€”β€” js/
|   |   |β€”β€” all.js
|   |   |β€”β€” all.js.map
|   |β€”β€” test-directory/
|   |   |β€”β€” index.html
|   |β€”β€” index.html
|β€”β€” .gitignore
|β€”β€” gulfile.js
|β€”β€” LICENSE
|β€”β€” package-lock.json
|β€”β€” package.json
|β€”β€” README.md

πŸ”§ Configurable Options

Set your paths. You can modify depending on your workflow/naming conventions.

var paths = {
  vendor: {
    css: [
      './node_modules/normalize.css',
      './node_modules/bootstrap/dist/css',
      etc...
    ],
    js: [
      './node_modules/jquery/dist',
      './node_modules/popper.js/dist/umd',
      './node_modules/bootstrap/dist/js',
      etc...
    ]
  },
  assets: {
    src: 'src/assets/**/*',
    tmp: 'tmp/assets',
    dist: 'dist/assets'
  },
  js: {
    src: 'src/js/**/*.js',
    tmp: 'tmp/js',
    dist: 'dist/js'
  },
  styles: {
    src: 'src/styles/**/*.{css,scss,sass}',
    tmp: 'tmp/css',
    dist: 'dist/css'
  },
  views: {
    src: 'src/views/**/*.pug',
    _src: 'src/views/**/!(_)*.pug'
  },
  html: {
    src: 'tmp/**/*.html'
  },
  src: 'src',
  tmp: 'tmp',
  dist: 'dist'
};

❀️ Built With

License

This project is licensed under the MIT License - see the LICENSE file for details

About

🚨NOT MAINTAINED! ⚑ Frontend boilerplate for static websites using Gulp/BrowserSync/Pug/Sass

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published