All Projects → liip → styleguide-starterkit

liip / styleguide-starterkit

Licence: MIT license
A starterkit to create styleguides with Fractal and Webpack.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to styleguide-starterkit

innoq-styleguide
INNOQ Styleguide and Component Library
Stars: ✭ 24 (-31.43%)
Mutual labels:  styleguide, fractal
Toolkit
Sky's CSS Toolkit
Stars: ✭ 126 (+260%)
Mutual labels:  styleguide, toolkit
fractal-starter-kit
Starter kit for Fractal with SCSS, Webpack, XO, sass-lint and Gulp
Stars: ✭ 22 (-37.14%)
Mutual labels:  styleguide, fractal
react-dsfr
Non-official React components of the official french Système de Design de l'État.
Stars: ✭ 48 (+37.14%)
Mutual labels:  styleguide
styleguide
Official code style guide of Banksalad
Stars: ✭ 91 (+160%)
Mutual labels:  styleguide
merchant-center-application-kit
Tools and components for developing Merchant Center Applications 🛠
Stars: ✭ 61 (+74.29%)
Mutual labels:  toolkit
streamsx.kafka
Repository for integration with Apache Kafka
Stars: ✭ 13 (-62.86%)
Mutual labels:  toolkit
styleguide
A living styleguide powering the Mapzen brand (TM)
Stars: ✭ 13 (-62.86%)
Mutual labels:  styleguide
haxe-shaderfun
lyapunov fat fractals haxe prodecure
Stars: ✭ 14 (-60%)
Mutual labels:  fractal
sass-starter-pack
Sass starter files using Gulp v4.0.0 🔥
Stars: ✭ 34 (-2.86%)
Mutual labels:  starterkit
atomic-lab
Styleguide Generator based on partial templates ( html / ejs / haml )
Stars: ✭ 41 (+17.14%)
Mutual labels:  styleguide
eslint-config-mingelz
A shared ESLint configuration with Chinese comments. 一份带有完整中文注释的 ESLint 规则。
Stars: ✭ 15 (-57.14%)
Mutual labels:  styleguide
VCL-explorer
Shows all virtual/dynamic/interface methods inside a given BPL in a tree-like view with searching
Stars: ✭ 17 (-51.43%)
Mutual labels:  toolkit
DGFraud-TF2
A Deep Graph-based Toolbox for Fraud Detection in TensorFlow 2.X
Stars: ✭ 84 (+140%)
Mutual labels:  toolkit
ymir-js
This toolkit is created to make it easier for you to develop games like chess, checkers, go, match 3 puzzle and more. It is still under development.
Stars: ✭ 30 (-14.29%)
Mutual labels:  toolkit
rubick
🔧 Electron based open source toolbox, free integration of rich plug-ins. 基于 electron 的开源工具箱,自由集成丰富插件。
Stars: ✭ 3,901 (+11045.71%)
Mutual labels:  toolkit
git-diff-lint
Lint only the files your branch touches
Stars: ✭ 36 (+2.86%)
Mutual labels:  styleguide
awesome-python-code-formatters
A curated list of awesome Python code formatters
Stars: ✭ 168 (+380%)
Mutual labels:  styleguide
Mandelbrot-set-explorer
An interactive Mandelbrot set, made with Python3 and Tkinter
Stars: ✭ 31 (-11.43%)
Mutual labels:  fractal
starterkit-mustache-bootstrap
A Bootstrap starter kit for Pattern Lab
Stars: ✭ 23 (-34.29%)
Mutual labels:  starterkit

Styleguide starterkit

A starterkit to create web styleguides with Fractal and Webpack.

  • Fractal pre-configured with Nunjucks
  • JavaScript bundling with Webpack and Babel
  • Sass compilation, including Autoprefixer
  • SVG icons sprite generation
  • Live reload (with hot module replacement) for comfortable development
  • Automated release management with release-it

Installation

Prerequisites: Node.js >= 10, <= 12

Inside the directory of your choice, install a copy of the starterkit with:

curl -L https://github.com/liip/styleguide-starterkit/archive/master.tar.gz | tar zx --strip 1

Then install the npm dependencies with:

npm install

Getting started

To start the development server, run:

npm start

You can now access your styleguide at localhost:3000.

You’re all set, start to:

  • Create components as .nunj (Nunjucks) files inside the components directory
  • Write some style inside assets/scss/common.scss
  • Write JavaScript inside assets/scripts/common.js
  • Put some *.svg icons in the assets/icons directory
  • Write documentation as .md (Markdown) files inside the docs directory.

Build

You can build a static version of the styleguide to deploy it wherever you like by running:

npm run build

The generated files go to the dist directory.

Release

The starterkit comes with a preconfigured release management tool. It will automatically update the CHANGELOG.md file at the root of the project based on the commit messages as long as they follow the Angular commit guidelines. It will also bump the version number in the package.json, run the build command above, commit, tag and push the changes. This process is interactive and you’ll be able to skip steps manually if you like.

To release a new version run:

npm run release [patch|minor|major|version_number]

By default the version bump is automatically determined based on the commits messages.

Read more in the release-it documentation.

Deploy

To deploy a build of the styleguide, simply replace the blank command in the package.json, under scripts -> deploy. This will be automatically invoked at the end of the release process described above.

An example of a simple deploy command using rsync:

"deploy": "rsync -avz --delete --exclude='.*' dist/ [email protected]:/var/www/html/my-styleguide"

⚠️ Notice the --delete flag which means all files not present locally will be deleted on the remote server. Be careful, this can leads to data loss!

You can also deploy manually at any time by running:

npm run deploy

Misc

Browsers support

The browsers support is defined in .browserslistrc. It’s used both by Autoprefixer for the CSS and by @babel/preset-env for the JavaScript.

Check browserslist’s documentation to change the browser support.

Icons

Icons placed inside assets/icons are combined into a sprite called icons.svg when referenced. To load them, either reference them in your JavaScript:

import 'icons/foo.svg';

Or in your stylesheet:

background-image: url('../icons/foo.svg');

Webpack will automatically rewrite the links to the sprite with the correct identifier. See svg-sprite-loader documentation for more information.

You can then easily use an icon in a template with the icon snippet:

{% render '@icon', { id: 'foo', class: 'bar' } %}

Warning: This method of including remote SVG file is not supported by Internet Explorer 11 and below. You may want to polyfill it with svgxuse.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].