Skip to content

Commit 1da6849

Browse files
committed
init project.
0 parents  commit 1da6849

19 files changed

+444
-0
lines changed

.github/workflows/ci.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
env:
8+
SKIP_PREFLIGHT_CHECK: true
9+
10+
jobs:
11+
build-deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
16+
with:
17+
node-version: 16
18+
registry-url: 'https://registry.npmjs.org'
19+
20+
- run: npm install
21+
- run: npm run build
22+
- run: npm run coverage
23+
24+
- run: cp -rp coverage/lcov-report build/
25+
26+
- name: Create Coverage Badges
27+
uses: jaywcjlove/coverage-badges-cli@main
28+
with:
29+
output: build/badges.svg
30+
31+
- name: Generate Contributors Images
32+
uses: jaywcjlove/github-action-contributors@main
33+
with:
34+
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
35+
output: build/CONTRIBUTORS.svg
36+
avatarSize: 42
37+
38+
- name: Deploy
39+
uses: peaceiris/actions-gh-pages@v3
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
publish_dir: ./build
43+
44+
- name: Create Tag
45+
id: create_tag
46+
uses: jaywcjlove/create-tag-action@main
47+
with:
48+
package-path: ./package.json
49+
50+
- name: Generate Changelog
51+
id: changelog
52+
uses: jaywcjlove/changelog-generator@main
53+
with:
54+
token: ${{ secrets.GITHUB_TOKEN }}
55+
head-ref: ${{steps.create_tag.outputs.version}}
56+
filter-author: (jaywcjlove|小弟调调™|dependabot\[bot\]|Renovate Bot)
57+
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
58+
59+
- name: Create Release
60+
uses: ncipollo/release-action@v1
61+
if: steps.create_tag.outputs.successful
62+
with:
63+
token: ${{ secrets.GITHUB_TOKEN }}
64+
name: ${{ steps.create_tag.outputs.version }}
65+
tag: ${{ steps.create_tag.outputs.version }}
66+
body: |
67+
${{ steps.changelog.outputs.compareurl }}
68+
${{ steps.changelog.outputs.changelog }}

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
build
2+
coverage
3+
node_modules
4+
__snapshots__
5+
npm-debug.log*
6+
package-lock.json
7+
.eslintcache
8+
.DS_Store
9+
.cache
10+
.vscode
11+
12+
*.lerna_backup
13+
*.log
14+
*.bak
15+
*.tem
16+
*.temp
17+
#.swp
18+
*.*~
19+
~*.*

.gitpod.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ports:
2+
- port: 3000
3+
onOpen: open-preview
4+
tasks:
5+
- init: npm install
6+
command: npm run start

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install lint-staged

.kktrc.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import webpack, { Configuration } from 'webpack';
2+
import { LoaderConfOptions } from 'kkt';
3+
import pkg from './package.json';
4+
5+
export default (conf: Configuration, env: 'development' | 'production', options: LoaderConfOptions) => {
6+
// Get the project version.
7+
conf.plugins!.push(
8+
new webpack.DefinePlugin({
9+
VERSION: JSON.stringify(pkg.version),
10+
}),
11+
);
12+
return conf;
13+
};

.prettierignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
**/*.md
2+
**/*.svg
3+
**/*.ejs
4+
**/*.html
5+
package.json
6+
dist
7+
build
8+
website/web/build
9+
lib
10+
coverage
11+
node_modules

.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all",
4+
"printWidth": 130,
5+
"overrides": [
6+
{
7+
"files": ".prettierrc",
8+
"options": { "parser": "json" }
9+
}
10+
]
11+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 uiw
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[`Blur an image`](https://uiwjs.github.io/css-filter)
2+
3+
[![CI](https://github.com/uiwjs/css-filter/actions/workflows/ci.yml/badge.svg)](https://github.com/uiwjs/css-filter/actions/workflows/ci.yml)
4+
[![Coverage Badge](https://uiwjs.github.io/css-filter/badges.svg)](https://uiwjs.github.io/css-filter/lcov-report/)
5+
[![Open in Gitpod](https://shields.io/badge/Open%20in-Gitpod-green?logo=Gitpod)](https://gitpod.io/#https://github.com/uiwjs/css-filter)
6+
7+
The easiest way to create this effect is... to choose a good image and add some [`filter: blur()`](https://developer.mozilla.org/zh-CN/docs/Web/CSS/filter-function/blur).
8+
9+
https://uiwjs.github.io/css-filter
10+
11+
12+
**Contributors**
13+
14+
As always, thanks to our amazing contributors!
15+
16+
<a href="https://github.com/uiwjs/css-filter/graphs/contributors">
17+
<img src="https://uiwjs.github.io/css-filter/CONTRIBUTORS.svg" />
18+
</a>
19+
20+
Made with [contributors](https://github.com/jaywcjlove/github-action-contributors).
21+
22+
**License**
23+
24+
Licensed under the MIT License.

package.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"name": "css-filter",
3+
"homepage": "https://uiwjs.github.io/css-filter",
4+
"version": "1.0.0",
5+
"description": "The easiest way to create this effect is... to choose a good image and add some filter: blur().",
6+
"private": true,
7+
"scripts": {
8+
"prepare": "husky install",
9+
"start": "kkt start",
10+
"build": "kkt build",
11+
"test": "tsbb test --env=jsdom",
12+
"coverage": "tsbb test --env=jsdom --coverage --bail",
13+
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'"
14+
},
15+
"repository": {
16+
"type": "git",
17+
"url": "https://github.com/uiwjs/css-filter.git"
18+
},
19+
"license": "MIT",
20+
"dependencies": {
21+
"@codemirror/lang-css": "^6.2.1",
22+
"@uiw/react-codemirror": "^4.21.18",
23+
"@uiw/react-copy-to-clipboard": "^4.22.0",
24+
"@uiw/react-github-corners": "^1.5.15",
25+
"@wcj/dark-mode": "^1.0.15",
26+
"react": "^18.2.0",
27+
"react-dom": "^18.2.0",
28+
"styled-components": "^6.0.7"
29+
},
30+
"devDependencies": {
31+
"@types/react": "^18.2.13",
32+
"@types/react-dom": "^18.2.6",
33+
"husky": "^8.0.3",
34+
"jest-environment-jsdom": "^29.5.0",
35+
"kkt": "^7.5.2",
36+
"lint-staged": "^14.0.0",
37+
"prettier": "^3.0.1",
38+
"tsbb": "^4.1.12"
39+
},
40+
"lint-staged": {
41+
"*.{js,jsx,tsx,ts,less,md,json}": [
42+
"prettier --write"
43+
]
44+
},
45+
"jest": {
46+
"coverageReporters": [
47+
"lcov",
48+
"json-summary"
49+
],
50+
"testMatch": [
51+
"<rootDir>/src/**/*.test.{ts,tsx}"
52+
],
53+
"collectCoverageFrom": [
54+
"<rootDir>/src/app/*.{tsx,ts}"
55+
],
56+
"transformIgnorePatterns": [
57+
"<rootDir>/node_modules/?!(.*)"
58+
]
59+
},
60+
"browserslist": {
61+
"production": [
62+
">0.2%",
63+
"not dead",
64+
"not op_mini all"
65+
],
66+
"development": [
67+
"last 1 chrome version",
68+
"last 1 firefox version",
69+
"last 1 safari version"
70+
]
71+
}
72+
}

0 commit comments

Comments
 (0)