Skip to content

Commit 09dc201

Browse files
committed
Got patterns to compile
1 parent 90d6d72 commit 09dc201

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
"express": "^4.18.2",
123123
"express-http-proxy": "^2.0.0",
124124
"fuse.js": "^7.0.0",
125+
"geologic-patterns": "2.0.0-dev1",
125126
"hex-to-css-filter": "^5.4.0",
126127
"history": "^5.3.0",
127128
"immutability-helper": "^3.1.1",

server/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@ async function startServer() {
8585

8686
app.use(compression());
8787

88+
// Assets and static files
89+
// Serve FGDC assets
90+
const fgdcPatterns = join(
91+
dirname(require.resolve("geologic-patterns")),
92+
"assets"
93+
);
94+
95+
app.use("/assets/geologic-patterns", sirv(fgdcPatterns));
96+
8897
//
8998
if (isProduction) {
9099
app.use(sirv(`${root}/dist/client`));

src/_utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ export function loadableElement(func, props = null) {
1515
}
1616

1717
export function resolvePattern(name: string | number) {
18-
return `//visualization-assets.s3.amazonaws.com/geologic-patterns/svg/${name}.svg`;
18+
return `/assets/geologic-patterns/svg/${name}.svg`;
1919
}

yarn.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4458,6 +4458,7 @@ __metadata:
44584458
express: "npm:^4.18.2"
44594459
express-http-proxy: "npm:^2.0.0"
44604460
fuse.js: "npm:^7.0.0"
4461+
geologic-patterns: "npm:2.0.0-dev1"
44614462
hex-to-css-filter: "npm:^5.4.0"
44624463
history: "npm:^5.3.0"
44634464
http-proxy-middleware: "npm:^3.0.3"

0 commit comments

Comments
 (0)