Code Monkey home page Code Monkey logo

chopstick-boilerplate's Introduction

Chopstick Boilerplate

Chopstick Boilerplate is a mobile-first responsive Design Boilerplate using the Chopstick framework.

It uses the following tools

  • Bower as a dependency manager
  • Sass as a scss preprocessor
  • Jekyll as a static site generator
  • Gulp as a build system

Need help?

Setup and usage

Requirements

  1. Ruby and rubygems
  2. Node 4.4.4 and npm 2.15.1 or NVM

Install

For automated install just run ./install.sh from project root. This will check if package managers are installed and download required packages for you. For manual installation follow the below method.

You only need to do this once in a new project. First, cd into the project root (where this file is). Install bundler and the necessary Ruby dependencies:

gem update --system && gem install bundler
bundle install

Install bower and the necessary JavaScript dependencies:

npm install -g bower
bower install

Install gulp and the necessary gulp dependencies:

npm install -g gulp
npm install

Project specific code should be written in the components layer.

Use

We use Gulp as our task runner. There are some basic tasks defined but these can be easily extended by changing the gulpfile.js.

To compile Chopstick Boilerplate, cd into the project root and run:

gulp

This will compile the scss and build the Jekyll site.

For development there is also a watch task wich will load a browsersync server and watch your all your files (*.html, *.md, *.scss, *.js, *.jpg, *.png, *.svg) for changes:

gulp watch

Browsersync also works as a server for your devices. More info can be found on the browsersync site.

Boilerplate

The boilerplate can be used as a styleguide, to build static websites or to speed up making HTML prototypes.

.scss structure.

The Chopstick Scss is maintained in separate repositories which are loaded with Bower. We believe these partials should be easy to update and configurable without writing new code.

Partials

We use the following partials according to the ITCss structure.

  1. chopstick-settings: contains global variables and config switches to get you started. These can be overwritten in your project. Simply duplicate the variables you want to change or replace this file.
  2. chopstick-tools: contains mixins and functions.
  3. chopstick-generic: contains ground-zero styles (Normalize.css, resets, box-sizing)
  4. chopstick-elements: contains unclassed HTML elements (type selectors)
  5. chopstick-objects: contains cosmetic-free design patterns
  6. chopstick-components: contains designed components, chunks of UI (these are maintained in the boilerplate as they are specific to this)
  7. chopstick-utilities: contains helper classes

Usage

We try to keep the code as modular as possible. So you can comment out what you don’t use.

If you want to change something within the external partials you have 3 options:

  1. Change the settings and default appearance by overriding the variables in your project.
  2. Create a pull request on the source code in the correct repository.
  3. Copy the original file in you own project. This means you will have to do manual updates in the future.

Browser support

Chopstick aims to support all modern browsers. This includes latest versions of Chrome, Firefox and Safari and the latest mobile browsers on Android, iPhone and Windows Phone. Internet explorer is currently supported starting from IE10 and up.

What is the Chopstick framework

Chopstick is a framework based on the ITCSS architecture and a series of principles. It creates a structure to easily set-up and build bespoke web projects.

Why do we make Chopstick framework

  • Maintain sensible defaults
  • Enforce a global coding style
  • Create a scalable system for both small and big web projects

Chopstick principles

Chopstick is built upon the following principles. Please keep these in mind when contributing and/or using this framework.

Low specificity

A single-depth-class-based architecture based on the BEM naming methodology.

Highly decoupled

Avoid reliance on other bits.

  • Separation of Concerns: let each piece of code solve its own problems
  • Single Responsibility Principle: one thing, one thing only, one thing well
  • Open/Closed Principle: add via extension, not modification

Highly composable

  • We build the bits that build the bits
  • Make everything opt-in and configurable: expose API-like CSS

Keep it simple

  • The Principle of Least Surprise: make sure expectations are met, and nothing else
  • Murphy’s Law: Pick the option that is the most resilient, even if it is the most boring one

Roadmap

v0.9

  1. Add configurable components (API like ui-kit)
  2. Add configurable theming layer
  3. Redesign/optimize start theme

v0.10

  1. Add configurable javascript patterns

v1.0

  1. Create a self-updating style-guide
  2. Update website and write complete documentation and starter guide

Credits

You are free to contribute to Chopstick via GitHub Pull Requests. We have a couple of simple guidelines we try to follow, of which most are taken from the CSS Tricks Sass Style Guide. Please refer to the CONTRIBUTING.md for more information

We owe a ton of credits to the following projects for inspiration:

chopstick-boilerplate's People

Contributors

xavez avatar adeggermont avatar jonasdegeest avatar jonathandcstr avatar simoncoudeville avatar dietr avatar jessedobbelaere avatar driesstandaert avatar jnnck avatar woutersioen avatar zofie avatar herpoelaertw avatar

Watchers

James Cloos 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.