mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
25 lines
767 B
JavaScript
25 lines
767 B
JavaScript
// build icon is deprecated
|
|
// it is kept for backward compitability
|
|
// it will be removed in next major version
|
|
// warning info should be added
|
|
// using `vicons` is a recommend way for users to use icons
|
|
|
|
const fs = require('fs-extra')
|
|
const path = require('path')
|
|
|
|
const iconPath = path.resolve(__dirname, '..', 'src', '_deprecated', 'icons')
|
|
|
|
const cjsIconPath = path.resolve(__dirname, '..', 'lib', 'icons')
|
|
const esmIconPath = path.resolve(__dirname, '..', 'es', 'icons')
|
|
|
|
function createDirIfNotExists (...args) {
|
|
if (!fs.existsSync(path.resolve(...args))) {
|
|
fs.mkdirSync(path.resolve(...args))
|
|
}
|
|
}
|
|
|
|
createDirIfNotExists(__dirname, '../lib')
|
|
fs.copySync(iconPath, cjsIconPath)
|
|
createDirIfNotExists(__dirname, '../es')
|
|
fs.copySync(iconPath, esmIconPath)
|