chore: scaffold carousel package and tooling
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
# build / tooling
|
||||
node_modules
|
||||
.yarn/*
|
||||
!.yarn/releases
|
||||
dist
|
||||
coverage
|
||||
test-results
|
||||
playwright-report
|
||||
|
||||
# local-only docs
|
||||
docs/
|
||||
logs_llm/
|
||||
|
||||
*.md
|
||||
!README.md
|
||||
@@ -0,0 +1,2 @@
|
||||
@ilia:registry=https://git.allmy.work/api/packages/ilia/npm/
|
||||
//git.allmy.work/api/packages/ilia/npm/:_authToken=${NODE_AUTH_TOKEN}
|
||||
@@ -0,0 +1,5 @@
|
||||
[
|
||||
{ "name": "core", "path": "dist/index.js", "limit": "1 KB" },
|
||||
{ "name": "dots", "path": "dist/dots.js", "limit": "0.6 KB" },
|
||||
{ "name": "autoplay", "path": "dist/autoplay.js", "limit": "0.6 KB" }
|
||||
]
|
||||
@@ -0,0 +1 @@
|
||||
nodeLinker: node-modules
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/2.4.13/schema.json",
|
||||
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
|
||||
"files": { "includes": ["src/**/*", "tests/**/*", "e2e/**/*", "*.ts", "*.json"] },
|
||||
"formatter": { "enabled": true, "indentStyle": "space", "indentWidth": 2, "lineWidth": 120 },
|
||||
"linter": { "enabled": true, "rules": { "recommended": true } },
|
||||
"javascript": {
|
||||
"formatter": {
|
||||
"quoteStyle": "single",
|
||||
"semicolons": "always",
|
||||
"trailingCommas": "all"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
pre-commit:
|
||||
parallel: true
|
||||
commands:
|
||||
biome-check:
|
||||
glob: "*.{ts,json,css}"
|
||||
run: yarn biome check --write {staged_files}
|
||||
stage_fixed: true
|
||||
typecheck:
|
||||
run: yarn check
|
||||
tests:
|
||||
run: yarn test
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "@ilia/carousel",
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"sideEffects": ["*.css"],
|
||||
"packageManager": "yarn@4.11.0",
|
||||
"publishConfig": {
|
||||
"registry": "https://git.allmy.work/api/packages/ilia/npm/"
|
||||
},
|
||||
"exports": {
|
||||
".": "./dist/index.js",
|
||||
"./dots": "./dist/dots.js",
|
||||
"./autoplay": "./dist/autoplay.js",
|
||||
"./carousel.css": "./src/carousel.css"
|
||||
},
|
||||
"files": ["dist", "src/carousel.css"],
|
||||
"scripts": {
|
||||
"build": "tsup",
|
||||
"check": "tsc --noEmit",
|
||||
"lint": "biome check .",
|
||||
"format": "biome format --write .",
|
||||
"test": "vitest run",
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"test:e2e": "playwright test",
|
||||
"size": "size-limit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2",
|
||||
"@playwright/test": "^1",
|
||||
"@size-limit/preset-small-lib": "^11",
|
||||
"@vitest/coverage-v8": "^2",
|
||||
"jsdom": "^25",
|
||||
"lefthook": "^1",
|
||||
"size-limit": "^11",
|
||||
"tsup": "^8",
|
||||
"typescript": "^5",
|
||||
"vitest": "^2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export {};
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"strict": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": ["src", "tests"]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { defineConfig } from 'tsup';
|
||||
|
||||
export default defineConfig({
|
||||
entry: ['src/index.ts', 'src/dots.ts', 'src/autoplay.ts'],
|
||||
format: 'esm',
|
||||
dts: true,
|
||||
clean: true,
|
||||
// unminified on purpose — consumer bundlers minify. size-limit measures the
|
||||
// minified+gzipped size for budgeting.
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
environment: 'jsdom',
|
||||
include: ['tests/**/*.test.ts'],
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
include: ['src/**/*.ts'],
|
||||
thresholds: { lines: 90, branches: 90, functions: 90, statements: 90 },
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user