Skip to content

Commit

Permalink
feat(sdds-serv): fix typings path
Browse files Browse the repository at this point in the history
  • Loading branch information
TitanKuzmich committed Dec 20, 2024
1 parent ab31ead commit 695283c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/sdds-serv/emotion/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"module": "es/index.js",
"main": "cjs/index.js",
"types": "../types/index.d.ts"
"types": "../index.d.ts"
}
7 changes: 4 additions & 3 deletions packages/sdds-serv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@
"build:styled-components:esm": "BABEL_ENV=esm SC_NAMESPACE=sdds-srvc babel ./src --out-dir ./styled-components/es --extensions .ts,.tsx",
"build:css": "BABEL_ENV=esm SC_NAMESPACE=sdds-srvc rollup -c",
"postbuild:css": "rm -rf src-css",
"postbuild:styled-components": "npm run generate:typings",
"postbuild:emotion": "rm -rf src-emotion && npm run generate:typings",
"generate:typings": "tsc --outDir . --emitDeclarationOnly",
"postbuild:styled-components": "rm -rf src-sc",
"postbuild:emotion": "rm -rf src-emotion",
"remove:typings": "rm -rf components/**/*.d.ts && rm index.d.ts && rm mixins/index.d.ts && rm tokens/index.d.ts",
"generate:typings": "npm run remove:typings && tsc --outDir . --emitDeclarationOnly",
"storybook": "npm run storybook:sc",
"prestorybook:emotion": "npm run prebuild:emotion",
"storybook:emotion": "USE_EMOTION_COMPONENTS=true storybook dev -p ${PORT:-7002} -c .storybook",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdds-serv/scripts/copy-linaria-components.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ touch src-css/index.d.ts
for component in $components; do
cp -R src/components/$component src-css/components/;
grep -E "\<$component\>" src/index.ts >> src-css/index.ts
echo "export * from '../components/$component';" >> css/index.d.ts;
echo "export * from '../components/$component';" >> src-css/index.d.ts;

done;

Expand Down
2 changes: 1 addition & 1 deletion packages/sdds-serv/styled-components/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"module": "es/index.js",
"main": "cjs/index.js",
"types": "../types/index.d.ts"
"types": "../index.d.ts"
}
12 changes: 11 additions & 1 deletion packages/sdds-serv/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"allowJs": false,
"target": "ES5",
"module": "CommonJS",
"lib": ["dom", "dom.iterable", "esnext"],
Expand Down Expand Up @@ -40,5 +41,14 @@
}
},
"include": ["./src"],
"exclude": ["./src/helpers", "./src/**/*.stories.tsx", "./src/**/*.component-test.tsx", "./src/**/*.perftest.tsx"]
"exclude": [
"./src/helpers",
"./src/**/*.stories.tsx",
"./src/**/*.component-test.tsx",
"./src/**/*.perftest.tsx",
"./components",
"./es",
"./styled-components",
"./emotion"
]
}

0 comments on commit 695283c

Please sign in to comment.