uglify-js-minify-css-allfiles 2.1.0 → 2.1.1
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/minify.d.ts +127 -3
- package/package.json +4 -1
- package/.vscode/settings.json +0 -13
package/minify.d.ts
CHANGED
|
@@ -1,31 +1,135 @@
|
|
|
1
1
|
declare module 'uglify-js-minify-css-allfiles' {
|
|
2
|
+
/**
|
|
3
|
+
* Babel configuration options.
|
|
4
|
+
* These options are passed directly to @babel/preset-env.
|
|
5
|
+
*/
|
|
2
6
|
export interface BabelOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Describes the environments you support/target for your project.
|
|
9
|
+
* Can be a string (e.g., "last 2 versions", "safari >= 7"), an array of strings, or an object of minimum environment versions to support.
|
|
10
|
+
*/
|
|
3
11
|
targets?: string | string[] | { [key: string]: string };
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Enables transformation of ES6 module syntax to another module type.
|
|
15
|
+
* Use false to preserve ES modules.
|
|
16
|
+
*/
|
|
4
17
|
modules?: 'amd' | 'umd' | 'systemjs' | 'commonjs' | 'cjs' | 'auto' | false;
|
|
18
|
+
|
|
19
|
+
/** Enable debug output to see what Babel is doing. */
|
|
5
20
|
debug?: boolean;
|
|
21
|
+
|
|
22
|
+
/** Array of plugins to always include. */
|
|
6
23
|
include?: string[];
|
|
24
|
+
|
|
25
|
+
/** Array of plugins to always exclude/remove. */
|
|
7
26
|
exclude?: string[];
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Configures how Babel handles polyfills.
|
|
30
|
+
* 'usage' adds specific imports for polyfills when they are used in each file.
|
|
31
|
+
* 'entry' imports the full polyfill based on your target environments.
|
|
32
|
+
*/
|
|
8
33
|
useBuiltIns?: 'usage' | 'entry' | false;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Specifies the core-js version used when useBuiltIns is set to 'usage' or 'entry'.
|
|
37
|
+
*/
|
|
9
38
|
corejs?: 2 | 3 | { version: 2 | 3; proposals: boolean };
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Forces Babel to apply all transformations, even if the target environment(s) support them natively.
|
|
42
|
+
*/
|
|
10
43
|
forceAllTransforms?: boolean;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Path to a .browserslistrc file to use instead of targets.
|
|
47
|
+
*/
|
|
11
48
|
configPath?: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Toggles whether or not browserslist config sources are used, which includes searching for any browserslist files or referencing the browserslist key inside package.json.
|
|
52
|
+
*/
|
|
12
53
|
ignoreBrowserslistConfig?: boolean;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Toggles enabling support for builtin/feature proposals that have shipped in browsers.
|
|
57
|
+
*/
|
|
13
58
|
shippedProposals?: boolean;
|
|
14
59
|
}
|
|
15
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Logging configuration options.
|
|
63
|
+
*/
|
|
16
64
|
export interface LogOptions {
|
|
65
|
+
/**
|
|
66
|
+
* Specifies the directory where log files will be stored.
|
|
67
|
+
* @default 'logs'
|
|
68
|
+
*/
|
|
17
69
|
logDir?: string;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Number of days to keep log files before they are deleted.
|
|
73
|
+
* @default 30
|
|
74
|
+
*/
|
|
18
75
|
retentionDays?: number;
|
|
19
|
-
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Sets the minimum level of messages that will be logged.
|
|
79
|
+
* @default 'info'
|
|
80
|
+
*/
|
|
81
|
+
logLevel?: 'error' | 'warn' | 'info' | 'debug';
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Format for dates in log file names and entries.
|
|
85
|
+
* @default 'YYYY-MM-DD'
|
|
86
|
+
*/
|
|
20
87
|
dateFormat?: string;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Time zone used for timestamps in log entries.
|
|
91
|
+
* @default 'UTC'
|
|
92
|
+
*/
|
|
21
93
|
timeZone?: string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Whether to output logs to the console in addition to (or instead of) writing to files.
|
|
97
|
+
* @default true
|
|
98
|
+
*/
|
|
22
99
|
logToConsole?: boolean;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Whether to write logs to files.
|
|
103
|
+
* @default true
|
|
104
|
+
*/
|
|
23
105
|
logToFile?: boolean;
|
|
24
106
|
}
|
|
25
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Configuration options for the minifyAll function.
|
|
110
|
+
*/
|
|
26
111
|
export interface MinifyOptions {
|
|
112
|
+
/**
|
|
113
|
+
* Name of a folder to exclude from the minification process.
|
|
114
|
+
* Useful for skipping already minified files or third-party libraries.
|
|
115
|
+
* @default ''
|
|
116
|
+
*/
|
|
27
117
|
excludeFolder?: string;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Enables Babel transformation of JavaScript files.
|
|
121
|
+
* If true, uses default Babel settings.
|
|
122
|
+
* If an object is provided, it should conform to the BabelOptions interface.
|
|
123
|
+
* @default false
|
|
124
|
+
*/
|
|
28
125
|
useBabel?: boolean | BabelOptions;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Configures logging behavior.
|
|
129
|
+
* If true, uses default logging settings.
|
|
130
|
+
* If an object is provided, it should conform to the LogOptions interface.
|
|
131
|
+
* @default true
|
|
132
|
+
*/
|
|
29
133
|
useLog?: boolean | LogOptions;
|
|
30
134
|
}
|
|
31
135
|
|
|
@@ -33,9 +137,29 @@ declare module 'uglify-js-minify-css-allfiles' {
|
|
|
33
137
|
* Minifies all JavaScript and CSS files in the specified directory and its subdirectories.
|
|
34
138
|
*
|
|
35
139
|
* @param contentPath - The path to the directory containing the files to be minified.
|
|
36
|
-
*
|
|
140
|
+
* This is the root directory from which the function will start searching for files.
|
|
141
|
+
* @param options - Configuration options for the minification process.
|
|
142
|
+
* These options control Babel usage, logging, and allow excluding certain folders.
|
|
37
143
|
* @returns A promise that resolves when all files have been processed.
|
|
38
|
-
* @throws {Error} If there's an issue reading or writing files.
|
|
144
|
+
* @throws {Error} If there's an issue reading or writing files, or if the minification process fails.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```typescript
|
|
148
|
+
* import minifyAll from 'uglify-js-minify-css-allfiles';
|
|
149
|
+
*
|
|
150
|
+
* await minifyAll('./src', {
|
|
151
|
+
* excludeFolder: 'node_modules',
|
|
152
|
+
* useBabel: {
|
|
153
|
+
* targets: '> 0.25%, not dead',
|
|
154
|
+
* useBuiltIns: 'usage',
|
|
155
|
+
* corejs: 3
|
|
156
|
+
* },
|
|
157
|
+
* useLog: {
|
|
158
|
+
* logLevel: 'warn',
|
|
159
|
+
* retentionDays: 7
|
|
160
|
+
* }
|
|
161
|
+
* });
|
|
162
|
+
* ```
|
|
39
163
|
*/
|
|
40
164
|
export default function minifyAll(contentPath: string, options?: MinifyOptions): Promise<void>;
|
|
41
165
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uglify-js-minify-css-allfiles",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "you will be able to minify all files as same file names which is js or css",
|
|
5
5
|
"main": "minify.js",
|
|
6
6
|
"type": "module",
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
"type": "git",
|
|
16
16
|
"url": "git+https://github.com/oinochoe/uglify-js-minify-css-allfiles.git"
|
|
17
17
|
},
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"registry": "https://registry.npmjs.org/"
|
|
20
|
+
},
|
|
18
21
|
"keywords": [
|
|
19
22
|
"ugly-code",
|
|
20
23
|
"uglyCode",
|