Skip to content

Commit 05f2a98

Browse files
committed
Add demo server
1 parent ce85573 commit 05f2a98

File tree

6 files changed

+592
-21
lines changed

6 files changed

+592
-21
lines changed

index.d.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
import type { PluginCreator, AtRule } from 'postcss'
22

3-
declare interface MixinOutput {
4-
[key: string]: string | MixinOutput
5-
}
3+
declare const plugin: PluginCreator<{}>
64

7-
declare interface Mixin {
8-
(mixinAtRule: AtRule, ...args: string[])
9-
}
10-
11-
declare type Mixins = Record<string, MixinOutput | Mixin>
12-
13-
declare const mixins: PluginCreator<{
14-
mixins?: Mixins
15-
mixinsDir?: string | string[]
16-
mixinsFiles?: string | string[]
17-
silent?: boolean
18-
}>
19-
20-
export = mixins
5+
export = plugin

index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ function findMatchingParen(str, startIndex) {
4848
return -1
4949
}
5050

51-
module.exports = () => {
51+
let plugin = () => {
52+
console.log(1)
5253
return {
5354
Declaration(decl) {
5455
if (decl.value.includes('--smooth-shadow(')) {
@@ -91,4 +92,6 @@ module.exports = () => {
9192
postcssPlugin: 'postcss-smooth-shadow'
9293
}
9394
}
94-
module.exports.postcss = true
95+
plugin.postcss = true
96+
97+
export default plugin

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "postcss-smooth-shadow",
33
"version": "0.0.0",
44
"description": "PostCSS plugin to generate more realistic shadows",
5+
"type": "module",
56
"keywords": [
67
"postcss",
78
"css",
@@ -12,7 +13,8 @@
1213
"scripts": {
1314
"test:coverage": "bnt --coverage 100",
1415
"test:lint": "eslint .",
15-
"test": "pnpm run /^test:/"
16+
"test": "pnpm run /^test:/",
17+
"start": "vite --host 0.0.0.0 test/demo/"
1618
},
1719
"author": "Andrey Sitnik <[email protected]>",
1820
"license": "MIT",
@@ -40,7 +42,8 @@
4042
"clean-publish": "^5.2.2",
4143
"eslint": "^9.37.0",
4244
"multiocular": "^0.8.1",
43-
"postcss": "^8.5.6"
45+
"postcss": "^8.5.6",
46+
"vite": "^7.1.10"
4447
},
4548
"prettier": {
4649
"arrowParens": "avoid",

0 commit comments

Comments
 (0)