Skip to content

Commit 13364e3

Browse files
committed
0.0.1
1 parent fe12278 commit 13364e3

12 files changed

Lines changed: 156 additions & 31 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release shalecss to NPM
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
id-token: write
14+
15+
steps:
16+
- uses: actions/checkout@v6
17+
18+
- name: Use Node.js
19+
uses: actions/setup-node@v6
20+
with:
21+
node-version: "lts/*"
22+
registry-url: "https://registry.npmjs.org"
23+
24+
- name: Install dependencies
25+
run: npm install
26+
27+
- name: Build packages
28+
run: npm run build
29+
30+
- name: Publish @shalecss/core
31+
run: npm publish --workspace=@shalecss/core --access public --provenance --tolerate-republish
32+
33+
- name: Publish @shalecss/react
34+
run: npm publish --workspace=@shalecss/react --access public --provenance --tolerate-republish
35+
36+
- name: Create GitHub release
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
run: |
40+
tag="${GITHUB_REF#refs/tags/}"
41+
42+
gh release create "$tag" \
43+
--title="$tag" \
44+
--generate-notes

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ This will run a next.js development server at `http://localhost:3000`, as well
2626
as a watch process to rebuild any css files or React components. Documentation
2727
is written in the TSdoc of each component directly in the React workspace.
2828

29+
## Want to read more mes?
30+
31+
This project is made up of two main packages:
32+
33+
- [core](workspaces/core/README.md) - core CSS styles
34+
- [react](workspaces/react/README.md) - a thin React wrapper over said CSS styles
35+
2936
## Usage
3037

