Skip to content

Commit 8ce1f67

Browse files
author
Justin Kimbrell
committed
chore: added husky, commitlint, and changesets
1 parent 2ed21ac commit 8ce1f67

File tree

11 files changed

+1487
-134
lines changed

11 files changed

+1487
-134
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{
6+
"repo": "objectivehtml/FlipClock"
7+
}
8+
],
9+
"commit": false,
10+
"fixed": [],
11+
"linked": [],
12+
"access": "public",
13+
"baseBranch": "main",
14+
"updateInternalDependencies": "patch",
15+
"ignore": []
16+
}

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm exec -- commitlint --edit ${1}

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pnpm exec lint-staged
2+
pnpm test

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
3+
}

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "chrome",
9+
"request": "launch",
10+
"name": "Launch Chrome against localhost",
11+
"url": "http://localhost:5173/",
12+
"webRoot": "${workspaceFolder}"
13+
}
14+
]
15+
}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# flipclock
2+
3+
## 1.0.0
4+
5+
### Patch Changes
6+
7+
- test

commitlint.config.cjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
rules: {
4+
'body-max-line-length': [0]
5+
}
6+
};

docs/why-flipclock.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Why FlipClock.js?
2+
3+
FlipClock.js is a years long passion project that has been re-written many times that started on jQuery, long before TypeScript and adopted thousands of stars on Github. Over the years, the technical debt stacked up and other projects took priority. Next thing I know, years have past and a modern FlockClock.js is long overdue.
4+
5+
It's the old adage, write once to figure out the problem, write twice to solve it. In the case of FlipClock, it took more than two times. I've attempted to rewrite the library several times over the years with several tech stacks. Each time coming back to the project with new ideas, more experience, and simpler ways to express concept ideas in code.
6+
7+
FlipClock.js became my way to explore a singular narrow concept as far as I can, do it the best I possibly can, without any shortcuts, without any runtime dependencies, with great docs, and have fun doing it. I hope you enjoy using FlipClock.js as much as I did writing it.
8+
9+
Sincerely, \
10+
Justin Kimbrell

package.json

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flipclock",
3-
"version": "1.0.0-beta.0",
3+
"version": "1.0.0",
44
"description": "A full featured, themeable, type safe, and well tested library for clocks, timers, counters, and flipboards.",
55
"license": "MIT",
66
"author": "objectivehtml",
@@ -36,13 +36,18 @@
3636
}
3737
},
3838
"typesVersions": {},
39+
"lint-staged": {
40+
"*.{js,jsx,ts,tsx}": [
41+
"eslint --fix"
42+
]
43+
},
3944
"scripts": {
4045
"dev": "vite serve dev",
4146
"build": "vite build",
4247
"prebuild": "pnpm vitest --coverage",
4348
"postbuild": "pnpm tsup && pnpm extract-types && pnpm docs:build",
4449
"tsup": "tsup --dts-only",
45-
"test": "vitetest",
50+
"test": "vitest",
4651
"peg": "npx peggy -o ./src/helpers/parser.js format.peg --dts --format es",
4752
"test:coverage": "vitest --coverage",
4853
"prepublishOnly": "pnpm build",
@@ -54,14 +59,22 @@
5459
"docs:dev": "vitepress dev docs",
5560
"docs:build": "vitepress build docs",
5661
"docs:preview": "vitepress preview docs",
57-
"extract-types": "node bin/extractTypes.ts"
62+
"extract-types": "node bin/extractTypes.ts",
63+
"changeset": "changeset",
64+
"changeset:version": "changeset version",
65+
"changeset:publish": "pnpm build && changeset publish",
66+
"prepare": "husky"
5867
},
5968
"dependencies": {
6069
"date-fns": "^4.1.0",
6170
"goober": "^2.1.16",
6271
"solid-js": "^1.9.9"
6372
},
6473
"devDependencies": {
74+
"@changesets/changelog-github": "^0.5.1",
75+
"@changesets/cli": "^2.29.6",
76+
"@commitlint/cli": "^19.8.1",
77+
"@commitlint/config-conventional": "^19.8.1",
6578
"@types/fs-extra": "^11.0.4",
6679
"@types/markdown-it": "^14.1.2",
6780
"@types/node": "^20.19.11",
@@ -80,7 +93,9 @@
8093
"eslint-plugin-no-only-tests": "^3.3.0",
8194
"fs-extra": "^11.3.1",
8295
"goober": "^2.1.16",
96+
"husky": "^9.1.7",
8397
"jsdom": "^24.1.3",
98+
"lint-staged": "^16.1.5",
8499
"markdown-it": "^14.1.0",
85100
"markdown-it-async": "^2.2.0",
86101
"peggy": "^5.0.6",
@@ -114,4 +129,4 @@
114129
"node": ">=18",
115130
"pnpm": ">=9.0.0"
116131
}
117-
}
132+
}

0 commit comments

Comments
 (0)