Skip to content

Commit b319a30

Browse files
committed
Added more information to the Instalation section and filled out the Usage setion
1 parent 69445a2 commit b319a30

File tree

1 file changed

+55
-20
lines changed

1 file changed

+55
-20
lines changed

README.md

Lines changed: 55 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# The `css-colors` Package
22
<div align="center">Version 0.1.0</div>
33

4-
Enables CSS colors to be used by their names within a Typst document.
4+
Allows CSS/SVG named colors to be used directly in a Typst document.
55

66
## Template adaptation checklist
77

@@ -27,14 +27,12 @@ Enables CSS colors to be used by their names within a Typst document.
2727

2828
## Getting Started
2929

30-
These instructions will get you a copy of the project up and running on the typst web app. Perhaps a short code example on importing the package and a very simple teaser usage.
30+
These instructions will get you a copy of the project up and running on the typst web app.
3131

3232
```typ
3333
#import "@preview/css-colors:0.1.0": *
3434
3535
Normal text may be #text(fill: css("crimson"))[colored so.]
36-
37-
#rect(width: 100%, height: auto, fill: css("darkorchid"))
3836
```
3937

4038
<picture>
@@ -44,42 +42,79 @@ Normal text may be #text(fill: css("crimson"))[colored so.]
4442

4543
## Installation
4644

47-
Set up your development environment by following these steps:
45+
Follow these steps to set up your development environment and prepare for contributing to the project:
4846

4947
1. **Typst**
50-
Install Typst (version 0.13.0 or higher) using the [official installation instructions](https://github.com/typst/typst?tab=readme-ov-file#installation).
51-
48+
Install Typst (version 0.13.0 or higher) using the [official installation instructions](https://github.com/typst/typst?tab=readme-ov-file#installation). Typst is required to work with the core functionality of the project.
5249

5350
1. **Just**
54-
Install [Just](https://just.systems/man/en/introduction.html) using a package manager or by downloading a pre-built binary. For more information, refer to the [available packages](https://just.systems/man/en/packages.html).
51+
Install [Just](https://just.systems/man/en/introduction.html), a handy command runner for executing predefined tasks. You can install it using a package manager or by downloading a pre-built binary. Refer to the [available packages](https://just.systems/man/en/packages.html) for installation instructions specific to your operating system.
5552

5653
1. **tytanic**
57-
Install [tytanic](https://tingerrr.github.io/tytanic/index.html) by following the [quickstart installation guide](https://tingerrr.github.io/tytanic/quickstart/install.html).
54+
Install [tytanic](https://tingerrr.github.io/tytanic/index.html), a library essential for testing and working with Typst projects. Use the [quickstart installation guide](https://tingerrr.github.io/tytanic/quickstart/install.html) to get it up and running.
5855

5956
1. **Clone the Repository**
60-
Clone the project repository to your local machine:
57+
Download the project's source code by cloning the repository to your local machine:
6158

6259
```bash
6360
git clone https://github.com/kleinbottle/css-colors.git
6461
```
6562

6663
Once you've completed these steps, your development environment will be ready.
6764
65+
### Next Steps
66+
67+
The `css-colors` package source code is located at:
68+
69+
```plaintext
70+
src/css-colors.typ
71+
```
72+
73+
This is where you will make any necessary changes to the module.
74+
75+
### Running Tests
76+
77+
To test the functionality of the module locally, run the predefined test cases using the following command:
78+
79+
```bash
80+
just test
81+
```
82+
83+
Ensure that all tests pass before submitting any changes to maintain the project's integrity.
84+
85+
If you want to test the module with a typst file, you can install the css-colors package locally in the preview location by running:
86+
87+
```bash
88+
just install-preview
89+
```
90+
91+
Once installed, you can import the module into your typst file using the following statement:
92+
93+
```typ
94+
#import "@preview/css-colors:0.1.0": *
95+
```
96+
97+
This setup allows you to experiment with the module in a typst file before finalizing your changes.
98+
6899
## Usage
69100

70-
A more in-depth description of usage. Any template arguments? A complicated example that showcases most if not all of the functions the package provides? This is also an excellent place to signpost the manual.
101+
Here are some examples demonstrating how to use the css-colors module:
71102

72103
```typ
73-
#import "@preview/my-package:0.1.0": *
104+
#import "@preview/css-colors:0.1.0": *
74105
75-
#let my-complicated-example = ...
76-
```
106+
#rect(width: 100%, height: auto, fill: css("darkorchid"))
77107
78-
## Additional Documentation and Acknowledgments
108+
#align(center)[
109+
#polygon.regular(
110+
fill: css("darkgoldenrod").lighten(60%),
111+
stroke: (paint: css("darkgoldenrod"), thickness: 4pt, cap: "round"),
112+
size: 80mm,
113+
vertices: 6,
114+
)
115+
]
116+
```
79117

80-
* Project folder on server:
81-
* Confluence link:
82-
* Asana board:
83-
* etc...
118+
For additional examples and detailed explanations, refer to the project manual.
84119

85-
# Needed to install just, rust and tytanic
120+
## Additional Documentation and Acknowledgments

0 commit comments

Comments
 (0)