Coder Social home page Coder Social logo

moakq / front-end-starter-kit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeroenransijn/front-end-starter-kit

0.0 2.0 0.0 647 KB

Optimized for responsive websites with minimal JavaScript

License: MIT License

JavaScript 28.01% CSS 67.74% HTML 4.25%

front-end-starter-kit's Introduction

Jay's Front-end Starter Kit

Optimized for responsive websites with minimal JavaScript

Features

  • Node.js + Nodemon + Express.js + Mustache
  • Opiniated Sass structure with presets
  • CSS is piped through libsass and PostCSS autoprefixer
  • Write perfect styles with CSSComb on save
  • Simple but powerful JavaScript bundler + uglifier

Install project

Project should run on node v5.*

$ npm install to install dependencies

Run project

$ npm start to run the node server.

$ npm run dev to run nodemon through gulp and have CSS comb run on your *.scss files when saved. By default runs on development, set NODE_ENV to production to get the bundle.js instead of separate JS files.

$ npm run build to build the css and JS to a bundle.

Git workflow

There are two main branches: master and dev. Feature branches will be deleted when merged from feature branch to dev and then to master. Feature branches will be prepended with Feature/.

Sass structure

The Sass structure is as follows (in import order):

  • settings contains variables only
  • utilities contains mixins only
  • reset contains global styles to reset the browser base
  • fonts contains font-face declarations
  • components contains component based css

CSS Naming Conventions

In this project components follow the montage BEM conventions, without the namespace for clarity. Also see SUIT CSS.

.MyComponent {}
.MyComponent.is-stateOfComponent {}
.MyComponent--modifier {}

.MyComponent-descendentName {}

/* versions instead of modifiers */
.solid-Button {}
.outline-Button {}

/* optionally namespacing */
.ns_OtherComponent {}

Versions are modifiers without the dependency on the main component. Versions can share modifiers with the main component name. Although the main component name can exist, it's not necessary.

<button class="solid-Button Button--big">Login</button>
/* Button.scss */
.Button {} /* optional */
.solid-Button {}
.outline-Button {}

.Button--small {}
.Button--big {}

Modifiers are still used in cases where there is a dependency on the main component.

<div class="SearchResult SearchResult--highlight"></div>
<div class="SearchResult"></div>

Author & License

Created by Jeroen Ransijn under the MIT license.

front-end-starter-kit's People

Contributors

jeroenransijn avatar

Watchers

James Cloos avatar moakq avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.