Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
92 lines (71 sloc) 3.61 KB

Contribution Agreement

As a contributor, you represent that the code you submit is your original work or that of your employer (in which case you represent you have the right to bind your employer). By submitting code, you (and, if applicable, your employer) are licensing the submitted code to LinkedIn and the open source community subject to the BSD 2-Clause license.

Getting Started

Install required global dependencies:

$ npm install -g lerna yarn

Check out the code:

$ git clone

Go into the css-blocks directory and run some commands:

$ cd css-blocks
$ ./scripts/

Note: if you already have OptiCSS checked out, you can run ./scripts/link-to-opticss.js ../opticss instead of the script above (change the path you pass it according to your needs).

You may want to ensure that the tests for OptiCSS are all passing:

$ cd ../opticss
$ lerna run test
$ cd - # to return to the css-blocks directory

Install dependencies and run tests:

$ lerna bootstrap
$ lerna run test

The code for individual packages of this monorepo are in packages/*. Within any of the packages in this monorepo you'll generally use the npm package scripts to manage the project, E.g. yarn run test or yarn run lintfix. Run yarn run for a list of available commands.

Running Existing Integrations

How to play with CSS Blocks

The monorepo includes two projects that dog-food the Glimmer/Broccoli and JSX/Webpack integrations. To see CSS Blocks in action, see sample integrations, and get a feel for the developer experience, you can spin up these projects and take a peek under the hood.

@css-blocks/website (JSX/Webpack)

The public-facing website and hosted Typedoc API documentation hosted at Built as a React app and dog-foods our JSX/Webpack integrations. For instruction on how to start the developer server, please check out the @css-blocks/website README. For details on the JSX and Webpack integrations, please read their respective package READMEs.

Responsible Disclosure of Security Vulnerabilities

Do not file an issue on Github for security issues. Please review the guidelines for disclosure. Reports should be encrypted using PGP (public key) and sent to preferably with the title "Vulnerability in Github LinkedIn/css-blocks - <short summary>".

Tips for Getting Your Pull Request Accepted

  1. Make sure all new features are tested and the tests pass.
  2. Bug fixes must include a test case demonstrating the error that it fixes.
  3. Open an issue first and seek advice for your change before submitting a pull request. Large features which have never been discussed are unlikely to be accepted. You have been warned.