@plumeria/core 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/css.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { CreateStyle, ReturnType, CustomHTMLType, CustomProperties, KeyframesDefinition, VarsDefinition } from 'zss-engine';
1
+ import type { CreateStyle, CustomHTMLType, CustomProperties, KeyframesDefinition, ReturnType, VarsDefinition } from 'zss-engine';
2
2
  import { cx } from './cx';
3
3
  declare class css {
4
4
  static create<T extends Record<string, CustomProperties>>(object: CreateStyle<T>): ReturnType<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/core",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "Near Zero-runtime CSS-in-JS for efficient design systems.",
5
5
  "keywords": [
6
6
  "react",
@@ -35,15 +35,10 @@
35
35
  "module": "dist/index.mjs",
36
36
  "types": "dist/index.d.ts",
37
37
  "files": [
38
- "bin",
39
38
  "dist"
40
39
  ],
41
- "bin": {
42
- "css": "./bin/css.mjs"
43
- },
44
40
  "dependencies": {
45
41
  "zss-engine": "^0.2.3",
46
- "@plumeria/compiler": "^0.5.1",
47
42
  "@plumeria/collection": "^0.2.0"
48
43
  },
49
44
  "publishConfig": {
package/readme.md CHANGED
@@ -2,12 +2,21 @@
2
2
 
3
3
  ## Installation
4
4
 
5
- To start using with Plumeria you can install just core packages:
5
+ To start using Plumeria, install the following two packages:
6
6
 
7
7
  ```sh
8
8
  npm install --save @plumeria/core
9
9
  ```
10
10
 
11
+ ### Compiler
12
+
13
+ To compile `@plumeria/core`, for example, to use `npx css`, install
14
+ [`@plumeria/compiler`](https://www.npmjs.com/package/@plumeria/compiler) for static extraction through the build process.
15
+
16
+ ```sh
17
+ npm install --save-dev @plumeria/compiler
18
+ ```
19
+
11
20
  ## API
12
21
 
13
22
  ### css.create()
@@ -135,7 +144,7 @@ css.colors.darken('skyblue', '12%');
135
144
 
136
145
  ## Linter
137
146
 
138
- [eslint-plugin-object-css](https://www.npmjs.com/package/eslint-plugin-object-css) can be used with Plumeria.
147
+ [eslint-plugin-object-css](https://www.npmjs.com/package/eslint-plugin-object-css) is a community base library. can be used with Plumeria.
139
148
  Type safety relies on this eslint-plugin. It includes 397 properties, excluding deprecated and experimental.
140
149
 
141
150
  ## How Plumeria works
package/bin/css.mjs DELETED
@@ -1,44 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { execSync } from 'child_process';
4
- import path from 'path';
5
- import { styleText } from 'util';
6
- import fs from 'fs';
7
-
8
- const checkMark = styleText('greenBright', '✓');
9
-
10
- try {
11
- const isPnpm = fs.existsSync(path.join(process.cwd(), 'node_modules/.pnpm'));
12
-
13
- const typecheck = process.argv.includes('--type-check');
14
- if (typecheck)
15
- execSync('npx tsc --noEmit --incremental false', {
16
- stdio: 'inherit',
17
- cwd: process.cwd(),
18
- });
19
-
20
- const plumeriaPath = isPnpm ? findPnpmPlumeriaPath() : path.join(process.cwd(), 'node_modules/@plumeria');
21
-
22
- const argv = process.argv.includes('--log') ? ' --log' : '';
23
- execSync('npx tsx compiler/src/index.ts' + argv, {
24
- stdio: 'inherit',
25
- cwd: plumeriaPath,
26
- });
27
-
28
- const completed = typecheck ? 'Type-check completed' : '';
29
- console.log(` ${checkMark} Compiled... ${completed}`);
30
- } catch (error) {
31
- console.error('Compilation failed:', error.message);
32
- process.exit(1);
33
- }
34
-
35
- function findPnpmPlumeriaPath() {
36
- const pnpmPath = path.join(process.cwd(), 'node_modules/.pnpm');
37
- const plumeriaDir = fs.readdirSync(pnpmPath).find(dir => dir.startsWith('@plumeria+core@'));
38
-
39
- if (!plumeriaDir) {
40
- throw new Error('Could not find @plumeria package in pnpm directory');
41
- }
42
-
43
- return path.join(pnpmPath, plumeriaDir, 'node_modules/@plumeria');
44
- }