Skip to content

Commit 4d62166

Browse files
Introduce css-js-gen package to this repo, and refactor project structure (#67)
* refactor workspace * chore: update tsconfig files and add shared tsdown configuration - Refactored tsconfig.src.json and tsconfig.test.json for consistent formatting. - Updated tsdown.config.ts to utilize shared configuration from tsdown.shared.ts. - Added new shared configuration for tsdown in tsdown.shared.ts. - Updated pnpm-lock.yaml to include new dependencies and versions. - Added a new issue template for bug reports related to css-js-gen. - Updated root tsconfig.json to include css-js-gen package reference. * chore: remove css-js-gen subproject * chore: initialize css-js-gen package with README, LICENSE, and configuration files * feat: add CSS generation and styling utilities - Implemented a CSS generator with support for nested selectors, media queries, and various formatting options. - Created base styles for documentation popups, static containers, and completion items. - Added test suite to validate CSS generation functionality and edge cases. - Introduced a scratchpad for testing and outputting generated styles to a file. * chore: add migration notes for css-js-gen to new repository * feat: implement stylesheet function for flexible CSS object handling and add tests * chore: add Biome formatting badge to README * feat: enhance stylesheet function to return an object with styles and toString method, and update tests accordingly * feat: add stylesheet function for flexible style composition with toString method and examples * feat: enhance stylesheet function to accept both array and object styles as a single argument * feat: update StylesheetReturn interface to include options for toString method * feat: export StylesheetReturn type from types.ts * feat: add newline for better readability in StylesheetReturn interface * fix: update installation instructions in README to specify package name
1 parent 3b958ec commit 4d62166

70 files changed

Lines changed: 2924 additions & 121 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/dry-dingos-follow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"expressive-code-twoslash": minor
3+
---
4+
5+
Refactor tsconfig and module imports

.changeset/fluffy-suits-tie.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"css-js-gen": patch
3+
---
4+
5+
Migrate to new repo
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve css-js-gen
4+
title: '(css-js-gen) Bug: [NAME]'
5+
labels:
6+
- bug
7+
- css-js-gen
8+
assignees: ''
9+
---
10+
11+
**Describe the bug**
12+
A clear and concise description of what the bug is.
13+
14+
**To Reproduce**
15+
Steps to reproduce the behavior:
16+
1. Go to '...'
17+
2. Click on '....'
18+
3. Scroll down to '....'
19+
4. See error
20+
21+
**Expected behavior**
22+
A clear and concise description of what you expected to happen.
23+
24+
**Screenshots**
25+
If applicable, add screenshots to help explain your problem.
26+
27+
**Desktop (please complete the following information):**
28+
- OS: [e.g. iOS]
29+
- Browser [e.g. chrome, safari]
30+
- Version [e.g. 22]
31+
32+
**Smartphone (please complete the following information):**
33+
- Device: [e.g. iPhone6]
34+
- OS: [e.g. iOS8.1]
35+
- Browser [e.g. stock browser, safari]
36+
- Version [e.g. 22]
37+
38+
**Additional context**
39+
Add any other context about the problem here.

.github/labeler.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
# See https://github.com/actions/labeler/tree/main for more information about the labeler action
22

33
twoslash:
4-
- changed-files:
5-
- any-glob-to-any-file:
6-
- package/*
4+
- changed-files:
5+
- any-glob-to-any-file:
6+
- packages/expressive-code-twoslash/*
7+
8+
css-js-gen:
9+
- changed-files:
10+
- any-glob-to-any-file:
11+
- packages/css-js-gen/*
712

813
docs:
9-
- changed-files:
10-
- any-glob-to-any-file:
11-
- docs/*
14+
- changed-files:
15+
- any-glob-to-any-file:
16+
- docs/*

.github/renovate.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
{
66
"groupName": "Expressive Code Twoslash Dependencies",
77
"matchManagers": ["npm"],
8-
"matchFileNames": ["package/**"]
8+
"matchFileNames": ["packages/expressive-code-twoslash/**"]
9+
},
10+
{
11+
"groupName": "CSS JS Gen Dependencies",
12+
"matchManagers": ["npm"],
13+
"matchFileNames": ["packages/css-js-gen/**"]
914
},
1015
{
1116
"groupName": "Docs Dependencies",

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
node_modules
22
.npmrc
3+
.tsbuildinfo
4+
build
5+
dist

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"omglookatthis",
4444
"recompiles",
4545
"rehype",
46+
"rgba",
4647
"shiki",
4748
"studiocms",
4849
"twocustom",

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
./package/README.md
1+
./packages/expressive-code-twoslash/README.md

biome.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"files": {
99
"ignoreUnknown": false,
10-
"includes": ["**", "!**/module-code/*"]
10+
"includes": ["**", "!**/module-code/*", "!**/scratchpad/*"]
1111
},
1212
"formatter": {
1313
"enabled": true,
@@ -17,6 +17,7 @@
1717
},
1818
"linter": {
1919
"enabled": true,
20+
"includes": ["**", "!**/module-code/*", "!**/scratchpad/*"],
2021
"rules": {
2122
"recommended": true
2223
}

docs/scripts/changelog.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { toMarkdown } from "mdast-util-to-markdown";
33
import { loadChangelog, semverCategories } from "./lib/changelogs.ts";
44
import { writeFileLines } from "./lib/utils.ts";
55

6-
const changelog = loadChangelog("../package/CHANGELOG.md");
6+
const changelog = loadChangelog("../packages/expressive-code-twoslash/CHANGELOG.md");
77

88
// Generate markdown output
99
const output: string[] = [];
@@ -19,7 +19,7 @@ output.push(
1919
"---",
2020
"",
2121
"This document contains release notes for the `expressive-code-twoslash` package.",
22-
"For more information, see the [CHANGELOG file](https://github.com/withstudiocms/expressive-code-twoslash/blob/main/package/CHANGELOG.md)",
22+
"For more information, see the [CHANGELOG file](https://github.com/withstudiocms/expressive-code-twoslash/blob/main/packages/expressive-code-twoslash/CHANGELOG.md)",
2323
"",
2424
);
2525

0 commit comments

Comments
 (0)