-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmanual.ts
36 lines (31 loc) · 800 Bytes
/
manual.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import minify from "./index.js";
const testWithObject = () => {
console.log("\nTesting with an object to define files.");
minify(
[
"_test/script.js",
"_test/module.js",
"_test/module-crlf.js",
"_test/module.tree-shaking.js",
],
["_test/index.css"],
);
};
const testWithGlob = () => {
console.log("\nTesting with an object to define files.");
minify(
`_test/*.js, !node_modules/, !**/*.min.js`,
`_test/*.css, !node_modules/, !**/*.min.css`,
);
};
const testWithSourceMaps = () => {
console.log("\nTesting with sourcemap generation.");
process.argv.push("--map");
minify(
`_test/*.js, !node_modules/, !**/*.min.js`,
`_test/*.css, !node_modules/, !**/*.min.css`,
);
};
testWithObject();
testWithGlob();
testWithSourceMaps();