Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove gulp and migrate icon build scripts to ui-scripts #1298

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
250 changes: 250 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 2 additions & 17 deletions packages/ui-icons/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,6 @@
*/

const gulp = require('gulp')
const { buildFonts } = require('@instructure/ui-icons-build')

const {
optimizeSVGs,
buildSVGs,
buildFonts,
buildReact,
buildAll,
clean
} = require('@instructure/ui-icons-build')

gulp.task('clean', clean)
gulp.task('optimize', optimizeSVGs)
gulp.task('build:svgs', buildSVGs)
gulp.task('build:fonts', buildFonts)
gulp.task('build:react', buildReact)
gulp.task('build', buildAll)

gulp.task('default', buildAll)
gulp.task('default', buildFonts)
5 changes: 3 additions & 2 deletions packages/ui-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
"bugs": "https://github.com/instructure/instructure-ui/issues",
"scripts": {
"clean": "gulp clean && ui-scripts clean",
"prepare-build": "gulp",
"prepare-build": "npm run build-icons",
"build-icons": "ui-scripts build-icons --svgoConfig svgo.config.js --config icons.config.js && gulp",
"build": "ui-scripts build __build__ --copy-files --modules es,cjs",
"export": "gulp clean && gulp && npm run build:types",
"export": "npm run build-icons && npm run build:types",
"build:types": "tsc -p tsconfig.build.json",
"ts:check": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
},
Expand Down
6 changes: 6 additions & 0 deletions packages/ui-icons/svgo.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ module.exports = {
name: 'convertPathData',
active: false
},
{
name: 'removeAttrs',
params: {
attrs: '(fill)'
}
},
{
// Custom plugin for wrapping multiple path svg-s into a `<g>` tag.
// This is needed because all svg files are supposed to have
Expand Down
4 changes: 3 additions & 1 deletion packages/ui-scripts/lib/commands/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import bundle from '../build/webpack.js'
import clean from '../build/clean.js'
import build from '../build/babel.js'
import generateAllTokens from '../build/generate-all-tokens.js'
import buildIcons from '../icons/build-icons.js'

export const yargCommands = [
bump,
Expand All @@ -47,5 +48,6 @@ export const yargCommands = [
bundle,
clean,
build,
generateAllTokens
generateAllTokens,
buildIcons
]
Loading
Loading