lbry.com/web/components
YULIUS KURNIAWAN KRISTIANTO d80664e0f9
Update index.html (#1216)
2020-02-03 17:13:24 -05:00
..
dist remove submodule link on web/components/ 2019-11-22 15:57:59 -05:00
docs Update index.html (#1216) 2020-02-03 17:13:24 -05:00
sass remove submodule link on web/components/ 2019-11-22 15:57:59 -05:00
.editorconfig remove submodule link on web/components/ 2019-11-22 15:57:59 -05:00
.gitignore remove submodule link on web/components/ 2019-11-22 15:57:59 -05:00
.npmrc remove submodule link on web/components/ 2019-11-22 15:57:59 -05:00
LICENSE remove submodule link on web/components/ 2019-11-22 15:57:59 -05:00
package.json remove submodule link on web/components/ 2019-11-22 15:57:59 -05:00
README.md remove submodule link on web/components/ 2019-11-22 15:57:59 -05:00

@lbry/components

Styling for shared components across LBRY properties

Installation

$ npm i @lbry/components sass -D

We recommend using this module with Dart Sass for its' focus on speed and low dependency count.

If you are using @lbry/components, you can safely remove @lbry/color if you've already included it separately (this module includes it by default).

Demo

https://lbryio.github.io/components

Usage

Your main Sass file:

@charset "utf-8";

@import "@lbry/components/sass/";
// ...your other Sass imports

In your watch scripts for Sass files, ensure you load the node_modules path in order to import this module in your project without silly prefixes like ../../../. What a mess.

Example package.json scripts section:

"scripts": {
  ...,
  "sass:dev": "sass --load-path=node_modules --watch app/sass:app/dist --style compressed",
  "sass:prod": "sass --load-path=node_modules --update app/sass:app/dist --style compressed",
  ...
}

They are nearly identical, save for --watch and --update. Please refer to the Dart Sass README for assistance on how to integrate it with your project. The above example is taken from the lbry.tech repo.

Note

To use with Webpack, you have to make use of the tilde character when referencing a file inside your node_modules folder. Like so:

@import "~@lbry/components/sass/";

License

BSD 3-Clause Copyright © LBRY Inc.