Skip to content

Commit

Permalink
🚧 lib folder updates
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelLaptev committed Jun 18, 2023
1 parent ff557fe commit aa3f0b0
Show file tree
Hide file tree
Showing 9 changed files with 118 additions and 887 deletions.
14 changes: 14 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Ignore everything
*

# But not these files...
!.npmignore
!README.md
!README-images
!lib/**/*
# etc...

# ...even if they are in subdirectories

# if the files to be tracked are in subdirectories
!squircle.min.js
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ React.useEffect(() => {

# 🎛  Custom CSS Properties

![--squircle-radius](./README-images/--squircle-radius.png)
![--squircle-radius](https://raw.githubusercontent.com/PavelLaptev/squircle-houdini-css/main/README-images/--squircle-radius.png)

## --squircle-radius property

Expand Down Expand Up @@ -108,7 +108,7 @@ Set radii for the corners individually

---

![individual border radius](./README-images/squircle-radius-separate.png)
![individual border radius](https://raw.githubusercontent.com/PavelLaptev/squircle-houdini-css/main/README-images/squircle-radius-separate.png)

## individual border radius

Expand All @@ -132,7 +132,7 @@ The property controls the roundness of the corners individually.

---

![--squircle-smooth](./README-images/--squircle-smooth.png)
![--squircle-smooth](https://raw.githubusercontent.com/PavelLaptev/squircle-houdini-css/main/README-images/--squircle-smooth.png)

## --squircle-smooth property

Expand All @@ -158,7 +158,7 @@ The property controls the length of bezier guide lines. Could be defined by `--s

---

![--squircle-outline](./README-images/--squircle-outline.png)
![--squircle-outline](https://raw.githubusercontent.com/PavelLaptev/squircle-houdini-css/main/README-images/--squircle-outline.png)

## --squircle-outline property

Expand All @@ -184,7 +184,7 @@ The property controls squircle outline. There are two methods how too use it wit

---

![--squircle-fill](./README-images/--squircle-fill.png)
![--squircle-fill](https://raw.githubusercontent.com/PavelLaptev/squircle-houdini-css/main/README-images/--squircle-fill.png)

## --squircle-fill property

Expand Down Expand Up @@ -281,28 +281,28 @@ If you have any ideas, just [open an issue](https://github.com/PavelLaptev/squir

If you'd like to contribute, please fork the repository. Pull requests are warmly welcome.

The project structure is separated into `nextJS` app and `lib` folder. The `lib` folder contains the script itself. The `nextJS` app is used for the demo. The `lib` folder is a separate NPM package.
The project structure is separated into `nextJS` app and `lib` folder. The `lib` folder contains the script itself. The `nextJS` app is used for the demo.


```
📁 root
📁 lib
- package.json
- squircle.js
📁 … other nextJS folders
```

In order to test the script locally:

1. you need to run `npm run dev` in the root folder. It will start the NextJS app.
2. Then you need to run `npm run watch:build` in the `lib` folder. It will start the watcher for the script. It will build the script every time you change it and create `squircle.min.js` file in the `lib` folder and in the `public` folder of the NextJS app.
2. Then you need to run `npm run watch:lib-build`. It will start the watcher for the script. It will build the script every time you change it and create `squircle.min.js` file in the `root` folder and in the `public` folder of the NextJS app.
3. In the `index.tsx` file of the NextJS app, you can uncomment the line with [test section](https://github.com/PavelLaptev/squircle-houdini-css/blob/70f81510d45185e3946ec2cbec3cd4ab6495224b/src/pages/index.tsx#L57) un comment other in order to ease the development process.

---

## Change log (v0.3.0)

- Removed `--squircle-ratio` property. It's now fixed to `1.8`. It's still possible to change the ratio by changing `--squircle-smooth` property.
- Moved the demo to NextJS
- Added `--squircle-radius-top-left`, `--squircle-radius-top-right`, `--squircle-radius-bottom-right`, `--squircle-radius-bottom-left` properties
- Added separate `lib` folder only for the script
- removed `css-paint-polyfill` from dependencies. It's now optional.
- Moved the demo to NextJS
22 changes: 0 additions & 22 deletions lib/.eslintrc.js

This file was deleted.

18 changes: 0 additions & 18 deletions lib/package.json

This file was deleted.

Loading

0 comments on commit aa3f0b0

Please sign in to comment.