Skip to content

Commit

Permalink
Merge pull request #116 from macneko-ayu/update-readme-of-create-vivl…
Browse files Browse the repository at this point in the history
…iostyle-theme-template

update-readme-of-create-vivliostyle-theme-template
  • Loading branch information
spring-raining authored Sep 28, 2023
2 parents cc99824 + 3e09265 commit 6229f19
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions packages/create-vivliostyle-theme/templates/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ module.exports = {
};
```

If you want to add your CSS:

```js
module.exports = {
theme: [
'{{kebab name}}',
// add your CSS
],
};
```

## Dev

### Files
Expand All @@ -25,28 +36,26 @@ module.exports = {
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
β”œβ”€β”€ example
β”‚Β Β  β”œβ”€β”€ default.html // auto generated
β”‚Β Β  └── default.md // πŸ–‹
β”‚Β Β  β”œβ”€β”€ assets // auto generated
β”‚Β Β  β”‚ └── Logo (Mark + Type).png // auto generated
β”‚Β Β  └── default.md // πŸ–‹
β”œβ”€β”€ package.json
β”œβ”€β”€ theme.css // πŸ–‹
β”œβ”€β”€ theme.css // πŸ–‹
└── vivliostyle.config.js
```

**example**: Contain sample manuscripts using your theme.

**scss**: You can add files for specific use (print, screen, cover, toc, preface, ...) and apply them at `theme` `entry > theme` in vivliostyle.config.js. Partial files whose names begin with `_` will be ignored.


### Commands

Run `vivliostyle preview` to preview your `theme_*.css`.
Run `vivliostyle preview` to preview your `theme.css`.

To watch file changes, use `dev` script.
To watch file changes, use `preview` script.

```bash
npm run dev
npm run preview
# or
yarn dev
yarn preview
```

You can specify your CSS file and manuscript file for preview in vivliostyle.config.js:
Expand Down

0 comments on commit 6229f19

Please sign in to comment.