-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Aisen60/0.2.3
0.2.3
- Loading branch information
Showing
19 changed files
with
151 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// svg 压缩配置文件 | ||
module.exports = { | ||
plugins: [ | ||
{ | ||
name: 'removeAttrs', | ||
params: { | ||
attrs: '(id|class|t|p-id|width|height)' | ||
} | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { runMultiple } from './utils.js'; | ||
|
||
runMultiple(); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { runSingle } from './utils.js'; | ||
|
||
runSingle(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import path from 'path'; | ||
import { spawn } from 'child_process'; | ||
import fs from 'fs-extra'; | ||
|
||
const SVG_OUTPUT = 'src/icons/svg'; | ||
|
||
const SINGLE_DIR = 'src/icons/draft/single'; | ||
|
||
const SINGLE_CONFIG = 'src/icons/build/single-config.cjs'; | ||
|
||
const MULTIPLE_DIR = 'src/icons/draft/multiple'; | ||
|
||
const MULTIPLE_CONFIG = 'src/icons/build/multiple-config.cjs'; | ||
|
||
const clear = (dir) => { | ||
fs.readdir(dir) | ||
.then((files) => { | ||
const deletePromises = files.map((file) => { | ||
if (file === '.gitkeep') return; | ||
return fs.unlink(path.join(dir, file)); | ||
}); | ||
return Promise.all(deletePromises); | ||
}) | ||
.catch((err) => console.error(err)); | ||
}; | ||
|
||
export const runSingle = () => { | ||
const cmd = spawn('npx', [`svgo -f ${SINGLE_DIR} -o ${SVG_OUTPUT} --config=${SINGLE_CONFIG}`], { | ||
stdio: 'inherit', | ||
shell: true | ||
}); | ||
|
||
cmd.on('close', () => { | ||
clear(SINGLE_DIR); | ||
}); | ||
}; | ||
|
||
export const runMultiple = () => { | ||
const cmd = spawn( | ||
'npx', | ||
[`svgo -f ${MULTIPLE_DIR} -o ${SVG_OUTPUT} --config=${MULTIPLE_CONFIG}`], | ||
{ | ||
stdio: 'inherit', | ||
shell: true | ||
} | ||
); | ||
|
||
cmd.on('close', () => { | ||
clear(MULTIPLE_DIR); | ||
}); | ||
}; |
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
import type { ConfigProviderTheme } from 'vant'; | ||
|
||
export type AppTheme = ConfigProviderTheme; | ||
export type AppTheme = 'light' | 'dark' | 'auto'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters