mirror of
https://github.com/shoelace-style/shoelace.git
synced 2026-01-12 02:59:13 +00:00
update dependencies, cleanup, refine (#642)
* update dependencies, cleanup, refine fixes #637 * update CI command to verify
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import chalk from 'chalk';
|
||||
import fs from 'fs';
|
||||
import del from 'del';
|
||||
import mkdirp from 'mkdirp';
|
||||
import path from 'path';
|
||||
import pascalCase from 'pascal-case';
|
||||
import { pascalCase } from 'pascal-case';
|
||||
import prettier from 'prettier';
|
||||
import prettierConfig from '../prettier.config.cjs';
|
||||
import { getAllComponents } from './shared.js';
|
||||
@@ -12,7 +11,7 @@ const outdir = path.join('./src/react');
|
||||
|
||||
// Clear build directory
|
||||
del.sync(outdir);
|
||||
mkdirp.sync(outdir);
|
||||
fs.mkdirSync(outdir, { recursive: true });
|
||||
|
||||
// Fetch component metadata
|
||||
const metadata = JSON.parse(fs.readFileSync('./dist/custom-elements.json', 'utf8'));
|
||||
@@ -29,7 +28,7 @@ components.map(component => {
|
||||
const componentFile = path.join(componentDir, 'index.ts');
|
||||
const importPath = component.modulePath.replace(/^src\//, '').replace(/\.ts$/, '');
|
||||
|
||||
mkdirp.sync(componentDir);
|
||||
fs.mkdirSync(componentDir, { recursive: true });
|
||||
|
||||
const events = (component.events || []).map(event => `${`on${pascalCase(event.name)}`}: '${event.name}'`).join(',\n');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user