mirror of
https://github.com/tabler/tabler-icons.git
synced 2026-01-24 20:56:42 +00:00
Update build scripts to use environment variables and improve icon build logging. The after:bump hook in package.json now utilizes pnpm exec turbo build for better performance, while console output for icon building has been commented out for cleaner logs during the build process.
This commit is contained in:
@@ -31,9 +31,9 @@ export const buildJsIcons = ({
|
||||
let index = [];
|
||||
Object.entries(allIcons).forEach(([type, icons]) => {
|
||||
icons.forEach((icon, i) => {
|
||||
process.stdout.write(
|
||||
`Building \`${name}\` ${type} ${i}/${icons.length}: ${icon.name.padEnd(42)}\r`,
|
||||
);
|
||||
// process.stdout.write(
|
||||
// `Building \`${name}\` ${type} ${i}/${icons.length}: ${icon.name.padEnd(42)}\r`,
|
||||
// );
|
||||
|
||||
const children = icon.obj.children
|
||||
.map(({ name, attributes }, i) => {
|
||||
@@ -107,9 +107,9 @@ export const buildIconsList = (name) => {
|
||||
let index = [];
|
||||
Object.entries(allIcons).forEach(([type, icons]) => {
|
||||
icons.forEach((icon, i) => {
|
||||
process.stdout.write(
|
||||
`Building \`${name}\` ${type} ${i}/${icons.length}: ${icon.name.padEnd(42)}\r`,
|
||||
);
|
||||
// process.stdout.write(
|
||||
// `Building \`${name}\` ${type} ${i}/${icons.length}: ${icon.name.padEnd(42)}\r`,
|
||||
// );
|
||||
|
||||
const iconName = `${icon.name}${type !== 'outline' ? `-${type}` : ''}`;
|
||||
|
||||
@@ -131,9 +131,9 @@ export const buildIconsDynamicImport = (name) => {
|
||||
let dynamicImportString = 'export default {';
|
||||
Object.entries(allIcons).forEach(([type, icons]) => {
|
||||
icons.forEach((icon, i) => {
|
||||
process.stdout.write(
|
||||
`Building \`${name}\` ${type} ${i}/${icons.length}: ${icon.name.padEnd(42)}\r`,
|
||||
);
|
||||
// process.stdout.write(
|
||||
// `Building \`${name}\` ${type} ${i}/${icons.length}: ${icon.name.padEnd(42)}\r`,
|
||||
// );
|
||||
|
||||
const iconName = `${icon.name}${type !== 'outline' ? `-${type}` : ''}`,
|
||||
iconNamePascal = `${icon.namePascal}${type !== 'outline' ? toPascalCase(type) : ''}`;
|
||||
|
||||
@@ -572,9 +572,9 @@ export const convertIconsToImages = async (dir, extension, size = 240) => {
|
||||
await asyncForEach(svgFiles, async function (file, i) {
|
||||
const distPath = path.join(dir, `./${type}/${file.name}.${extension}`);
|
||||
|
||||
process.stdout.write(
|
||||
`Building \`icons/${extension}\` ${type} ${i}/${svgFiles.length}: ${file.name.padEnd(42)}\r`,
|
||||
);
|
||||
// process.stdout.write(
|
||||
// `Building \`icons/${extension}\` ${type} ${i}/${svgFiles.length}: ${file.name.padEnd(42)}\r`,
|
||||
// );
|
||||
|
||||
await new Promise((resolve, reject) => {
|
||||
exec(`rsvg-convert -f ${extension} -h ${size} ${file.path} > ${distPath}`, (error) => {
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
},
|
||||
"npm": false,
|
||||
"hooks": {
|
||||
"after:bump": "LATEST_VERSION=${latestVersion} NEW_VERSION=${version} pnpm run build --verbose && pnpm install",
|
||||
"after:bump": "export LATEST_VERSION=${latestVersion} && export NEW_VERSION=${version} && pnpm exec turbo build --concurrency=5 && pnpm install",
|
||||
"after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
|
||||
},
|
||||
"git": {
|
||||
|
||||
Reference in New Issue
Block a user