@ionify/ionify 0.1.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.
@@ -0,0 +1,123 @@
1
+ interface IonifyResolveConfig {
2
+ baseUrl?: string;
3
+ paths?: Record<string, string[]>;
4
+ alias?: Record<string, string>;
5
+ extensions?: string[];
6
+ }
7
+ interface IonifyServerConfig {
8
+ port?: number;
9
+ host?: string;
10
+ https?: boolean;
11
+ cors?: boolean;
12
+ hmr?: {
13
+ timeout?: number;
14
+ overlay?: boolean;
15
+ };
16
+ watch?: {
17
+ ignored?: string[];
18
+ };
19
+ }
20
+ interface IonifyBuildConfig {
21
+ target?: string;
22
+ outDir?: string;
23
+ sourcemap?: boolean;
24
+ minify?: boolean;
25
+ rollupOptions?: {
26
+ input?: string | string[] | Record<string, string>;
27
+ external?: string[];
28
+ output?: {
29
+ format?: 'es' | 'cjs' | 'umd' | 'iife';
30
+ dir?: string;
31
+ globals?: Record<string, string>;
32
+ };
33
+ };
34
+ }
35
+ interface IonifyCSSConfig {
36
+ modules?: {
37
+ localsConvention?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly';
38
+ generateScopedName?: string | ((name: string, filename: string, css: string) => string);
39
+ };
40
+ preprocessorOptions?: Record<string, any>;
41
+ }
42
+ type IonifyTreeShakeMode = 'safe' | 'aggressive';
43
+ interface IonifyTreeShakeConfig {
44
+ mode?: IonifyTreeShakeMode;
45
+ include?: string[];
46
+ exclude?: string[];
47
+ }
48
+ interface IonifyScopeHoistConfig {
49
+ inlineFunctions?: boolean;
50
+ constantFolding?: boolean;
51
+ combineVariables?: boolean;
52
+ }
53
+ interface IonifyConfig {
54
+ root?: string;
55
+ base?: string;
56
+ mode?: string;
57
+ /** Runtime-resolved minifier selection ('auto' by default). */
58
+ minifier?: 'oxc' | 'swc' | 'auto';
59
+ /**
60
+ * Tree-shaking strategy (defaults to "safe").
61
+ * - boolean toggles the default safe strategy.
62
+ * - string selects built-in modes ("safe" or "aggressive").
63
+ * - object allows fine grained include/exclude overrides.
64
+ */
65
+ treeshake?: boolean | IonifyTreeShakeMode | IonifyTreeShakeConfig;
66
+ /**
67
+ * Scope hoisting optimization toggles.
68
+ * - boolean enables/disables all passes.
69
+ * - object allows granular control of inline/constant folding/variable combining.
70
+ */
71
+ scopeHoist?: boolean | IonifyScopeHoistConfig;
72
+ resolve?: IonifyResolveConfig;
73
+ server?: IonifyServerConfig;
74
+ build?: IonifyBuildConfig;
75
+ css?: IonifyCSSConfig;
76
+ optimizeDeps?: {
77
+ include?: string[];
78
+ exclude?: string[];
79
+ };
80
+ plugins?: any[];
81
+ define?: Record<string, any>;
82
+ }
83
+
84
+ interface BuildChunkAsset {
85
+ source: string;
86
+ fileName: string;
87
+ }
88
+ interface BuildChunkArtifact {
89
+ id: string;
90
+ fileName: string;
91
+ code: string;
92
+ map?: string;
93
+ assets: BuildChunkAsset[];
94
+ code_bytes: number;
95
+ map_bytes: number;
96
+ }
97
+ interface BuildPlanModule {
98
+ id: string;
99
+ hash?: string;
100
+ kind: string;
101
+ deps: string[];
102
+ dynamicDeps: string[];
103
+ }
104
+ interface BuildPlanChunk {
105
+ id: string;
106
+ modules: BuildPlanModule[];
107
+ entry: boolean;
108
+ shared: boolean;
109
+ consumers: string[];
110
+ css: string[];
111
+ assets: string[];
112
+ }
113
+ interface BuildPlan {
114
+ entries: string[];
115
+ chunks: BuildPlanChunk[];
116
+ }
117
+
118
+ declare function defineConfig(config: IonifyConfig): IonifyConfig;
119
+ declare function defineConfig(config: (env: {
120
+ mode: string;
121
+ }) => IonifyConfig | Promise<IonifyConfig>): IonifyConfig | Promise<IonifyConfig>;
122
+
123
+ export { type BuildChunkArtifact, type BuildChunkAsset, type BuildPlan, type BuildPlanChunk, type BuildPlanModule, type IonifyBuildConfig, type IonifyCSSConfig, type IonifyConfig, type IonifyResolveConfig, type IonifyScopeHoistConfig, type IonifyServerConfig, type IonifyTreeShakeConfig, type IonifyTreeShakeMode, defineConfig };
@@ -0,0 +1,123 @@
1
+ interface IonifyResolveConfig {
2
+ baseUrl?: string;
3
+ paths?: Record<string, string[]>;
4
+ alias?: Record<string, string>;
5
+ extensions?: string[];
6
+ }
7
+ interface IonifyServerConfig {
8
+ port?: number;
9
+ host?: string;
10
+ https?: boolean;
11
+ cors?: boolean;
12
+ hmr?: {
13
+ timeout?: number;
14
+ overlay?: boolean;
15
+ };
16
+ watch?: {
17
+ ignored?: string[];
18
+ };
19
+ }
20
+ interface IonifyBuildConfig {
21
+ target?: string;
22
+ outDir?: string;
23
+ sourcemap?: boolean;
24
+ minify?: boolean;
25
+ rollupOptions?: {
26
+ input?: string | string[] | Record<string, string>;
27
+ external?: string[];
28
+ output?: {
29
+ format?: 'es' | 'cjs' | 'umd' | 'iife';
30
+ dir?: string;
31
+ globals?: Record<string, string>;
32
+ };
33
+ };
34
+ }
35
+ interface IonifyCSSConfig {
36
+ modules?: {
37
+ localsConvention?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly';
38
+ generateScopedName?: string | ((name: string, filename: string, css: string) => string);
39
+ };
40
+ preprocessorOptions?: Record<string, any>;
41
+ }
42
+ type IonifyTreeShakeMode = 'safe' | 'aggressive';
43
+ interface IonifyTreeShakeConfig {
44
+ mode?: IonifyTreeShakeMode;
45
+ include?: string[];
46
+ exclude?: string[];
47
+ }
48
+ interface IonifyScopeHoistConfig {
49
+ inlineFunctions?: boolean;
50
+ constantFolding?: boolean;
51
+ combineVariables?: boolean;
52
+ }
53
+ interface IonifyConfig {
54
+ root?: string;
55
+ base?: string;
56
+ mode?: string;
57
+ /** Runtime-resolved minifier selection ('auto' by default). */
58
+ minifier?: 'oxc' | 'swc' | 'auto';
59
+ /**
60
+ * Tree-shaking strategy (defaults to "safe").
61
+ * - boolean toggles the default safe strategy.
62
+ * - string selects built-in modes ("safe" or "aggressive").
63
+ * - object allows fine grained include/exclude overrides.
64
+ */
65
+ treeshake?: boolean | IonifyTreeShakeMode | IonifyTreeShakeConfig;
66
+ /**
67
+ * Scope hoisting optimization toggles.
68
+ * - boolean enables/disables all passes.
69
+ * - object allows granular control of inline/constant folding/variable combining.
70
+ */
71
+ scopeHoist?: boolean | IonifyScopeHoistConfig;
72
+ resolve?: IonifyResolveConfig;
73
+ server?: IonifyServerConfig;
74
+ build?: IonifyBuildConfig;
75
+ css?: IonifyCSSConfig;
76
+ optimizeDeps?: {
77
+ include?: string[];
78
+ exclude?: string[];
79
+ };
80
+ plugins?: any[];
81
+ define?: Record<string, any>;
82
+ }
83
+
84
+ interface BuildChunkAsset {
85
+ source: string;
86
+ fileName: string;
87
+ }
88
+ interface BuildChunkArtifact {
89
+ id: string;
90
+ fileName: string;
91
+ code: string;
92
+ map?: string;
93
+ assets: BuildChunkAsset[];
94
+ code_bytes: number;
95
+ map_bytes: number;
96
+ }
97
+ interface BuildPlanModule {
98
+ id: string;
99
+ hash?: string;
100
+ kind: string;
101
+ deps: string[];
102
+ dynamicDeps: string[];
103
+ }
104
+ interface BuildPlanChunk {
105
+ id: string;
106
+ modules: BuildPlanModule[];
107
+ entry: boolean;
108
+ shared: boolean;
109
+ consumers: string[];
110
+ css: string[];
111
+ assets: string[];
112
+ }
113
+ interface BuildPlan {
114
+ entries: string[];
115
+ chunks: BuildPlanChunk[];
116
+ }
117
+
118
+ declare function defineConfig(config: IonifyConfig): IonifyConfig;
119
+ declare function defineConfig(config: (env: {
120
+ mode: string;
121
+ }) => IonifyConfig | Promise<IonifyConfig>): IonifyConfig | Promise<IonifyConfig>;
122
+
123
+ export { type BuildChunkArtifact, type BuildChunkAsset, type BuildPlan, type BuildPlanChunk, type BuildPlanModule, type IonifyBuildConfig, type IonifyCSSConfig, type IonifyConfig, type IonifyResolveConfig, type IonifyScopeHoistConfig, type IonifyServerConfig, type IonifyTreeShakeConfig, type IonifyTreeShakeMode, defineConfig };
package/dist/index.js ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/types.ts
4
+ function defineConfig(config) {
5
+ if (typeof config === "function") {
6
+ return config({ mode: process.env.NODE_ENV || "development" });
7
+ }
8
+ return config;
9
+ }
10
+ export {
11
+ defineConfig
12
+ };
Binary file
package/package.json ADDED
@@ -0,0 +1,81 @@
1
+ {
2
+ "name": "@ionify/ionify",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "A web infrastructure intelligence engine",
6
+ "bin": {
7
+ "ionify": "./dist/cli/index.js"
8
+ },
9
+ "main": "./dist/index.js",
10
+ "module": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js",
16
+ "require": "./dist/index.cjs"
17
+ },
18
+ "./cli": {
19
+ "types": "./dist/cli/index.d.ts",
20
+ "import": "./dist/cli/index.js",
21
+ "require": "./dist/cli/index.cjs"
22
+ }
23
+ },
24
+ "scripts": {
25
+ "build": "tsup --config tsup.config.ts && cp native/ionify_core.node dist/",
26
+ "prepublishOnly": "pnpm build",
27
+ "test": "vitest run"
28
+ },
29
+ "files": [
30
+ "dist",
31
+ "README.md",
32
+ "LICENSE"
33
+ ],
34
+ "keywords": [
35
+ "build-engine",
36
+ "bundler",
37
+ "rust",
38
+ "vite",
39
+ "rollup",
40
+ "ionify",
41
+ "typescript",
42
+ "javascript"
43
+ ],
44
+ "author": "Khaled Salem",
45
+ "license": "MIT",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "git+https://github.com/ionifyjs/ionify.git"
49
+ },
50
+ "bugs": {
51
+ "url": "https://github.com/ionifyjs/ionify/issues"
52
+ },
53
+ "homepage": "https://ionify.cloud",
54
+ "dependencies": {
55
+ "@swc/core": "^1.7.14",
56
+ "chalk": "^5.6.2",
57
+ "commander": "^12.1.0",
58
+ "es-module-lexer": "^1.5.2",
59
+ "esbuild": "^0.25.11",
60
+ "postcss": "^8.4.47",
61
+ "postcss-load-config": "^4.0.2",
62
+ "postcss-modules": "^4.3.1",
63
+ "react-refresh": "^0.14.2"
64
+ },
65
+ "devDependencies": {
66
+ "@eslint/js": "^9.15.0",
67
+ "@jridgewell/trace-mapping": "^0.3.25",
68
+ "@types/node": "^22.0.0",
69
+ "esbuild-plugin-alias": "^0.2.1",
70
+ "eslint": "^9.14.0",
71
+ "tsconfig-paths": "^4.2.0",
72
+ "tsup": "^8.0.0",
73
+ "tsx": "^4.19.0",
74
+ "typescript": "^5.6.3",
75
+ "typescript-eslint": "^8.12.0",
76
+ "vitest": "^4.0.6"
77
+ },
78
+ "engines": {
79
+ "node": ">=18.0.0"
80
+ }
81
+ }