finishing touches

pull/684/head
Cory LaViska 2022-02-16 16:02:21 -05:00
rodzic 4a0dbde6b7
commit 033a3a9db9
5 zmienionych plików z 3949 dodań i 4122 usunięć

Wyświetl plik

@ -51,6 +51,7 @@
"ionicons",
"jsDelivr",
"jsfiddle",
"jsonata",
"keydown",
"keyframes",
"labelledby",

Wyświetl plik

@ -8,6 +8,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis
## Next
- Added `web-types.json` to improve the dev experience for WebStorm/PHPStorm users [#328](https://github.com/shoelace-style/shoelace/issues/328)
- Fixed a bug that caused an error when pressing up/down in `<sl-select>`
- Fixed a bug that caused `<sl-details>` to not show when double clicking the summary while open [#662](https://github.com/shoelace-style/shoelace/issues/662)
- Fixed a bug that prevented the first/last menu item from receiving focus when pressing up/down in `<sl-dropdown>`

8058
package-lock.json wygenerowano

Plik diff jest za duży Load Diff

Wyświetl plik

@ -29,7 +29,7 @@ fs.mkdirSync(outdir, { recursive: true });
execSync(`node scripts/make-search.js --outdir "${outdir}"`, { stdio: 'inherit' });
execSync(`node scripts/make-react.js --outdir "${outdir}"`, { stdio: 'inherit' });
execSync(`node scripts/make-vscode-data.js --outdir "${outdir}"`, { stdio: 'inherit' });
execSync(`node scripts/make-webtypes.js --outdir "${outdir}"`, { stdio: 'inherit' });
execSync(`node scripts/make-web-types.js --outdir "${outdir}"`, { stdio: 'inherit' });
execSync(`node scripts/make-themes.js --outdir "${outdir}"`, { stdio: 'inherit' });
execSync(`node scripts/make-icons.js --outdir "${outdir}"`, { stdio: 'inherit' });
if (types) {

Wyświetl plik

@ -1,12 +1,14 @@
//
// This script converts the custom-elements.json to generate web-types.json
// This script generates a web-types.json file from custom-elements.json for use with WebStorm/PHPStorm
//
// Docs: https://github.com/JetBrains/web-types
//
import commandLineArgs from 'command-line-args';
import jsonata from 'jsonata';
import fs from 'fs';
import path from 'path';
const {outdir} = commandLineArgs({name: 'outdir', type: String});
const { outdir } = commandLineArgs({ name: 'outdir', type: String });
const metadata = JSON.parse(fs.readFileSync(path.join(outdir, 'custom-elements.json'), 'utf8'));
const jsonataExprString = `{
@ -60,9 +62,8 @@ const jsonataExprString = `{
}
}`;
// Run the conversion
const expression = jsonata(jsonataExprString)
const expression = jsonata(jsonataExprString);
console.log('Generating web types');
fs.writeFileSync(path.join(outdir, 'web-types.json'), JSON.stringify(expression.evaluate(metadata), null, 2), 'utf8');