Skip to content

Commit 8be4616

Browse files
authored
Merge pull request #64 from webcomponents-preview/bugfix/59-load-prism-grammar
2 parents a1031a9 + 8b9459d commit 8be4616

25 files changed

Lines changed: 4787 additions & 5731 deletions

.barrelsby.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"delete": true,
44
"flat": true,
55
"include": ["components", "utils"],
6-
"exclude": [".*\\.spec\\.ts$"],
6+
"exclude": [".*\\.test\\.ts$"],
77
"singleQuotes": true
88
}

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
cache: "npm"
3737
node-version: 18.15.0
3838
- name: Install dependencies
39-
run: npm ci
39+
run: npm ci && node ./node_modules/puppeteer/install.js
4040
- name: Test
4141
run: npm run test:ci
4242

.gitignore

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
1-
/dist
1+
# dependencies
22
/node_modules
3+
4+
# test results
35
/reports
6+
7+
# generated
8+
/dist
49
/src/config.schema.json
10+
11+
# IDEs
12+
.idea/
13+
.vscode/
14+
15+
# os
16+
.DS_Store
17+
18+
# compressed dist files
519
/*.tgz

esbuild.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ const options: BuildOptions = {
9292
src: 'src/assets',
9393
dest: 'dist/assets',
9494
}),
95+
copyPlugin({
96+
src: 'node_modules/prismjs/components',
97+
dest: 'dist/grammars',
98+
}),
9599
],
96100
};
97101

globals.d.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
// Tell Typescript that SASS imports are okay as they're handled by bundler
23
declare module '*.scss' {
34
export const styles: string;
@@ -30,3 +31,28 @@ declare module 'lit-code' {
3031
setCode(code: string): void;
3132
}
3233
}
34+
35+
declare module 'mocha' {
36+
declare global {
37+
type EachFunc = (this: Context, params: Record<string, any>, done: Done) => void;
38+
type EachAsyncFunc = (this: Context, params: Record<string, any>) => PromiseLike<any>;
39+
40+
namespace Mocha {
41+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
42+
interface TestFunction {
43+
each(
44+
strings: TemplateStringsArray,
45+
...placeholders: any[]
46+
): {
47+
(fn: EachFunc): Test;
48+
(fn: EachAsyncFunc): Test;
49+
(title: string, fn?: EachFunc): Test;
50+
(title: string, fn?: EachAsyncFunc): Test;
51+
};
52+
}
53+
}
54+
55+
// eslint-disable-next-line no-var
56+
declare var it: Mocha.TestFunction;
57+
}
58+
}

jest-root-path-helper.cjs

Lines changed: 0 additions & 1 deletion
This file was deleted.

jest.config.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)