Skip to content

Commit

Permalink
fix(core): exporting types in package.json help-me-mom#2198
Browse files Browse the repository at this point in the history
  • Loading branch information
satanTime committed Apr 7, 2022
1 parent 7c11924 commit 63d0516
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 6 deletions.
11 changes: 8 additions & 3 deletions libs/ng-mocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,23 @@
},
"homepage": "https://ng-mocks.sudo.eu",
"license": "MIT",
"types": "./index.d.ts",
"types": "./ng-mocks.d.ts",
"main": "./index.js",
"type": "commonjs",
"files": [
"index.js",
"index.js.map",
"index.d.ts",
"lib",
"ng-mocks.d.ts",
"src",
"examples",
"migrations.json"
],
"exports": {
".": {
"types": "./ng-mocks.d.ts",
"default": "./index.js"
}
},
"ng-update": {
"migrations": "./migrations.json"
},
Expand Down
2 changes: 0 additions & 2 deletions libs/ng-mocks/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"downlevelIteration": true,
"declaration": true,
"importHelpers": false,
"outDir": "../../dist/libs/ng-mocks",
"declarationDir": "../../dist/libs/ng-mocks",
"allowSyntheticDefaultImports": true,
"removeComments": false,
"baseUrl": ".",
Expand Down
77 changes: 77 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"release": "export $(cat .env) && semantic-release",
"build": "npm run clean && npm run build:webpack && npm run build:types && cp CHANGELOG.md dist/libs/ng-mocks && cp README.md dist/libs/ng-mocks && cp LICENSE dist/libs/ng-mocks && cp libs/ng-mocks/package.json dist/libs/ng-mocks/package.json && cp libs/ng-mocks/migrations.json dist/libs/ng-mocks/migrations.json && cp -R examples dist/libs/ng-mocks",
"build:webpack": "webpack",
"build:types": "tsc -p ./libs/ng-mocks/tsconfig.json --emitDeclarationOnly",
"build:types": "dts-bundle-generator --no-banner -o ./dist/libs/ng-mocks/ng-mocks.d.ts --project ./libs/ng-mocks/tsconfig.json --no-check --export-referenced-types=false ./libs/ng-mocks/src/index.ts",
"build:all": "npm run lint && npm run build && npm run test",
"build:docs": "cd docs && CI=true npm run build",
"clean": "rm -rf dist test-reports tmp",
Expand Down Expand Up @@ -193,6 +193,7 @@
"core-js": "3.21.1",
"coverage-istanbul-loader": "3.0.5",
"coveralls": "3.1.1",
"dts-bundle-generator": "6.7.0",
"husky": "7.0.4",
"jasmine-core": "4.0.1",
"jasmine-spec-reporter": "7.0.0",
Expand Down

0 comments on commit 63d0516

Please sign in to comment.