Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ jobs:
- name: Test
run: npm run test:ci

- name: Build Types
run: npm run build:types

- name: Upload coverage artifact
if: always()
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ lerna-debug.log*

node_modules
dist
dist-types
addon
.adnbn
dist-ssr
Expand Down
3 changes: 1 addition & 2 deletions .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@

npm run typecheck || exit 1
npm run lint || exit 1
#npm run test:ci || exit 1
#npm run build || exit 1
npm run build:types || exit 1
66 changes: 0 additions & 66 deletions .npmignore

This file was deleted.

3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
dist/
build/
.github/workflows/*.yml
.github/workflows/*.yml
CHANGELOG.md
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default tseslint.config(
{
ignores: [
"dist",
"dist-types",
"addon",
".adnbn",
"build",
Expand Down
54 changes: 33 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,43 +27,57 @@
"bugs": {
"url": "https://github.com/addon-stack/addon-ui/issues"
},
"types": "./src/index.ts",
"typesVersions": {
"*": {
".": [
"./src/index.ts"
],
"config": [
"./src/config/index.ts"
],
"plugin": [
"./src/plugin/index.ts"
]
}
},
"types": "./dist-types/index.d.ts",
"exports": {
".": "./src/index.ts",
"./config": "./src/config/index.ts",
"./plugin": "./src/plugin/index.ts",
".": {
"types": "./dist-types/index.d.ts",
"default": "./src/index.ts"
},
"./config": {
"types": "./dist-types/config/index.d.ts",
"default": "./src/config/index.ts"
},
"./plugin": {
"types": "./dist-types/plugin/index.d.ts",
"default": "./src/plugin/index.ts"
},
"./theme": "./src/styles/mixins.scss"
},
"sideEffects": [
"*.css",
"*.scss"
],
"files": [
"src",
"!src/**/*.stories.*",
"!src/**/*.story.*",
"!src/**/*.mdx",
"!src/**/__stories__/**",
"!src/**/*.test.*",
"!src/**/*.spec.*",
"!src/**/__tests__/**",
"!src/**/__mocks__/**",
"dist-types/**/*.d.ts",
"README.md",
"LICENSE.md"
],
"scripts": {
"lint": "eslint .",
"format": "prettier --write .",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"build:storybook": "storybook build",
"test": "jest",
"test:ci": "jest --ci --passWithNoTests --coverage",
"test:related": "jest --bail --passWithNoTests",
"typecheck": "tsc -p tsconfig.json --noEmit",
"build:types": "tsc -p tsconfig.build.json",
"release": "release-it",
"release:preview": "release-it --no-github.release --no-npm.publish --no-git.tag --ci"
"release:preview": "release-it --no-github.release --no-npm.publish --no-git.tag --ci",
"prepublishOnly": "npm run build:types"
},
"dependencies": {
"@types/autosize": "^4.0.3",
"@types/react-highlight-words": "^0.20.0",
"autosize": "^6.0.1",
"classnames": "^2.5.1",
"odometer": "^0.4.8",
Expand All @@ -81,11 +95,9 @@
"@eslint/js": "^9.21.0",
"@rsbuild/plugin-sass": "^1.4.0",
"@storybook/react": "^9.1.3",
"@types/autosize": "^4.0.3",
"@types/node": "^22.13.10",
"@types/react": "^19.0.10",
"@types/react-dom": "^19.0.4",
"@types/react-highlight-words": "^0.20.0",
"adnbn": "^0.4.2",
"depcheck": "^1.4.7",
"eslint": "^9.21.0",
Expand Down
5 changes: 5 additions & 0 deletions src/types/shims/addon-ui-config.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module "addon-ui-config" {
import type {Config} from "../config";
const config: Config;
export default config;
}
17 changes: 17 additions & 0 deletions src/types/vendors/odometer.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
declare module "odometer" {
interface OdometerOptions {
el: Element;
value?: number;
format?: string;
theme?: string;
duration?: number;
}

export default class Odometer {
constructor(options: OdometerOptions);

value: number;

update(newValue: number): void;
}
}
21 changes: 21 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "dist-types",
"composite": false,
"noEmit": false,
"checkJs": false
},
"include": ["src"],
"exclude": [
"**/*.test.ts",
"**/*.test.tsx",
"**/*.stories.*",
"tests",
"dist",
"dist-types"
]
}