Skip to content

Commit dec91ec

Browse files
authored
feat(dom): Plugin scaffold (#122)
1 parent 7609236 commit dec91ec

12 files changed

+589
-11
lines changed

packages/dom/.mocharc.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://json.schemastore.org/mocharc",
3+
"extension": ["ts"],
4+
"recursive": true,
5+
"require": [
6+
"ts-node/register",
7+
"jsdom-global/register"
8+
],
9+
"spec": ["test/**/*.test.*"]
10+
}

packages/dom/.releaserc.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "https://json.schemastore.org/semantic-release",
3+
"branches": ["main"],
4+
"plugins": [
5+
["@semantic-release/commit-analyzer", {
6+
"releaseRules": [{ "scope": "!dom", "release": false }]
7+
}],
8+
"@semantic-release/release-notes-generator",
9+
"semantic-release-yarn",
10+
"@semantic-release/github"
11+
],
12+
"tagFormat": "dom/v${version}"
13+
}

packages/dom/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Stack Builders Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

packages/dom/README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Assertive.ts DOM
2+
3+
An Assertive.ts plugin that provides DOM-specific assertion Matchers.
4+
5+
## Requirements
6+
7+
- **@assertive-ts/core:** >=2.0.0
8+
9+
## Install
10+
11+
```sh
12+
npm install --save-dev @assertive-ts/dom
13+
```
14+
15+
Or:
16+
17+
```sh
18+
yarn add --dev @assertive-ts/dom
19+
```
20+
21+
## API Reference
22+
23+
You can find the full API reference [here](https://stackbuilders.github.io/assertive-ts/docs/dom/build/) 📚
24+
25+
## Usage
26+
27+
// TODO: Add usage documentation and examples...
28+
29+
## License
30+
31+
MIT, see [the LICENSE file](https://github.com/stackbuilders/assertive-ts/blob/main/packages/dom/LICENSE).
32+
33+
## Contributing
34+
35+
Do you want to contribute to this project? Please take a look at our [contributing guidelines](https://github.com/stackbuilders/assertive-ts/blob/main/docs/CONTRIBUTING.md) to know how you can help us build it.
36+
37+
---
38+
39+
<img src="https://www.stackbuilders.com/media/images/Sb-supports.original.png" alt="Stack Builders" width="50%" />
40+
41+
[Check out our libraries](https://github.com/stackbuilders/) | [Join our team](https://www.stackbuilders.com/join-us/)

packages/dom/package.json

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"name": "@assertive-ts/dom",
3+
"version": "0.0.0",
4+
"description": "Assertive.ts plugin for DOM assertions",
5+
"repository": "[email protected]:stackbuilders/assertive-ts.git",
6+
"homepage": "https://stackbuilders.github.io/assertive-ts/",
7+
"author": "Stack Builders <[email protected]>",
8+
"license": "MIT",
9+
"keywords": [
10+
"assertions",
11+
"assertive-ts",
12+
"testing",
13+
"testing-tools",
14+
"type-safety",
15+
"typescript",
16+
"plugin",
17+
"dom",
18+
"web"
19+
],
20+
"main": "./dist/main.js",
21+
"types": "./dist/main.d.ts",
22+
"files": [
23+
"dist/",
24+
"src/"
25+
],
26+
"engines": {
27+
"node": ">=18"
28+
},
29+
"scripts": {
30+
"build": "tsc -p tsconfig.prod.json",
31+
"check": "yarn compile && yarn test --forbid-only",
32+
"compile": "tsc -p tsconfig.json",
33+
"docs": "typedoc",
34+
"release": "semantic-release",
35+
"test": "NODE_ENV=test mocha"
36+
},
37+
"dependencies": {
38+
"fast-deep-equal": "^3.1.3"
39+
},
40+
"devDependencies": {
41+
"@assertive-ts/core": "workspace:^",
42+
"@types/jsdom-global": "^3",
43+
"@types/mocha": "^10.0.6",
44+
"@types/node": "^20.11.19",
45+
"jsdom": "^24.0.0",
46+
"jsdom-global": "^3.0.2",
47+
"mocha": "^10.3.0",
48+
"semantic-release": "^23.0.2",
49+
"semantic-release-yarn": "^3.0.2",
50+
"ts-node": "^10.9.2",
51+
"typedoc": "^0.25.8",
52+
"typedoc-plugin-markdown": "^3.17.1",
53+
"typedoc-plugin-merge-modules": "^5.1.0",
54+
"typescript": "^5.3.3"
55+
},
56+
"peerDependencies": {
57+
"@assertive-ts/core": ">=2.0.0"
58+
},
59+
"peerDependenciesMeta": {
60+
"@assertive-ts/core": {
61+
"optional": false
62+
}
63+
},
64+
"publishConfig": {
65+
"access": "public",
66+
"provenance": true
67+
}
68+
}

packages/dom/src/lib/.gitkeep

Whitespace-only changes.

packages/dom/src/main.ts

Whitespace-only changes.

packages/dom/test/unit/main.test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
describe("[Unit] main.test.ts", () => {
2+
// main tests here...
3+
});

packages/dom/tsconfig.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
"compilerOptions": {
4+
"lib": ["DOM", "DOM.Iterable"],
5+
"outDir": "./build",
6+
"typeRoots": [
7+
"../../node_modules/@types/",
8+
"./typings/"
9+
]
10+
},
11+
"exclude": [
12+
"build/*",
13+
"dist/*"
14+
],
15+
"ts-node": {
16+
"transpileOnly": true
17+
}
18+
}

packages/dom/tsconfig.prod.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"incremental": false,
5+
"outDir": "./dist"
6+
},
7+
"include": [
8+
"src/**/*",
9+
"typings/**/*"
10+
]
11+
}

packages/dom/typedoc.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"$schema": "https://typedoc.org/schema.json",
3+
"cleanOutputDir": true,
4+
"entryPoints": ["src/main.ts"],
5+
"entryPointStrategy": "expand",
6+
"gitRevision": "main",
7+
"githubPages": false,
8+
"hideGenerator": true,
9+
"includeVersion": false,
10+
"intentionallyNotExported": [],
11+
"mergeModulesMergeMode": "project",
12+
"mergeModulesRenameDefaults": true,
13+
"name": "Assertive.ts - DOM API",
14+
"out": "../../docs/dom/build",
15+
"plugin": [
16+
"typedoc-plugin-markdown",
17+
"typedoc-plugin-merge-modules"
18+
],
19+
"readme": "none",
20+
"visibilityFilters": {
21+
"@alpha": false,
22+
"@beta": false,
23+
"external": false,
24+
"inherited": true,
25+
"private": false,
26+
"protected": false
27+
}
28+
}

0 commit comments

Comments
 (0)