Skip to content

Commit

Permalink
Fix exports for TypeScript types
Browse files Browse the repository at this point in the history
Closes #247
  • Loading branch information
nex3 committed Oct 11, 2023
1 parent 79ab091 commit b8ebc50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"license": "MIT",
"exports": {
"import": {
"types": "./dist/lib/index.m.d.ts",
"types": "./dist/types/index.m.d.ts",
"default": "./dist/lib/index.mjs"
},
"types": "./dist/lib/index.d.ts",
"default": "./dist/lib/index.js"
"default": "./dist/types/index.js"
},
"main": "dist/lib/index.js",
"types": "dist/types/index.d.ts",
Expand Down
6 changes: 5 additions & 1 deletion tool/prepare-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ import {getLanguageRepo} from './get-language-repo';
await getLanguageRepo('lib/src/vendor');

console.log('Transpiling TS into dist.');
shell.exec('tsc');
shell.exec('tsc -p tsconfig.build.json');
shell.cp('lib/index.mjs', 'dist/lib/index.mjs');
shell.cp(
'dist/lib/src/vendor/sass/index.d.ts',
'dist/lib/src/vendor/sass/index.m.d.ts'
);

console.log('Copying JS API types to dist.');
shell.cp('-R', 'lib/src/vendor/sass', 'dist/types');
Expand Down

0 comments on commit b8ebc50

Please sign in to comment.