mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-14 13:58:21 +00:00
Migrate to PNPM (#777)
* add pnpm * make it work * fix comamnds in package.jsons * move some scripts to modules * workflow fixes * test workflow * test #2 * minor fix * update lockflite * create workflows * update workflow * Add copy license command * Fix build * update workflows * update contributions.md * migrate site directory to pnpm * Fix peer dependencies when install * fix types in lucide-angular * fix testing
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
import { optimize } from 'svgo';
|
||||
import { format } from 'prettier';
|
||||
import prettier from 'prettier';
|
||||
import { parseSync, stringify } from 'svgson';
|
||||
import DEFAULT_ATTRS from './default-attrs.json';
|
||||
import DEFAULT_ATTRS from './default-attrs.json' assert { type: 'json' };
|
||||
|
||||
/**
|
||||
* Optimize SVG with `svgo`.
|
||||
@@ -52,7 +52,7 @@ function processSvg(svg) {
|
||||
return (
|
||||
optimizeSvg(svg)
|
||||
.then(setAttrs)
|
||||
.then(optimizedSvg => format(optimizedSvg, { parser: 'babel' }))
|
||||
.then(optimizedSvg => prettier.format(optimizedSvg, { parser: 'babel' }))
|
||||
// remove semicolon inserted by prettier
|
||||
// because prettier thinks it's formatting JSX not HTML
|
||||
.then(svg => svg.replace(/;/g, ''))
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
import { basename } from 'path';
|
||||
import { parseSync } from 'svgson';
|
||||
import { generateHashedKey, readSvg, hasDuplicatedChildren } from '../helpers';
|
||||
import { generateHashedKey, readSvg, hasDuplicatedChildren } from '../helpers.mjs';
|
||||
|
||||
/**
|
||||
* Build an object in the format: `{ <name>: <contents> }`.
|
||||
Reference in New Issue
Block a user