zss-engine 0.2.74 → 0.2.76
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/cjs/index.js +3 -1
- package/dist/cjs/utils/has-webpack-plugin.js +37 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/utils/has-webpack-plugin.js +31 -0
- package/{types → dist/types}/index.d.ts +1 -0
- package/dist/types/utils/has-webpack-plugin.d.ts +1 -0
- package/package.json +4 -5
- /package/{types → dist/types}/types/common/css-properties.d.ts +0 -0
- /package/{types → dist/types}/types/common/css-property.d.ts +0 -0
- /package/{types → dist/types}/types/main/create.d.ts +0 -0
- /package/{types → dist/types}/types/main/global.d.ts +0 -0
- /package/{types → dist/types}/types/main/vars.d.ts +0 -0
- /package/{types → dist/types}/utils/build.d.ts +0 -0
- /package/{types → dist/types}/utils/hash.d.ts +0 -0
- /package/{types → dist/types}/utils/helper.d.ts +0 -0
- /package/{types → dist/types}/utils/inject-client-css.d.ts +0 -0
- /package/{types → dist/types}/utils/inject-client-global-css.d.ts +0 -0
- /package/{types → dist/types}/utils/processor-atomic.d.ts +0 -0
- /package/{types → dist/types}/utils/shorthand.d.ts +0 -0
- /package/{types → dist/types}/utils/transpile-atomic.d.ts +0 -0
- /package/{types → dist/types}/utils/transpile.d.ts +0 -0
package/dist/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.injectClientGlobalCSS = exports.injectClientCSS = exports.applyCssValue = exports.camelToKebabCase = exports.build = exports.processAtomicProps = exports.splitAtomicAndNested = exports.transpileAtomic = exports.transpile = exports.genBase36Hash = exports.isTestingDevelopment = exports.isDevelopment = exports.isServer = void 0;
|
|
3
|
+
exports.hasWebpackPlugin = exports.injectClientGlobalCSS = exports.injectClientCSS = exports.applyCssValue = exports.camelToKebabCase = exports.build = exports.processAtomicProps = exports.splitAtomicAndNested = exports.transpileAtomic = exports.transpile = exports.genBase36Hash = exports.isTestingDevelopment = exports.isDevelopment = exports.isServer = void 0;
|
|
4
4
|
var helper_js_1 = require("./utils/helper.js");
|
|
5
5
|
Object.defineProperty(exports, "isServer", { enumerable: true, get: function () { return helper_js_1.isServer; } });
|
|
6
6
|
Object.defineProperty(exports, "isDevelopment", { enumerable: true, get: function () { return helper_js_1.isDevelopment; } });
|
|
@@ -23,3 +23,5 @@ var inject_client_css_js_1 = require("./utils/inject-client-css.js");
|
|
|
23
23
|
Object.defineProperty(exports, "injectClientCSS", { enumerable: true, get: function () { return inject_client_css_js_1.injectClientCSS; } });
|
|
24
24
|
var inject_client_global_css_js_1 = require("./utils/inject-client-global-css.js");
|
|
25
25
|
Object.defineProperty(exports, "injectClientGlobalCSS", { enumerable: true, get: function () { return inject_client_global_css_js_1.injectClientGlobalCSS; } });
|
|
26
|
+
var has_webpack_plugin_1 = require("./utils/has-webpack-plugin");
|
|
27
|
+
Object.defineProperty(exports, "hasWebpackPlugin", { enumerable: true, get: function () { return has_webpack_plugin_1.hasWebpackPlugin; } });
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.hasWebpackPlugin = hasWebpackPlugin;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
function findPnpmPath(arg1, arg2) {
|
|
10
|
+
const pnpmPath = path_1.default.join(process.cwd(), 'node_modules/.pnpm');
|
|
11
|
+
const pnpmDir = fs_1.default.readdirSync(pnpmPath).find(dir => dir.startsWith(arg1));
|
|
12
|
+
if (!pnpmDir) {
|
|
13
|
+
throw new Error(`Could not find ${arg1} package in pnpm directory`);
|
|
14
|
+
}
|
|
15
|
+
return path_1.default.join(pnpmPath, pnpmDir, arg2);
|
|
16
|
+
}
|
|
17
|
+
function hasWebpackPlugin() {
|
|
18
|
+
try {
|
|
19
|
+
const isPnpm = fs_1.default.existsSync(path_1.default.join(process.cwd(), 'node_modules/.pnpm'));
|
|
20
|
+
if (isPnpm) {
|
|
21
|
+
try {
|
|
22
|
+
const webpackPluginPath = findPnpmPath('@plumeria+webpack-plugin@', 'node_modules/@plumeria/webpack-plugin');
|
|
23
|
+
return fs_1.default.existsSync(webpackPluginPath);
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
const webpackPluginPath = path_1.default.join(process.cwd(), 'node_modules/@plumeria/webpack-plugin');
|
|
31
|
+
return fs_1.default.existsSync(webpackPluginPath);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
}
|
package/dist/esm/index.js
CHANGED
|
@@ -7,3 +7,4 @@ export { build } from './utils/build.js';
|
|
|
7
7
|
export { camelToKebabCase, applyCssValue } from './utils/helper.js';
|
|
8
8
|
export { injectClientCSS } from './utils/inject-client-css.js';
|
|
9
9
|
export { injectClientGlobalCSS } from './utils/inject-client-global-css.js';
|
|
10
|
+
export { hasWebpackPlugin } from './utils/has-webpack-plugin';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
function findPnpmPath(arg1, arg2) {
|
|
4
|
+
const pnpmPath = path.join(process.cwd(), 'node_modules/.pnpm');
|
|
5
|
+
const pnpmDir = fs.readdirSync(pnpmPath).find(dir => dir.startsWith(arg1));
|
|
6
|
+
if (!pnpmDir) {
|
|
7
|
+
throw new Error(`Could not find ${arg1} package in pnpm directory`);
|
|
8
|
+
}
|
|
9
|
+
return path.join(pnpmPath, pnpmDir, arg2);
|
|
10
|
+
}
|
|
11
|
+
export function hasWebpackPlugin() {
|
|
12
|
+
try {
|
|
13
|
+
const isPnpm = fs.existsSync(path.join(process.cwd(), 'node_modules/.pnpm'));
|
|
14
|
+
if (isPnpm) {
|
|
15
|
+
try {
|
|
16
|
+
const webpackPluginPath = findPnpmPath('@plumeria+webpack-plugin@', 'node_modules/@plumeria/webpack-plugin');
|
|
17
|
+
return fs.existsSync(webpackPluginPath);
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
const webpackPluginPath = path.join(process.cwd(), 'node_modules/@plumeria/webpack-plugin');
|
|
25
|
+
return fs.existsSync(webpackPluginPath);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -11,3 +11,4 @@ export { build } from './utils/build.js';
|
|
|
11
11
|
export { camelToKebabCase, applyCssValue } from './utils/helper.js';
|
|
12
12
|
export { injectClientCSS } from './utils/inject-client-css.js';
|
|
13
13
|
export { injectClientGlobalCSS } from './utils/inject-client-global-css.js';
|
|
14
|
+
export { hasWebpackPlugin } from './utils/has-webpack-plugin';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function hasWebpackPlugin(): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zss-engine",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.76",
|
|
4
4
|
"description": "Zero-runtime StyleSheet Engine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"zero-runtime",
|
|
@@ -15,17 +15,16 @@
|
|
|
15
15
|
"exports": {
|
|
16
16
|
"./package.json": "./package.json",
|
|
17
17
|
".": {
|
|
18
|
-
"types": "./dist/index.d.ts",
|
|
18
|
+
"types": "./dist/types/index.d.ts",
|
|
19
19
|
"import": "./dist/esm/index.js",
|
|
20
20
|
"default": "./dist/cjs/index.js"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"main": "dist/cjs/index.js",
|
|
24
24
|
"module": "dist/esm/index.js",
|
|
25
|
-
"types": "dist/index.d.ts",
|
|
25
|
+
"types": "dist/types/index.d.ts",
|
|
26
26
|
"files": [
|
|
27
|
-
"dist/"
|
|
28
|
-
"types/"
|
|
27
|
+
"dist/"
|
|
29
28
|
],
|
|
30
29
|
"scripts": {
|
|
31
30
|
"build": "rimraf dist && pnpm esm && pnpm cjs",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|