Skip to content

Commit

Permalink
Distribute raw and built files together (#23)
Browse files Browse the repository at this point in the history
- Copy raw CSS files to dist/release/dojo for use with composition
- Output transformed CSS modules and index.ts to dist/release/dojo as
  index.css and index.js, respectively
- Output a separate build for use with custom elements to
  dist/release/dojo, including any assets (which will also be hashed)
  • Loading branch information
mwistrand committed Aug 16, 2018
1 parent 74e7973 commit 72a5295
Show file tree
Hide file tree
Showing 6 changed files with 2,622 additions and 80 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ Package that contains a collection of Dojo themes.

## Usage

Simply `npm i @dojo/themes` into your project and import the theme you require.
### With Dojo applications

1. Install `@dojo/themes` with `npm i @dojo/themes`.
2. Import the theme CSS into your project's `main.css`: `@import '@dojo/themes/dojo`.
3. Import the theme module and pass it to the widgets you need themed:

``` javascript
import theme from '@dojo/themes/dojo';
Expand All @@ -16,6 +20,12 @@ render() {
}
```

### With custom elements

1. Install `@dojo/themes` with `npm i @dojo/themes`.
2. Add the custom element-specific theme CSS to `index.html`: `<link rel="stylesheet" href="node_modules/@dojo/themes/dojo/dojo-{version}.css">`.
3. Add the custom element-specific theme JS to `index.html`: `<script src="node_modules/@dojo/themes/dojo/dojo-{version}.js"></script>`.

## Composition

To compose and extend the themes within a dojo project, run `npm i @dojo/themes` and use the `css-module` composes functionality.
Expand All @@ -33,4 +43,7 @@ Variables can be used by using `@import` to import the `variables.css` file from

## Generating typings

Run `npm run build` to generate `.m.css.d.ts` files
The following `npm` scripts are available to facilitate development:

- `build:tcm`: generate `.m.css.d.ts` files
- `watch`: generate `.m.css.d.ts` files in watch mode
Loading

0 comments on commit 72a5295

Please sign in to comment.