Skip to content

Commit eac60a9

Browse files
authored
Fixes for app and prettier (#1028)
* fix for app * prettier * fix for app * prettier * update prettierignore * prettier * prettier * fix prism vendoring
1 parent f8dca5d commit eac60a9

File tree

12 files changed

+101
-110
lines changed

12 files changed

+101
-110
lines changed

.prettierignore

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1+
# Files are relative to .prettierignore at the root of this monorepo.
2+
# <https://github.com/prettier/prettier-vscode/issues/1252>
3+
14
*.hbs
25
*.md
3-
!docs/docs/patterns/**/*.md
6+
!packages/webawesome/docs/docs/patterns/**/*.md
47
docs/docs/patterns/blog-news/post-list.md
5-
.cache
8+
**/*/.cache
69
.github
710
cspell.json
8-
dist
9-
docs/search.json
10-
src/components/icon/icons
11-
src/react/index.ts
11+
packages/**/*/dist
12+
packages/**/*/dist-cdn
13+
packages/**/*/docs/search.json
14+
packages/**/*/src/components/icon/icons
15+
packages/**/*/src/react/index.ts
16+
**/*/package.json
17+
**/*/package-lock.json
18+
**/*/tsconfig.json
19+
**/*/tsconfig.prod.json
1220
node_modules
13-
package.json
14-
package-lock.json
15-
tsconfig.json
16-
cdn
17-
_site
18-
docs/assets/scripts/prism-downloaded.js
21+
22+
packages/**/*/_site
23+
packages/webawesome/docs/assets/scripts/prism-downloaded.js

packages/webawesome/custom-elements-manifest.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { customElementVsCodePlugin } from 'custom-element-vs-code-integration';
33
// import { customElementVuejsPlugin } from 'custom-element-vuejs-integration';
44
import { parse } from 'comment-parser';
55
import fs from 'fs';
6+
import * as path from 'node:path';
67
import { pascalCase } from 'pascal-case';
78
import * as url from 'url';
8-
import * as path from "node:path"
99
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
1010

1111
const packageData = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8'));
@@ -186,4 +186,3 @@ export default {
186186
// })
187187
],
188188
};
189-

packages/webawesome/docs/.eleventy.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import * as fs from 'node:fs';
12
import * as path from 'node:path';
2-
import * as fs from "node:fs"
33
import { anchorHeadingsPlugin } from './_utils/anchor-headings.js';
44
import { codeExamplesPlugin } from './_utils/code-examples.js';
55
import { copyCodePlugin } from './_utils/copy-code.js';
@@ -41,7 +41,7 @@ export default async function (eleventyConfig) {
4141
*/
4242
const passThroughExtensions = ['js', 'css', 'png', 'svg', 'jpg', 'mp4'];
4343

44-
const docsDir = path.join(process.env.BASE_DIR || ".", 'docs');
44+
const docsDir = path.join(process.env.BASE_DIR || '.', 'docs');
4545
const passThrough = [...passThroughExtensions.map(ext => path.join(docsDir, '**/*.' + ext))];
4646

4747
/**
@@ -176,9 +176,8 @@ export default async function (eleventyConfig) {
176176
// eleventyConfig.addPlugin(formatCodePlugin());
177177
// }
178178

179-
180-
let assetsDir = path.join(process.env.BASE_DIR || "docs", "assets")
181-
fs.cpSync(assetsDir, path.join(eleventyConfig.directories.output, "assets"), { recursive: true })
179+
let assetsDir = path.join(process.env.BASE_DIR || 'docs', 'assets');
180+
fs.cpSync(assetsDir, path.join(eleventyConfig.directories.output, 'assets'), { recursive: true });
182181

183182
for (let glob of passThrough) {
184183
eleventyConfig.addPassthroughCopy(glob);
@@ -210,7 +209,6 @@ export default async function (eleventyConfig) {
210209
// }
211210
}
212211

213-
214212
export const config = {
215213
markdownTemplateEngine: 'njk',
216214
dir: {
@@ -219,5 +217,4 @@ export const config = {
219217
layouts: '_layouts',
220218
},
221219
templateFormats: ['njk', 'md'],
222-
}
223-
220+
};

packages/webawesome/docs/_data/componentList.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
* @module components Fetches components from custom-elements.json and exposes them in a saner format.
33
*/
44
import { readFileSync } from 'fs';
5-
import { join, dirname, resolve } from 'path';
5+
import { dirname, join, resolve } from 'path';
66
import { fileURLToPath } from 'url';
77

88
const __dirname = dirname(fileURLToPath(import.meta.url));
99
const customElementsJSON = process.env.DIST_DIR
10-
? join(process.env.DIST_DIR, "custom-elements.json")
11-
: resolve(__dirname, '../../dist/custom-elements.json')
10+
? join(process.env.DIST_DIR, 'custom-elements.json')
11+
: resolve(__dirname, '../../dist/custom-elements.json');
1212

1313
const manifest = JSON.parse(readFileSync(customElementsJSON), 'utf-8');
1414

@@ -76,4 +76,3 @@ components.sort((a, b) => {
7676
});
7777

7878
export default components;
79-

packages/webawesome/docs/assets/scripts/prism-downloaded.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/webawesome/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"test:component": "CSR_ONLY=\"true\" web-test-runner -- --watch --group",
5555
"test:contrast": "cd src/styles/color && node contrast.test.js",
5656
"test:watch": "web-test-runner --watch --group default",
57-
"prettier": "prettier --check --log-level=warn --ignore-path=\"../../.prettierignore\".",
57+
"prettier": "prettier --check --log-level=warn --ignore-path=\"../../.prettierignore\" .",
5858
"prettier:fix": "prettier --write --log-level=warn --ignore-path=\"../../.prettierignore\" .",
5959
"spellcheck": "cspell \"**/*.{js,ts,json,html,css,md}\" --no-progress --config=\"../../cspell.json\"",
6060
"verify": "npm run prettier && npm run build && npm run test",

0 commit comments

Comments
 (0)