mirror of
https://github.com/penpot/penpot.git
synced 2026-09-24 15:48:28 +08:00
✨ Adjust default svgclean bundle config.
This commit is contained in:
+7
-51012
File diff suppressed because one or more lines are too long
Vendored
+3
-3
@@ -1,8 +1,8 @@
|
||||
const plugins = {
|
||||
prefixIds: true,
|
||||
// prefixIds: true,
|
||||
cleanupAttrs: true,
|
||||
cleanupEnableBackground: true,
|
||||
cleanupIDs: true,
|
||||
// cleanupEnableBackground: true,
|
||||
// cleanupIDs: true,
|
||||
cleanupNumericValues: true,
|
||||
collapseGroups: true,
|
||||
convertColors: true,
|
||||
|
||||
+308
-88
File diff suppressed because it is too large
Load Diff
Vendored
+7
-2
@@ -5,7 +5,11 @@
|
||||
"main": "./src/svgo.js",
|
||||
"scripts": {
|
||||
"test": "set NODE_ENV=test && mocha",
|
||||
"lint": "jshint --show-non-errors ."
|
||||
"lint": "jshint --show-non-errors .",
|
||||
"build": "browserify -r./main.js:svgclean -o bundle.js",
|
||||
"minify": "terser bundle.js -c -m -o bundle.min.js",
|
||||
"dist": "npm run build && npm run minify"
|
||||
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "^4.1.0",
|
||||
@@ -28,7 +32,8 @@
|
||||
"mocha": "^8.2.1",
|
||||
"mocha-istanbul": "^0.3.0",
|
||||
"mock-stdin": "^1.0.0",
|
||||
"should": "~13.2.3"
|
||||
"should": "~13.2.3",
|
||||
"terser": "^5.5.1"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
|
||||
Vendored
+6
-4
@@ -1,8 +1,10 @@
|
||||
const svgclean = require("./src/svgclean");
|
||||
const svgc = require("./main.js");
|
||||
const fs = require("fs");
|
||||
|
||||
fs.readFile("./test.svg", "utf-8", (err, data) => {
|
||||
svgclean.optimize({}, data).then((result) => {
|
||||
console.dir(result);
|
||||
fs.readFile("./test2.svg", "utf-8", (err, data) => {
|
||||
svgc.optimize(data).then((result) => {
|
||||
fs.writeFileSync("./result.svg", result);
|
||||
// console.log(result);
|
||||
// console.log();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user