Giter Club home page Giter Club logo

barker's Introduction

Barker

Barker is an SCSS starter kit for design systems.

It includes:

Usage

This kit cannot be installed and does not include any generators. Instead, clone the repository into your project and adapt it to your needs.

git clone [email protected]:woylie/barker.git
cd barker
rm -rf .github .git
pnpm install

Configuration

  • build.js: Contains the build configuration for Esbuild, as well as the PostCSS configuration and PurgeCSS configuration (disabled by default).
  • style-dictionary.js: Contains the configuration for Style Dictionary. You can modify the output formats for the design tokens here. Note that the SCSS files depend on the scss output format.

Commands

Description Command
Development build (tokens, CSS, JS, etc.) pnpm build:dev
Production build (tokens, CSS, JS, etc.) pnpm build:prod
Watch mode (does not watch Style Dictionary tokens) pnpm build:dev:watch
Build Style Dictionary tokens pnpm build:tokens
Run linters pnpm lint
Fix linter issues pnpm lint:fix
Run Prettier pnpm lint:prettier
Fix Prettier issues pnpm lint:prettier:fix
Run Stylelint pnpm lint:stylelint
Fix Stylelint issues pnpm lint:stylelint:fix

Folder Structure

.
├── build                   # Build artefacts (token definitions, CSS, etc.)
│   ├── css                 # CSS output
│   └── tokens              # Token output
│       ├── css             # CSS custom properties
│       ├── js              # JavaScript
│       ├── json            # JSON definitions
│       └── scss            # SCSS mixins and variables
├── src                     # Source files
│   ├── css                 # Styles
│   ├── js                  # JavaScript
│   └── tokens              # Design Tokens
└── ...

Build Folder

The build folder contains the build artefacts.

.
├── ...
├── build                   # Build artefacts
│   ├── css                 # CSS output
│   └── tokens              # Token output
│       ├── css             # CSS custom properties
│       ├── js              # JavaScript
│       ├── json            # JSON definitions
│       └── scss            # SCSS mixins and variables
└── ...

CSS Folders

The CSS styles are divided into the layers base, components, layouts, themes, and utilities. More details about each layer can be found in the corresponding _index.scss files.

.
├── ...
├── src
│   ├── css
│   │   ├── base                    # Global base layer
│   │   │   ├── _animations.scss    # Keyframe animations
│   │   │   ├── _general.scss       # Global styles
│   │   │   ├── _index.scss         # Entry point for base layer
│   │   │   └── _typography.scss    # Global typography styles
│   │   ├── components              # Components are styled elements
│   │   ├── layouts                 # Layouts arrange components on the page
│   │   ├── themes                  # Place for light/dark themes etc.
│   │   ├── utilities               # Utility classes generated from design tokens
│   │   ├── _extends.scss           # SCSS placeholders for @extend
│   │   ├── _functions.scss         # SCSS functions for using design tokens
│   │   ├── _mixins.scss            # SCSS mixins
│   │   └── main.scss               # Entry point
│   └── ...
└── ...

Resources

barker's People

Contributors

woylie avatar dependabot[bot] avatar renovate[bot] avatar

Stargazers

Mohammed Zeglam avatar Marcus Kruse avatar Ryuki Kuga avatar Jarrian Gojar avatar Alex Skrypnyk avatar  avatar

Watchers

James Cloos avatar  avatar Marcin Szczodry avatar  avatar

barker's Issues

Layouts

  • container
  • grid
  • group
  • hero
  • level
  • modal
  • stack
  • with-sidebar

documentation

  • initialize documentation
  • design token guide
  • project structure guide
  • general CSS guide
  • component guide

style dictionary

  • configure style dictionary
  • export JSON for style guide
  • define design tokens with style dictionary, import into SCSS
    • colors
    • font families
    • base size
    • modular scale / sizes
    • base line height
    • line heights
    • lines
    • letter spacings
    • weights
    • radii
    • spacers
    • border widths
    • gutter
    • measure
    • shadows
    • breakpoints
    • time
  • support themes

specification

  • specification for design tokens
  • specification for components
    • specification for component meta data
    • specification for component attributes
    • specification for component structure

Components

  • alert/notification
  • box
  • breadcrumbs
  • buttons
  • card
  • drawer
  • image/figure
  • menu
  • navbar
  • pagination
  • spinner
  • tabs

Theme style sheets

Maybe change setup, so that custom properties are defined in separate theme style sheets.

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.