@ws-test-realm/devkit 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/ws-pre-commit.js +13 -0
- package/package.json +32 -0
- package/prettier.config.js +29 -0
- package/tsconfig.base.json +29 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Canonical pre-commit hook for ws-admin workspaces.
|
|
3
|
+
// Runs prettier against staged files. Reference from package.json:
|
|
4
|
+
//
|
|
5
|
+
// "husky": { "hooks": { "pre-commit": "ws-pre-commit" } }
|
|
6
|
+
|
|
7
|
+
const { execSync } = require("child_process");
|
|
8
|
+
|
|
9
|
+
try {
|
|
10
|
+
execSync("pretty-quick --staged --verbose", { stdio: "inherit" });
|
|
11
|
+
} catch (e) {
|
|
12
|
+
process.exit(e.status || 1);
|
|
13
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ws-test-realm/devkit",
|
|
3
|
+
"version": "0.3.4",
|
|
4
|
+
"description": "Build-time toolchain BOM + shared dev configs for ws-admin module workspaces. Declares the Angular CLI, builders, ng-packagr, TypeScript, Module Federation plugin, and prettier/husky/pretty-quick as peerDependencies so they install at the workspace top-level (where Angular CLI resolves them). Ships a canonical prettier.config.js, tsconfig.base.json, and ws-pre-commit hook bin so workspaces consume them by reference and stay in sync with the host. Pairs with @wiresphere/shared (runtime BOM + share map). Requires npm 7+ for peerDep auto-install.",
|
|
5
|
+
"license": "Artistic-2.0",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"bin": {
|
|
10
|
+
"ws-pre-commit": "./bin/ws-pre-commit.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"bin",
|
|
14
|
+
"prettier.config.js",
|
|
15
|
+
"tsconfig.base.json"
|
|
16
|
+
],
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": "16.14.2",
|
|
19
|
+
"npm": "9.9.4"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"@angular-architects/module-federation": "^12.5.3",
|
|
23
|
+
"@angular-devkit/build-angular": "12.2.18",
|
|
24
|
+
"@angular/cli": "12.2.18",
|
|
25
|
+
"@angular/compiler-cli": "12.2.17",
|
|
26
|
+
"husky": "^4.2.5",
|
|
27
|
+
"ng-packagr": "12.2.7",
|
|
28
|
+
"prettier": "2.5.1",
|
|
29
|
+
"pretty-quick": "3.0.2",
|
|
30
|
+
"typescript": "~4.3.5"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Canonical prettier config for ws-admin modules + host.
|
|
2
|
+
//
|
|
3
|
+
// Consumers reference this via package.json:
|
|
4
|
+
// "prettier": "@wiresphere/devkit/prettier.config.js"
|
|
5
|
+
//
|
|
6
|
+
// Override locally by switching to a .prettierrc.js that imports and spreads
|
|
7
|
+
// this object. Prefer overriding individual options over forking the whole
|
|
8
|
+
// config — drift is the cost we're trying to avoid.
|
|
9
|
+
|
|
10
|
+
module.exports = {
|
|
11
|
+
tabWidth: 4,
|
|
12
|
+
printWidth: 120,
|
|
13
|
+
useTabs: true,
|
|
14
|
+
semi: true,
|
|
15
|
+
singleQuote: true,
|
|
16
|
+
quoteProps: "as-needed",
|
|
17
|
+
jsxSingleQuote: true,
|
|
18
|
+
bracketSpacing: true,
|
|
19
|
+
jsxBracketSameLine: true,
|
|
20
|
+
arrowParens: "always",
|
|
21
|
+
overrides: [
|
|
22
|
+
{
|
|
23
|
+
files: "*.json",
|
|
24
|
+
options: {
|
|
25
|
+
tabWidth: 20000000,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"compileOnSave": false,
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"forceConsistentCasingInFileNames": true,
|
|
6
|
+
"strict": true,
|
|
7
|
+
"noImplicitReturns": true,
|
|
8
|
+
"noFallthroughCasesInSwitch": true,
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"declaration": false,
|
|
11
|
+
"downlevelIteration": true,
|
|
12
|
+
"experimentalDecorators": true,
|
|
13
|
+
"moduleResolution": "node",
|
|
14
|
+
"importHelpers": true,
|
|
15
|
+
"allowSyntheticDefaultImports": true,
|
|
16
|
+
"target": "es2017",
|
|
17
|
+
"module": "es2020",
|
|
18
|
+
"lib": [
|
|
19
|
+
"es2018",
|
|
20
|
+
"dom"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"angularCompilerOptions": {
|
|
24
|
+
"enableI18nLegacyMessageIdFormat": false,
|
|
25
|
+
"strictInjectionParameters": true,
|
|
26
|
+
"strictInputAccessModifiers": true,
|
|
27
|
+
"strictTemplates": true
|
|
28
|
+
}
|
|
29
|
+
}
|