Skip to content

Project scaffolding and build system for static sites using Gulp, PostCSS, and Nunjucks.

License

Notifications You must be signed in to change notification settings

tbck/starter-kit

Repository files navigation

Starter Kit

Project scaffolding and build system for static sites using Gulp, PostCSS, and Nunjucks.

Pairs well with style-kit.

Getting started

Before you can build the project there are some dependencies that need to be installed. First install the system-wide dependencies listed below:

Once these are installed, clone the repository or download an archive. Navigate to the project directory and install local project dependencies with npm install. You can now build the project.

Building

Build tasks are setup in gulpfile.js and configured in config.js.

The default task will clean out the configured destination directory and build a fresh project into it. Once the project is built a local web server will be started in the build directory and source files will be watched for changes.

If you wish to build the project without starting a web server or watching for changes use the build task.

Stylesheets

CSS is processed with a small set of PostCSS plugins. These are listed below:

CSS format

The golden rule: All code in any part of the code base should look like a single person typed it, no matter how many people contributed.

Linters are setup to ensure consistent stylesheet format. Feel free to adjust them to your preferences.

The style is enforced by Stylelint and a SUIT CSS / BEM linter. There is also an Editorconfig file that can be used to keep editor settings consistent.

Templates

Pages and templates are processed with Nunjucks. Data from the root property in config.js is made available to templates through the {{ site }} variable.

Scripts

JavaScript bundles are concatenated and minified before being output to the build directory.

Images

Images are minified and output into the build directory.

Other assets

Other assets can be copied to the build directory with the copy task.

About

Project scaffolding and build system for static sites using Gulp, PostCSS, and Nunjucks.

Resources

License

Stars

Watchers

Forks

Packages

No packages published