Skip to content

Commit 2e2cf6b

Browse files
committed
Replace local annotation-ui with @hypothesis/annotation-ui lib
1 parent 3a154bc commit 2e2cf6b

31 files changed

+17
-3016
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
"@babel/preset-env": "^7.1.6",
1414
"@babel/preset-react": "^7.0.0",
1515
"@babel/preset-typescript": "^7.16.7",
16+
"@hypothesis/annotation-ui": "^0.1.1",
1617
"@hypothesis/frontend-build": "^4.0.0",
1718
"@hypothesis/frontend-shared": "^9.4.0",
1819
"@hypothesis/frontend-testing": "^1.7.1",
1920
"@npmcli/arborist": "^9.0.0",
2021
"@octokit/rest": "^22.0.0",
21-
"@rollup/plugin-alias": "^5.1.1",
2222
"@rollup/plugin-babel": "^6.0.0",
2323
"@rollup/plugin-commonjs": "^28.0.0",
2424
"@rollup/plugin-json": "^6.0.0",

rollup.config.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
import alias from '@rollup/plugin-alias';
21
import { babel } from '@rollup/plugin-babel';
32
import commonjs from '@rollup/plugin-commonjs';
43
import { nodeResolve } from '@rollup/plugin-node-resolve';
54
import replace from '@rollup/plugin-replace';
65
import terser from '@rollup/plugin-terser';
76
import virtual from '@rollup/plugin-virtual';
87
import { readFileSync } from 'fs';
9-
import path from 'node:path';
10-
import { fileURLToPath } from 'node:url';
118
import { string } from 'rollup-plugin-string';
129

1310
const isProd = process.env.NODE_ENV === 'production';
@@ -40,13 +37,6 @@ if (isProd) {
4037
);
4138
}
4239

43-
// Absolute path to the annotation-ui directory, to alias the
44-
// `@hypothesis/annotation-ui` import
45-
export const annotationUiPath = path.resolve(
46-
path.dirname(fileURLToPath(import.meta.url)),
47-
'src/annotation-ui',
48-
);
49-
5040
function bundleConfig({ name, entry, format = 'es' }) {
5141
return {
5242
input: {
@@ -84,14 +74,6 @@ function bundleConfig({ name, entry, format = 'es' }) {
8474
context: 'void(0)',
8575

8676
plugins: [
87-
alias({
88-
entries: [
89-
{
90-
find: '@hypothesis/annotation-ui',
91-
replacement: annotationUiPath,
92-
},
93-
],
94-
}),
9577
replace({
9678
preventAssignment: true,
9779
values: {

src/annotation-ui/StyledText.css

Lines changed: 0 additions & 123 deletions
This file was deleted.

src/annotation-ui/components/AnnotationDocumentInfo.tsx

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/annotation-ui/components/AnnotationGroupInfo.tsx

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/annotation-ui/components/AnnotationTimestamps.tsx

Lines changed: 0 additions & 111 deletions
This file was deleted.

0 commit comments

Comments
 (0)