Skip to content

Commit

Permalink
Merge pull request #64 from webcomponents-preview/bugfix/59-load-pris…
Browse files Browse the repository at this point in the history
…m-grammar
  • Loading branch information
davidenke authored Aug 8, 2023
2 parents a1031a9 + 8b9459d commit 8be4616
Show file tree
Hide file tree
Showing 25 changed files with 4,787 additions and 5,731 deletions.
2 changes: 1 addition & 1 deletion .barrelsby.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"delete": true,
"flat": true,
"include": ["components", "utils"],
"exclude": [".*\\.spec\\.ts$"],
"exclude": [".*\\.test\\.ts$"],
"singleQuotes": true
}
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
cache: "npm"
node-version: 18.15.0
- name: Install dependencies
run: npm ci
run: npm ci && node ./node_modules/puppeteer/install.js
- name: Test
run: npm run test:ci

Expand Down
16 changes: 15 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
/dist
# dependencies
/node_modules

# test results
/reports

# generated
/dist
/src/config.schema.json

# IDEs
.idea/
.vscode/

# os
.DS_Store

# compressed dist files
/*.tgz
4 changes: 4 additions & 0 deletions esbuild.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ const options: BuildOptions = {
src: 'src/assets',
dest: 'dist/assets',
}),
copyPlugin({
src: 'node_modules/prismjs/components',
dest: 'dist/grammars',
}),
],
};

Expand Down
26 changes: 26 additions & 0 deletions globals.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
// Tell Typescript that SASS imports are okay as they're handled by bundler
declare module '*.scss' {
export const styles: string;
Expand Down Expand Up @@ -30,3 +31,28 @@ declare module 'lit-code' {
setCode(code: string): void;
}
}

declare module 'mocha' {
declare global {
type EachFunc = (this: Context, params: Record<string, any>, done: Done) => void;
type EachAsyncFunc = (this: Context, params: Record<string, any>) => PromiseLike<any>;

namespace Mocha {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface TestFunction {
each(
strings: TemplateStringsArray,
...placeholders: any[]
): {
(fn: EachFunc): Test;
(fn: EachAsyncFunc): Test;
(title: string, fn?: EachFunc): Test;
(title: string, fn?: EachAsyncFunc): Test;
};
}
}

// eslint-disable-next-line no-var
declare var it: Mocha.TestFunction;
}
}
1 change: 0 additions & 1 deletion jest-root-path-helper.cjs

This file was deleted.

22 changes: 0 additions & 22 deletions jest.config.ts

This file was deleted.

Loading

0 comments on commit 8be4616

Please sign in to comment.