3138
Include the following files in your project:

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"build": "npm run build:core && npm run build:react && npm run build:website",
1414
"dev": "concurrently --names core,react,website 'npm run dev:core' 'npm run dev:react' 'npm run dev:website'",
1515
"pretty": "prettier --write . \"!**/reports/*.md\"",
16-
"version": "node ./scripts/version-bump.mjs && npm install && npm run build"
16+
"version": "npm run pretty && node ./scripts/version-bump.mjs && npm install && npm run build"
1717
},
1818
"devDependencies": {
1919
"concurrently": "^9.2.1",

scripts/version-bump.mjs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ import { readFileSync, writeFileSync } from "fs";
33
// Take the monorepo version and propagate it to all workspaces
44

55
const currentVersion = JSON.parse(
6-
readFileSync("./package.json", "utf-8")
6+
readFileSync("./package.json", "utf-8"),
77
).version;
88

99
for (const workspace of ["core", "react", "website"]) {
10-
let manifest = JSON.parse(
11-
readFileSync(`./workspaces/${workspace}/package.json`, "utf-8")
12-
);
10+
let manifest = JSON.parse(
11+
readFileSync(`./workspaces/${workspace}/package.json`, "utf-8"),
12+
);
1313

14-
manifest.version = currentVersion;
14+
manifest.version = currentVersion;
1515

16-
writeFileSync(
17-
`./workspaces/${workspace}/package.json`,
18-
JSON.stringify(manifest, null, 2) + "\n",
19-
"utf-8"
20-
);
16+
writeFileSync(
17+
`./workspaces/${workspace}/package.json`,
18+
JSON.stringify(manifest, null, 2) + "\n",
19+
"utf-8",
20+
);
2121
}

workspaces/core/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# `@shalecss/core`
2+
3+
[![NPM Version](https://img.shields.io/npm/v/%40shalecss%2Fcore)](https://www.npmjs.com/package/@shalecss/core)
4+
[![GitHub License](https://img.shields.io/github/license/logonoff/shalecss)](https://github.com/logonoff/shalecss/blob/main/LICENSE)
5+
6+
A pseudo-skeuomorph CSS framework.
7+
8+
## Installation
9+
10+
```bash
11+
npm install @shalecss/core
12+
```
13+
14+
## Usage
15+
16+
Import the CSS in your project:
17+
18+
```js
19+
import "@shalecss/core/dist/shale.css";
20+
```
21+
22+
Or link directly in HTML:
23+
24+
```html
25+
<link rel="stylesheet" href="node_modules/@shalecss/core/dist/shale.css" />
26+
```
27+
28+
## Documentation
29+
30+
See the full documentation at [https://logonoff.co/shalecss](https://logonoff.co/shalecss)

workspaces/core/package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,20 @@
99
"./dist/icons.svg": "./dist/icons.svg"
1010
},
1111
"type": "module",
12+
"files": [
13+
"dist"
14+
],
1215
"scripts": {
1316
"generate:banner": "node ./scripts/generate-banner.js",
1417
"prebuild": "mkdir -p dist && cp ./shalecss.js ./dist/shalecss.js && cp ./icons.svg ./dist/icons.svg && npm run generate:banner",
1518
"build": "npm run prebuild && sass scss/shale.scss:dist/shale.css --style=compressed --error-css",
16-
"dev": "npm run prebuild && sass scss/shale.scss:dist/shale.css --style=expanded --error-css --watch"
19+
"dev": "npm run prebuild && sass scss/shale.scss:dist/shale.css --style=expanded --error-css --watch",
20+
"prepublishOnly": "pushd ../ && npm run version"
1721
},
22+
"keywords": [
23+
"shalecss",
24+
"react"
25+
],
1826
"repository": {
1927
"type": "git",
2028
"url": "git+https://github.com/logonoff/shalecss.git"

workspaces/react/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# `@shalecss/react`
2+
3+
[![NPM Version](https://img.shields.io/npm/v/%40shalecss%2Freact)](https://www.npmjs.com/package/@shalecss/react)
4+
[![GitHub License](https://img.shields.io/github/license/logonoff/shalecss)](https://github.com/logonoff/shalecss/blob/main/LICENSE)
5+
6+
A pseudo-skeuomorph React component library built on [@shalecss/core](https://www.npmjs.com/package/@shalecss/core).
7+
8+
## Installation
9+
10+
```bash
11+
npm install @shalecss/react @shalecss/core
12+
```
13+
14+
## Usage
15+
16+
Import the core CSS and use the components:
17+
18+
```jsx
19+
import "@shalecss/core/dist/shale.css";
20+
import { Button, Card, Input } from "@shalecss/react";
21+
22+
export default () => {
23+
return (
24+
<Card>
25+
<Input type="text" placeholder="Enter text..." />
26+
<Button>Submit</Button>
27+
</Card>
28+
);
29+
};
30+
```
31+
32+
## Documentation
33+
34+
See the full documentation at [https://logonoff.co/shalecss](https://logonoff.co/shalecss)

workspaces/react/package.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@
1313
"api-extractor": "api-extractor run --local --verbose",
1414
"clean": "rm -rf dist",
1515
"build": "tsgo -p tsconfig.json && npm run api-extractor",
16-
"dev": "npm-watch"
16+
"dev": "npm-watch",
17+
"prepublishOnly": "pushd ../ && npm run version"
1718
},
19+
"keywords": [
20+
"shalecss",
21+
"react"
22+
],
1823
"repository": {
1924
"type": "git",
2025
"url": "git+https://github.com/logonoff/shalecss.git"
@@ -24,20 +29,20 @@
2429
"license": "MIT",
2530
"dependencies": {
2631
"@shalecss/core": "*",
27-
"clsx": "^2.1.1",
28-
"react": "^19.2.0",
29-
"react-dom": "^19.2.0"
32+
"clsx": "^2.1.1"
3033
},
3134
"peerDependencies": {
3235
"react": "^18 | ^19",
3336
"react-dom": "^18 | ^19"
3437
},
3538
"devDependencies": {
3639
"@microsoft/api-extractor": "^7.55.1",
37-
"@typescript/native-preview": "^7.0.0-dev.20251129.1",
3840
"@types/react": "^19.2.7",
3941
"@types/react-dom": "^19.2.3",
40-
"npm-watch": "0.13.0"
42+
"@typescript/native-preview": "^7.0.0-dev.20251129.1",
43+
"npm-watch": "0.13.0",
44+
"react": "^19.2.0",
45+
"react-dom": "^19.2.0"
4146
},
4247
"watch": {
4348
"build": {

workspaces/react/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/**
2-
* Shale UI React Library
2+
* `@shalecss/react` is a React component library that provides
3+
* a thin wrapper around `@shalecss/core` CSS styles.
34
*
45
* @packageDocumentation
56
*/

0 commit comments

Comments
 (0)