Skip to content

Commit 48cd967

Browse files
matejchalkBioPhoton
authored andcommitted
feat: configure build and tests to handle ESM and CJS configs
1 parent c3f695f commit 48cd967

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+10794
-4966
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
**/*.mock.*

.eslintrc.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["**/*"],
4+
"plugins": ["@nx"],
5+
"overrides": [
6+
{
7+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
8+
"rules": {
9+
"@nx/enforce-module-boundaries": [
10+
"error",
11+
{
12+
"enforceBuildableLibDependency": true,
13+
"allow": [],
14+
"depConstraints": [
15+
{
16+
"sourceTag": "*",
17+
"onlyDependOnLibsWithTags": ["*"]
18+
}
19+
]
20+
}
21+
]
22+
}
23+
},
24+
{
25+
"files": ["*.ts", "*.tsx"],
26+
"extends": ["plugin:@nx/typescript"],
27+
"rules": {}
28+
},
29+
{
30+
"files": ["*.js", "*.jsx"],
31+
"extends": ["plugin:@nx/javascript"],
32+
"rules": {}
33+
}
34+
]
35+
}

.verdaccio/config.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# path to a directory with all packages
2+
storage: ../tmp/local-registry/storage
3+
4+
# a list of other known repositories we can talk to
5+
uplinks:
6+
npmjs:
7+
url: https://registry.npmjs.org/
8+
maxage: 60m
9+
10+
packages:
11+
'**':
12+
# give all users (including non-authenticated users) full access
13+
# because it is a local registry
14+
access: $all
15+
publish: $all
16+
unpublish: $all
17+
18+
# if package is not available locally, proxy requests to npm registry
19+
proxy: npmjs
20+
21+
# log settings
22+
logs:
23+
type: stdout
24+
format: pretty
25+
level: warn
26+
27+
publish:
28+
allow_offline: true # set offline to true to allow publish offline

.vscode/extensions.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"recommendations": ["nrwl.angular-console", "esbenp.prettier-vscode"]
2+
"recommendations": [
3+
"nrwl.angular-console",
4+
"esbenp.prettier-vscode",
5+
"dbaeumer.vscode-eslint"
6+
]
37
}

nx.json

+16-1
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,26 @@
1313
"build": {
1414
"dependsOn": ["^build"],
1515
"inputs": ["production", "^production"]
16+
},
17+
"lint": {
18+
"inputs": [
19+
"default",
20+
"{workspaceRoot}/.eslintrc.json",
21+
"{workspaceRoot}/.eslintignore"
22+
]
23+
},
24+
"test": {
25+
"inputs": ["default", "^production"]
1626
}
1727
},
1828
"namedInputs": {
1929
"default": ["{projectRoot}/**/*", "sharedGlobals"],
20-
"production": ["default"],
30+
"production": [
31+
"default",
32+
"!{projectRoot}/.eslintrc.json",
33+
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
34+
"!{projectRoot}/tsconfig.spec.json"
35+
],
2136
"sharedGlobals": []
2237
},
2338
"workspaceLayout": {

0 commit comments

Comments
 (0)