diff --git a/package.json b/package.json index e5fe4622..748c30bc 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "check": "turbo check && yarn lint", "build": "turbo run build", "compile": "turbo run compile", - "docs": "yarn workspace @assertive-ts/core docs", + "docs": "yarn workspace @assertive-ts/core docs && yarn workspace @assertive-ts/dom docs", "lint": "eslint .", "release": "turbo release --concurrency=1", "test": "turbo run test" diff --git a/packages/dom/.mocharc.json b/packages/dom/.mocharc.json new file mode 100644 index 00000000..d4af0c92 --- /dev/null +++ b/packages/dom/.mocharc.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json.schemastore.org/mocharc", + "extension": ["ts"], + "recursive": true, + "require": [ + "ts-node/register", + "test/hooks.ts" + ] +} diff --git a/packages/dom/.releaserc.json b/packages/dom/.releaserc.json new file mode 100644 index 00000000..5ed463bb --- /dev/null +++ b/packages/dom/.releaserc.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json.schemastore.org/semantic-release", + "branches": [ + "main" + ], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "semantic-release-yarn", + "@semantic-release/github" + ], + "tagFormat": "dom/v${version}" +} diff --git a/packages/dom/LICENSE b/packages/dom/LICENSE new file mode 100644 index 00000000..33d21f2b --- /dev/null +++ b/packages/dom/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Stack Builders Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/dom/README.md b/packages/dom/README.md new file mode 100644 index 00000000..315fcc74 --- /dev/null +++ b/packages/dom/README.md @@ -0,0 +1,51 @@ +[![CI](https://github.com/stackbuilders/assertive-ts/actions/workflows/ci.yml/badge.svg)](https://github.com/stackbuilders/assertive-ts/actions/workflows/ci.yml) +[![Release](https://github.com/stackbuilders/assertive-ts/actions/workflows/release.yml/badge.svg)](https://github.com/stackbuilders/assertive-ts/actions/workflows/release.yml) +[![Pages](https://github.com/stackbuilders/assertive-ts/actions/workflows/pages.yml/badge.svg)](https://github.com/stackbuilders/assertive-ts/actions/workflows/pages.yml) +[![NPM version](https://img.shields.io/npm/v/@assertive-ts/dom?logo=npm)](https://www.npmjs.com/package/@assertive-ts/dom) +[![NPM bundle size](https://img.shields.io/bundlephobia/min/@assertive-ts/dom)](https://www.npmjs.com/package/@assertive-ts/dom) +[![NPM downloads](https://img.shields.io/npm/dm/@assertive-ts/dom)](https://www.npmjs.com/package/@assertive-ts/dom) +[![NPM license](https://img.shields.io/npm/l/@assertive-ts/dom)](https://github.com/stackbuilders/assertive-ts/blob/main/LICENSE) +[![GitHub Release Date](https://img.shields.io/github/release-date/stackbuilders/assertive-ts)](https://github.com/stackbuilders/assertive-ts/releases) +[![Known Vulnerabilities](https://snyk.io/test/github/stackbuilders/assertive-ts/badge.svg)](https://snyk.io/test/github/stackbuilders/assertive-ts) + +# Assertive.ts DOM + +TODO +The Assertive.ts DOM package contains . +Namely, it provides assertions for . + +## Install + +```sh +npm install --save-dev @assertive-ts/dom +``` + +Or: + +```sh +yarn add --dev @assertive-ts/dom +``` + +## API Reference + +You can find the full API reference [here](https://stackbuilders.github.io/assertive-ts/docs/dom/build/) 📚 + +## Usage + +TODO + +For a list of all [DOM](https://github.com/stackbuilders/assertive-ts/blob/main/packages/dom/README.md) matchers and extended documentation, you can refer to the [DOM API documentation](https://stackbuilders.github.io/assertive-ts/docs/dom/build/). + + +## License + +MIT, see [the LICENSE file](https://github.com/stackbuilders/assertive-ts/blob/main/LICENSE). + +## Contributing + +Do you want to contribute to this project? Please take a look at our [contributing guideline](https://github.com/stackbuilders/assertive-ts/blob/main/docs/CONTRIBUTING.md) to know how you can help us build it. + +--- +Stack Builders + +[Check out our libraries](https://github.com/stackbuilders/) | [Join our team](https://www.stackbuilders.com/join-us/) diff --git a/packages/dom/package.json b/packages/dom/package.json new file mode 100644 index 00000000..9a0364b2 --- /dev/null +++ b/packages/dom/package.json @@ -0,0 +1,56 @@ +{ + "name": "@assertive-ts/dom", + "version": "0.0.0", + "description": "A type-safe fluent assertion library", + "repository": "git@github.com:stackbuilders/assertive-ts.git", + "homepage": "https://stackbuilders.github.io/assertive-ts/", + "author": "Stack Builders ", + "license": "MIT", + "keywords": [ + "assertions", + "testing", + "testing-tools", + "type-safety", + "typescript" + ], + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist/", + "src/" + ], + "engines": { + "node": ">=16" + }, + "scripts": { + "build": "tsc -p tsconfig.prod.json", + "check": "yarn compile && yarn test --forbid-only", + "compile": "tsc -p tsconfig.json", + "docs": "typedoc", + "release": "semantic-release", + "test": "NODE_ENV=test mocha" + }, + "dependencies": { + "@cometlib/dedent": "^0.8.0-es.10", + "fast-deep-equal": "^3.1.3" + }, + "devDependencies": { + "@types/mocha": "^10.0.1", + "@types/node": "^20.4.8", + "@types/sinon": "^10.0.16", + "all-contributors-cli": "^6.26.1", + "mocha": "^10.2.0", + "semantic-release": "^21.0.7", + "semantic-release-yarn": "^2.0.0", + "sinon": "^15.2.0", + "ts-node": "^10.9.1", + "typedoc": "^0.24.8", + "typedoc-plugin-markdown": "^3.15.4", + "typedoc-plugin-merge-modules": "^5.0.1", + "typescript": "^5.1.6" + }, + "publishConfig": { + "access": "public", + "provenance": true + } +} diff --git a/packages/dom/src/index.ts b/packages/dom/src/index.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/dom/tsconfig.json b/packages/dom/tsconfig.json new file mode 100644 index 00000000..05bc1dc0 --- /dev/null +++ b/packages/dom/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "./build", + "typeRoots": [ + "../../node_modules/@types/", + "./typings/" + ] + }, + "exclude": [ + "build/*", + "dist/*" + ], + "ts-node": { + "transpileOnly": true + } +} diff --git a/packages/dom/tsconfig.prod.json b/packages/dom/tsconfig.prod.json new file mode 100644 index 00000000..3473c03e --- /dev/null +++ b/packages/dom/tsconfig.prod.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "incremental": false, + "outDir": "./dist" + }, + "include": [ + "src/**/*", + "typings/**/*" + ] +} diff --git a/packages/dom/typedoc.json b/packages/dom/typedoc.json new file mode 100644 index 00000000..1a509e56 --- /dev/null +++ b/packages/dom/typedoc.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "cleanOutputDir": true, + "entryPoints": ["src/index.ts"], + "entryPointStrategy": "expand", + "gitRevision": "main", + "githubPages": false, + "hideGenerator": true, + "includeVersion": false, + "intentionallyNotExported": ["NoThrow"], + "mergeModulesMergeMode": "project", + "mergeModulesRenameDefaults": true, + "name": "Assertive.ts - DOM API", + "out": "../../docs/dom/build", + "plugin": [ + "typedoc-plugin-markdown", + "typedoc-plugin-merge-modules" + ], + "readme": "none", + "visibilityFilters": { + "@alpha": false, + "@beta": false, + "external": false, + "inherited": true, + "private": false, + "protected": false + } +}