Skip to content

Commit 1ddcca5

Browse files
committed
Commit new version
1 parent faf2600 commit 1ddcca5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+7296
-1384
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/

.eslintrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"root": true,
3+
"env": {
4+
"browser": true,
5+
"es6": true,
6+
"node": true
7+
},
8+
"parser": "@typescript-eslint/parser",
9+
"plugins": ["@typescript-eslint"],
10+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"]
11+
}

.github/workflows/build_test.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build & Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
types: [opened, synchronize]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
env:
13+
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
14+
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
15+
WPT_MANIFEST: ${{ github.workspace }}/wpt/MANIFEST.json
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: '16'
21+
- uses: actions/setup-python@v3
22+
with:
23+
python-version: '3.x'
24+
- uses: actions/checkout@v3
25+
with:
26+
repository: flackr/wpt
27+
path: wpt
28+
ref: 9b1100ffc2421e38a36620e6b205e17e558a113d
29+
30+
- name: Build
31+
run: |
32+
npm install
33+
npm run build
34+
35+
- name: Setup WPT
36+
run: |
37+
cd wpt
38+
pip install virtualenv
39+
./wpt make-hosts-file | sudo tee -a /etc/hosts
40+
- name: Run Tests
41+
run: |
42+
npm run serve &
43+
./wpt/wpt manifest
44+
./wpt/wpt serve --polyfill=http://bs-local.com:9606/dist/src/cqfill.iife.min.js &
45+
npm test

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
cqfill.js
2-
cqfill.min.js
3-
cqfill.iife.min.js
1+
dist
42
node_modules

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/
2+
tests/*.html

.prettierrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"bracketSpacing": false,
3+
"singleQuote": true,
4+
"trailingComma": "es5",
5+
"arrowParens": "avoid"
6+
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ A tiny polyfill for [CSS Container Queries][mdn], weighing about 1.6kB brotli’
77
Ideally, the polyfill is only loaded if the browser doesn’t support Container Queries natively. In a modern setup with a bundler that uses ES modules, the following snippet should work:
88

99
```js
10-
const supportsContainerQueries = "container" in document.documentElement.style;
10+
const supportsContainerQueries = 'container' in document.documentElement.style;
1111
if (!supportsContainerQueries) {
12-
import("container-query-polyfill");
12+
import('container-query-polyfill');
1313
}
1414
```
1515

0 commit comments

Comments
 (0)