particle

A starter kit for using the prototyping tool, Pattern Lab, in tandem with a Drupal and Grav theme. Utilizes Webpack for all asset management.

Github星跟蹤圖

Particle: A design system integrating to Pattern Lab and a Drupal 8 theme

GitHub (pre-)release Build Status Greenkeeper badge

Particle mascot: Astrogoat

Particle is an opinionated set of tools and examples to:

  1. Build an application-agnostic design system
  2. Apply that design system to a locally-served Pattern Lab for rapid prototyping
  3. Apply that design system to a Drupal theme

In depth documentation about frontend approach using this project at Phase2 Frontend Docs

Prerequisites

Step-by-step instructions to install all dependencies for OSX can be found in this Gist.

Provides

  • Drupal theme, Grav theme, and Pattern Lab app
  • Strict Atomic Design component structure
  • Webpack bundling of all CSS, javascript, font, and static image assets for multiple targets (Drupal theme, Grav theme, Pattern Lab)
  • Webpack Dev Server for local hosting and hot reloading of assets into Pattern Lab
  • Twig namespaced paths automatically added into Drupal theme and Pattern Lab config. Within any twig file, @atoms/thing.twig means the same thing to Drupal theme and Pattern Lab.
  • Iconfont auto-generation
  • Bootstrap 4 integration, used for all starting example components
  • Auto-linting against the AirBnB JavaScript Style Guide and sane Sass standards
  • All Webpack files are fully configurable
  • Simple Yeoman generator for Design System component creation

Quickstart

Particle builds design systems in dev mode for local hosting, or production mode for optimized asset generation.

Quickstart A

  1. Simply run:

    npm create @phase2/particle particle
    
  2. Then cd particle/ and run:

    npm start
    

Quickstart B

  1. Download the latest release
  2. Extract anywhere (i.e. this readme should be at any/where/particle/README.md)
  3. Within the extracted folder run:
npm install
npm run setup
npm start

Simply wait until the webpack bundle output appears then visit http://0.0.0.0:8080/app-node-pl/pl/ (or http://localhost:8080/app-node-pl/pl/) and start working.

That's it. For much greater detail on the frontend approach using this project, check out the Phase2 Frontend Docs.

主要指標

概覽
名稱與所有者phase2/particle
主編程語言Twig
編程語言JavaScript (語言數: 8)
平台
許可證GNU General Public License v2.0
所有者活动
創建於2015-04-08 19:34:53
推送於2025-06-10 02:43:25
最后一次提交
發布數70
最新版本名稱v10.7.4 (發布於 )
第一版名稱v1.0 (發布於 2015-03-10 14:05:00)
用户参与
星數314
關注者數35
派生數115
提交數2.1k
已啟用問題?
問題數303
打開的問題數52
拉請求數478
打開的拉請求數28
關閉的拉請求數254
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?