-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refector(icons): rename icons name add suffix outlined (#250)
* build(father-build): update fatherrc & rename icon * refactor(icons): rename icons add suffix outlined|filled|twotone * fix(storybook): title error * fix(icons): fix some svg problems windows-outlined,star-outlined * refactor(icon): set svg default size to 1em * chore(fatherrc): nothing
- Loading branch information
Showing
167 changed files
with
271 additions
and
131 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,71 @@ | ||
export default { | ||
cjs: 'babel', | ||
const common = { | ||
runtimeHelpers: true, | ||
}; | ||
|
||
const dev = { | ||
entry: ['src/index.ts', 'src/style.ts'], | ||
autoprefixer: { | ||
flexbox: 'no-2009', | ||
}, | ||
esm: 'rollup', | ||
overridesByEntry: { | ||
'src/index.ts': { | ||
esm: { file: 'index' }, | ||
}, | ||
'src/style.ts': { | ||
esm: { file: 'icons' }, | ||
}, | ||
}, | ||
}; | ||
|
||
const esm = { | ||
entry: 'src/index.ts', | ||
esm: { | ||
type: 'babel', | ||
}, | ||
lessInBabelMode: false, | ||
}; | ||
|
||
const cjs = { | ||
entry: 'src/index.ts', | ||
esm: 'babel', | ||
cjs: { | ||
type: 'babel', | ||
}, | ||
lessInBabelMode: false, | ||
}; | ||
|
||
const umd = { | ||
entry: ['src/index.ts', 'src/style.ts'], | ||
autoprefixer: { | ||
flexbox: 'no-2009', | ||
}, | ||
extractCSS: true, | ||
file: 'icons', | ||
lessInBabelMode: true, | ||
runtimeHelpers: true, | ||
umd: { | ||
globals: { | ||
react: 'React', | ||
}, | ||
minFile: true, | ||
sourcemap: true, | ||
}, | ||
overridesByEntry: { | ||
'src/index.ts': { | ||
umd: { name: 'ufs', file: 'index' }, | ||
}, | ||
'src/style.ts': { | ||
umd: { file: 'icons' }, | ||
}, | ||
}, | ||
}; | ||
|
||
const configMap = { | ||
dev, | ||
esm, | ||
cjs, | ||
umd, | ||
}; | ||
|
||
const buildType = process.env.NODE_ENV === 'development' ? 'dev' : process.env.BUILD_TYPE; | ||
|
||
export default { | ||
...common, | ||
...configMap[buildType], | ||
}; |
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
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,22 @@ | ||
#!/usr/bin/env node | ||
|
||
const fs = require('fs-extra'); | ||
const util = require('util'); | ||
const { exec } = require('child_process'); | ||
const path = require('path'); | ||
|
||
const execSync = util.promisify(exec); | ||
const getRelativePath = pathStr => path.join(__dirname, pathStr); | ||
|
||
const build = async () => { | ||
console.info('start build umd...'); | ||
|
||
await execSync('father-build'); | ||
await fs.removeSync(getRelativePath('./dist/icons.js')); | ||
await fs.removeSync(getRelativePath('./dist/icons.min.js')); | ||
await fs.moveSync(getRelativePath('./dist/icons.css'), getRelativePath('./dist/index.css')); | ||
await fs.moveSync(getRelativePath('./dist/icons.min.css'), getRelativePath('./dist/index.min.css')); | ||
await fs.removeSync(getRelativePath('./dist/style.d.ts')) | ||
}; | ||
|
||
build(); |
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
Oops, something went wrong.
769020b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
gio-design-icons – ./
gio-design-icons.vercel.app
gio-design-icons-git-master-growingio.vercel.app
gio-design-icons-growingio.vercel.app