Skip to content

Commit ad2b4ed

Browse files
committed
initial commit
0 parents  commit ad2b4ed

File tree

5 files changed

+167
-0
lines changed

5 files changed

+167
-0
lines changed

.gitignore

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Dependencies
2+
node_modules/
3+
npm-debug.log*
4+
yarn-debug.log*
5+
yarn-error.log*
6+
pnpm-debug.log*
7+
8+
# Build outputs
9+
dist/
10+
build/
11+
lib/
12+
*.tsbuildinfo
13+
14+
# Environment variables
15+
.env
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
# IDE and editor files
22+
.vscode/
23+
.idea/
24+
*.swp
25+
*.swo
26+
*~
27+
28+
# OS generated files
29+
.DS_Store
30+
.DS_Store?
31+
._*
32+
.Spotlight-V100
33+
.Trashes
34+
ehthumbs.db
35+
Thumbs.db
36+
37+
# Logs
38+
logs/
39+
*.log
40+
41+
# Runtime data
42+
pids/
43+
*.pid
44+
*.seed
45+
*.pid.lock
46+
47+
# Coverage directory used by tools like istanbul
48+
coverage/
49+
*.lcov
50+
51+
# nyc test coverage
52+
.nyc_output/
53+
54+
# Dependency directories
55+
jspm_packages/
56+
57+
# Optional npm cache directory
58+
.npm
59+
60+
# Optional eslint cache
61+
.eslintcache
62+
63+
# Microbundle cache
64+
.rpt2_cache/
65+
.rts2_cache_cjs/
66+
.rts2_cache_es/
67+
.rts2_cache_umd/
68+
69+
# Optional REPL history
70+
.node_repl_history
71+
72+
# Output of 'npm pack'
73+
*.tgz
74+
75+
# Yarn Integrity file
76+
.yarn-integrity
77+
78+
# parcel-bundler cache (https://parceljs.org/)
79+
.cache
80+
.parcel-cache
81+
82+
# Next.js build output
83+
.next
84+
85+
# Nuxt.js build / generate output
86+
.nuxt
87+
88+
# Storybook build outputs
89+
.out
90+
.storybook-out
91+
92+
# Temporary folders
93+
tmp/
94+
temp/

package.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "wc-css-transform",
3+
"version": "0.1.0",
4+
"public": true,
5+
"type": "module",
6+
"exports": {
7+
".": "./dist/index.js"
8+
},
9+
"main": "dist/index.js",
10+
"types": "dist/index.d.ts",
11+
"scripts": {
12+
"build": "rollup -c",
13+
"dev": "rollup -c -w",
14+
"clean": "rimraf dist",
15+
"prepare": "pnpm build",
16+
"test": "vitest run",
17+
"test:watch": "vitest"
18+
},
19+
"dependencies": {
20+
"postcss": "8.4.38"
21+
},
22+
"devDependencies": {
23+
"@types/node": "20.12.12",
24+
"rimraf": "5.0.5",
25+
"rollup": "4.21.1",
26+
"@rollup/plugin-node-resolve": "15.2.3",
27+
"@rollup/plugin-commonjs": "25.0.7",
28+
"@rollup/plugin-typescript": "11.1.6",
29+
"typescript": "5.4.5",
30+
"vitest": "1.6.0"
31+
}
32+
}
33+

rollup.config.mjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import resolve from '@rollup/plugin-node-resolve';
2+
import commonjs from '@rollup/plugin-commonjs';
3+
import typescript from '@rollup/plugin-typescript';
4+
5+
export default /** @type {import('rollup').RollupOptions} */ ({
6+
input: {
7+
index: 'src/index.ts',
8+
},
9+
output: {
10+
dir: 'dist',
11+
format: 'esm',
12+
sourcemap: true,
13+
entryFileNames: '[name].js',
14+
},
15+
plugins: [resolve(), commonjs(), typescript({ tsconfig: './tsconfig.json' })],
16+
external: [/^node:/]
17+
});
18+

src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export { wcCssTransform } from "./lib/wc-css-transform";
2+
3+
import wcCssTransformPlugin from "./lib/postcss-plugin";
4+
5+
export { wcCssTransformPlugin as postcssPlugin };

tsconfig.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2020",
4+
"module": "ESNext",
5+
"moduleResolution": "Bundler",
6+
"esModuleInterop": true,
7+
"forceConsistentCasingInFileNames": true,
8+
"skipLibCheck": true,
9+
"declaration": true,
10+
"outDir": "dist",
11+
"rootDir": "src",
12+
"resolveJsonModule": true,
13+
"strict": true
14+
},
15+
"include": ["src"]
16+
}
17+

0 commit comments

Comments
 (0)