Skip to content

Commit

Permalink
Try to use npm install instead of directly specifying the path the fi…
Browse files Browse the repository at this point in the history
…les in example.
  • Loading branch information
Senryoku committed Oct 31, 2023
1 parent 814e3d0 commit 31db5dd
Show file tree
Hide file tree
Showing 17 changed files with 81 additions and 12 deletions.
1 change: 1 addition & 0 deletions docs/dist/assets/1MB-c4d2b939.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/dist/assets/512KB-af4b69ed.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/dist/assets/BenchmarksView-f725007c.js

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

1 change: 1 addition & 0 deletions docs/dist/assets/DocumentationView-2c93ffff.js

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

18 changes: 18 additions & 0 deletions docs/dist/assets/LibBenchmark-c0c71255.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions docs/dist/assets/index-a84867ae.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/dist/assets/index-acfa1921.css

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

1 change: 1 addition & 0 deletions docs/dist/assets/rw_large-2123ae92.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/dist/assets/rw_medium-9bc89782.js

Large diffs are not rendered by default.

Binary file added docs/dist/favicon.ico
Binary file not shown.
15 changes: 15 additions & 0 deletions docs/dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/smol-string/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>smol-string</title>
<script type="module" crossorigin src="/smol-string/assets/index-a84867ae.js"></script>
<link rel="stylesheet" href="/smol-string/assets/index-acfa1921.css">
</head>
<body>
<div id="app"></div>

</body>
</html>
28 changes: 20 additions & 8 deletions ts-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,32 @@
"test:safari": "vitest --browser.name=safari --browser.headless --config browser.vitest.config.ts",
"bench": "vitest bench"
},
"main": "./dist/smol-string.js",
"exports": {
".": "./dist/smol-string",
"./packed": "./dist/smol-string-packed",
"./worker": "./dist/smol-string-worker",
"./worker/packed": "./dist/smol-string-worker-packed"
".": {
"types": "./dist/smol-string.d.ts",
"import": "./dist/smol-string.js"
},
"./packed": {
"types": "./dist/smol-string-packed.d.ts",
"import": "./dist/smol-string-packed.js"
},
"./worker": {
"types": "./dist/smol-string-worker.d.ts",
"import": "./dist/smol-string-worker.js"
},
"./worker/packed": {
"types": "./dist/smol-string-worker-packed.d.ts",
"import": "./dist/smol-string-worker-packed.js"
}
},
"devDependencies": {
"@vitest/browser": "^0.34.6",
"typescript": "^5.2.2",
"vite": "^4.4.5",
"vitest": "^0.34.6",
"webdriverio": "^8.20.4"
},
"dependencies": {
"webdriverio": "^8.20.4",
"vite-plugin-dts": "^3.6.2"
}
},
"dependencies": {}
}
2 changes: 1 addition & 1 deletion ts-lib/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineConfig({
/^node:.*/, // don't bundle built-in Node.js modules (use protocol imports!)
],
},
target: "esnext", // transpile as little as possible
target: "esnext",
},
worker: {
format: "es",
Expand Down
6 changes: 6 additions & 0 deletions www/package-lock.json

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

2 changes: 2 additions & 0 deletions www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "benchmark",
"version": "0.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "run-p type-check \"build-only {@}\" --",
Expand All @@ -14,6 +15,7 @@
"dependencies": {
"chart.js": "^4.4.0",
"pinia": "^2.1.7",
"smol-string": "file:../ts-lib",
"vue": "^3.3.4",
"vue-chartjs": "^5.2.0",
"vue-router": "^4.2.5"
Expand Down
4 changes: 2 additions & 2 deletions www/src/components/LibBenchmark.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ ChartJS.defaults.borderColor = '#555'
ChartJS.register(Title, Tooltip, Legend, BarElement, CategoryScale, LinearScale, Colors)
import { compress, decompress } from '../../../ts-lib/dist/smol-string.js'
import { compressPacked, decompressPacked } from '../../../ts-lib/dist/smol-string-packed.js'
import { compress, decompress } from 'smol-string'
import { compressPacked, decompressPacked } from 'smol-string/packed'
// @ts-expect-error
import LZString from '../../lz-string.min.js'
Expand Down
2 changes: 1 addition & 1 deletion www/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
base: 'smol-string',
base: '/smol-string',
build: {
target: 'esnext'
},
Expand Down

0 comments on commit 31db5dd

Please sign in to comment.