Skip to content

Commit

Permalink
Add better exports first pass (still busted)
Browse files Browse the repository at this point in the history
  • Loading branch information
jassmith committed Nov 25, 2023
1 parent 8cae4f2 commit cc41950
Show file tree
Hide file tree
Showing 28 changed files with 492 additions and 398 deletions.
330 changes: 124 additions & 206 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"@typescript-eslint/parser": "^6.4.1",
"@typescript-eslint/typescript-estree": "^5.30.5",
"babel-loader": "^8.1.0",
"clean-css-cli": "^5.6.2",
"esbuild": "^0.19.2",
"eslint": "^8.19.0",
"eslint-plugin-import": "^2.26.0",
Expand Down
45 changes: 0 additions & 45 deletions packages/cells/build.cjs

This file was deleted.

24 changes: 24 additions & 0 deletions packages/cells/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -e

## Delete the dist folder
rm -rf dist

## Get our basic build in place
tsc -p tsconfig.esm.json &
tsc -p tsconfig.cjs.json &
wait

## Now we need to run linaria on the esm build
linaria -r dist/esm/ -m es2015 -o dist/esm/ dist/esm/**/*.js

babel dist/esm --out-dir dist/esm --extensions '.js,.jsx' --source-maps --config-file ../../babel.config.json &
babel dist/cjs --out-dir dist/cjs --extensions '.js,.jsx' --source-maps --config-file ../../babel.config.json &
wait

## Collect all css into a single file
cleancss -o dist/index.css dist/esm/**/*.css

## Delete all css files in the esm folder
find dist/esm -name "*.css" -type f -delete
14 changes: 7 additions & 7 deletions packages/cells/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
"**/*.css"
],
"type": "module",
"browser": "dist/js/index.js",
"browser": "dist/esm/index.js",
"main": "dist/cjs/index.js",
"module": "dist/js/index.js",
"types": "dist/ts/index.d.ts",
"module": "dist/esm/index.js",
"types": "dist/dts/index.d.ts",
"exports": {
".": {
"import": "./dist/js/index.js",
"types": "./dist/dts/index.d.ts",
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js"
},
"./dist/index.css": {
Expand All @@ -24,9 +25,7 @@
"dist"
],
"scripts": {
"build": "npm run build-js && npm run build-types",
"build-js": "node build.cjs && tsc-esm-fix --target='dist/js'",
"build-types": "tsc -p tsconfig.types.json",
"build": "./build.sh",
"lint": "eslint src --ext .ts,.tsx",
"test": "jest"
},
Expand All @@ -52,6 +51,7 @@
],
"dependencies": {
"@glideapps/glide-data-grid": "5.3.1-alpha3",
"@linaria/react": "^4.5.3",
"@toast-ui/editor": "3.1.10",
"@toast-ui/react-editor": "3.1.10",
"react-select": "^5.2.2"
Expand Down
2 changes: 2 additions & 0 deletions packages/cells/test/date-picker-cell.test.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=date-picker-cell.test.d.ts.map
1 change: 1 addition & 0 deletions packages/cells/test/date-picker-cell.test.d.ts.map

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

189 changes: 189 additions & 0 deletions packages/cells/test/date-picker-cell.test.js

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

1 change: 1 addition & 0 deletions packages/cells/test/date-picker-cell.test.js.map

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

2 changes: 2 additions & 0 deletions packages/cells/test/index.test.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=index.test.d.ts.map
1 change: 1 addition & 0 deletions packages/cells/test/index.test.d.ts.map

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

Loading

0 comments on commit cc41950

Please sign in to comment.