• This repository has been archived on 11/Jul/2020
  • Stars
    star
    274
  • Rank 150,274 (Top 3 %)
  • Language
    CSS
  • License
    MIT License
  • Created about 11 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Front-end component library for 24 ways. (2013-2019)

Bits, the front-end component library for 24 ways

Requirements

Bits is built upon Fractal, a tool that enables the rapid development of components, templates and pages. Fractal uses a number of ES6 features, so this project requires Node.js v4.0+ to be installed locally. A global install of Gulp is also recommended.

Installation

To get the project up and running, and view components in the browser, complete the following steps:

  1. Download and install Node: https://nodejs.org/
  2. Clone this repo: git clone [email protected]:24ways/frontend.git (SSH) or git clone https://github.com/24ways/frontend.git (HTTPS)
  3. [Optional] Install Gulp globally: npm install gulp -g
  4. [Optional] Install Fractal globally: npm install fractal -g
  5. Install project dependancies: npm install
  6. Start the development environment: npm start
  7. Open your browser and visit http://localhost:3000

Development

When developing components, you may want assets automatically compiled and the browser to refresh automatically. To do this, run the following task:

  • npm run dev

Creating a static build

To create a static instance of this project, run the following task:

  • npm run build

This will create a folder called www, into which the required files will be created.

Deployment

To make this project publicly accessible, you can deploy a static instance by running the following task:

  • npm run publish

This will publish the contents of public to your gh-pages branch.

Repo structure

Sometimes itโ€™s helpful to know what all these different files are forโ€ฆ

/
โ”œโ”€ src/
โ”‚  โ”œโ”€ assets/        # Assets
โ”‚  โ”‚  โ”œโ”€ icons/      # Favicon and home screen icons
โ”‚  โ”‚  โ”œโ”€ images/     # Raster images (used in component examples)
โ”‚  โ”‚  โ”œโ”€ scripts/    # JavaScript files
โ”‚  โ”‚  โ”œโ”€ styles/     # CSS files
โ”‚  โ”‚  โ””โ”€ vectors/    # SVG images, icons and logos
โ”‚  โ”‚
โ”‚  โ”œโ”€ components/    # Components
โ”‚  โ”‚  โ”œโ”€ _partials/  # โ€ฆthat render component previews
โ”‚  โ”‚  โ”œโ”€ common/     # โ€ฆthat may appear anywhere
โ”‚  โ”‚  โ”œโ”€ global/     # โ€ฆthat appear on every page
โ”‚  โ”‚  โ”œโ”€ layouts/    # โ€ฆthat govern macro layout
โ”‚  โ”‚  โ”œโ”€ scopes/     # โ€ฆthat style undecorated markup
โ”‚  โ”‚  โ”œโ”€ templates/  # โ€ฆthat combine components to render page types
โ”‚  โ”‚  โ””โ”€ utilities/  # โ€ฆthat have a single purpose/role
โ”‚  โ”‚
โ”‚  โ”œโ”€ docs/          # Documentation
โ”‚  โ”‚  โ”œโ”€ _partials/  # Partials for rendering documentation
โ”‚  โ”‚  โ””โ”€ โ€ฆ           # Documentation files
โ”‚  โ”‚
โ”‚  โ””โ”€ tokens/        # Design tokens
โ”‚
โ”œโ”€ tmp/              # Files required for dynamic builds (ignored by Git)
โ”œโ”€ www/              # Public build (ignored by Git)
โ”‚
โ”œโ”€ .editorconfig     # Code style definitions
โ”œโ”€ .gitignore        # List of files and folders not tracked by Git
โ”œโ”€ .eslintrc         # Linting preferences for JavasScript
โ”œโ”€ fractal.configjs  # Configuration for Fractal
โ”œโ”€ gulpfile.js       # Configuration for Gulp tasks
โ”œโ”€ LICENSE           # License information for this project
โ”œโ”€ package.json      # Project manifest
โ””โ”€ README.md         # This file