Skip to content

Gulp starter (All you need for static website coding)

Notifications You must be signed in to change notification settings

alexpryshchepa/gulp-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gulp starter

  • npm install
  • gulp(gulp dev) - run dev environment
  • gulp build - build project, same as gulp dev but without running dev server
  • gulp deploy - deploy project to ftp server
  • --prod - use this flag to minify css / js, reduce images size and other differences for production, ex. gulp build --prod, gulp deploy --prod
  • gulp sasslint - scsslint, rules
  • gulp eslint - eslint, rules. You can use --fix flag to automatically fix problems.

Config file - ftp credentials and paths to files.

Proposed technologies / approaches

HTML

CSS

  • Choose between reset.css and normalize.css
  • SCSS
  • BEM
  • Properties order:
    • Layout: The position of the element in space. Eg.: position, top, z-index.
    • Box: The element itself. Eg.: display, overflow, box-sizing.
    • Visual: Design of the element. Eg.: color, border, background.
    • Type: Typesetting of the element. Eg.: font-family, text-transform.

Code Sample:

  .button {
    position: relative;
    z-index: 2;

    display: inline-block;
    margin: 0 12px;
    padding: 12px 24px;

    background: #3f55aa;
    border-radius: 5px;
    border: 1px solid tomato;
    color: tomato;
    transition: background-color .3s ease-out;

    font-size: 14px;
    line-height: 19px;
    text-transform: uppercase;
  }

JavaScript

File structure

  /* Global code, heplers, utils, etc. */
  common/
    njk/
    scss/
    js/

  /* Reusable components */
  components/
    Component/
      Component.njk
      Component.scss
      Component.js

  /* Pages */
  pages/
    page/
      page.njk
      page.scss
      page.js

Linters

About

Gulp starter (All you need for static website coding)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published