Mozilla Foundation's Bootstrap 4 theme.
Перейти к файлу
Mozilla-GitHub-Standards 9dbac66861 Add Mozilla Code of Conduct file (#133)
Fixes #132.

_(Message COC002)_
2019-04-05 21:33:43 -07:00
src Fixes #122 changed the href of the link for participation guidlines and changed … (#123) 2017-12-18 13:32:28 -08:00
.editorconfig Some small fixes and cleanups 2016-10-18 15:33:12 -04:00
.gitignore Some small fixes and cleanups 2016-10-18 15:33:12 -04:00
.npmignore Refactoring version scripts (#80) 2016-11-08 21:43:08 +00:00
.sass-lint.yml Some small fixes and cleanups 2016-10-18 15:33:12 -04:00
.travis.yml Rename to mofo-bootstrap 2016-06-21 19:48:22 +01:00
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file (#133) 2019-04-05 21:33:43 -07:00
ISSUE_TEMPLATE.md adding ISSUE_TEMPLATE 2016-02-18 09:09:14 -08:00
LICENSE initial commit! 2016-02-04 14:55:31 -08:00
README.md Use HTTPS protocol (#121) 2017-10-02 10:18:46 -07:00
deploy.js removing nodegit dep (#81) 2016-11-08 21:38:26 +00:00
package-lock.json 4.1.0 2017-12-18 13:42:47 -08:00
package.json 4.1.0 2017-12-18 13:42:47 -08:00

README.md

Uses Mofo Standards Build Status dependency Status devDependency Status

mofo-bootstrap

Mozilla Foundation Bootstrap 4 theme.

Usage

For the moment it's recommended that you use one of two methods to include the compiled mofo-bootstrap CSS in your project:

  1. Include the library in your package.json for an npm-managed project by running npm install mofo-bootstrap --save. You can then point your build system at the compiled CSS which resides at node_modules/mofo-bootstrap/dest/css/mofo-bootstrap.css. This is the preferred method.
  2. Hotlink to the raw compiled CSS file on Github at http://mozilla.github.io/mofo-bootstrap/dest/css/mofo-bootstrap.css from your HTML. This is not recommended for production, but is OK for prototyping or test purposes. Eventually we will put the CSS on a proper CDN.

It's not currently advisable that you extend and compile the mofo-bootstrap SCSS in your project. SCSS doesn't (currently) allow for dynamic import paths, which complicates things when mofo-bootstrap becomes a module. We're working on a reasonable approach for allowing this...

Setup for Development

Run the following commands in your terminal:

  1. git clone https://github.com/mozilla/mofo-bootstrap.git && cd mofo-bootstrap
  2. npm i
  3. npm start

File Structure

dest/ <- Contains compiled code. Don't edit anything in this folder!
src/
├── index.pug <- Template for demo page (Creates: dest/index.html)
└── scss/
    ├── custom/ <- SCSS for non-Bootstrap modules.
    |     └── components/ <- SCSS for custom components.
    ├── overrides/ <- SCSS modules that override or extend Bootstrap components.
    ├── demo.scss <- SCSS specific to the demo page.
    └── mofo-bootstrap.scss <- Primary entry point that defines all imports.

File Naming Conventions

  • All files should be named in hyphenated-lowercase
  • SCSS modules/partials should be prefixed with an underscore (_)
  • Bootstrap overrides should be named after their sibling. (For example: /src/scss/overrides/_type.scss and bootstrap/scss/_type.scss)

Linting

To lint your Sass code, run npm run test:sass

Travis is connected to this task and your pull requests will fail if this test doesn't pass locally.

Deploying

Deployment is run automatically after npm version is invoked as part of the postversion script.

The npm run deploy command will deploy a demo page and compiled CSS for the library to the gh-pages branch of the origin remote. It will use the latest code on the master branch of the origin remote. It's not recommended to run it on its own, because doing so can result in the deployed demo and library not matching the latest published package in npm.