Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item props refresh #155

Merged
merged 15 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion config/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ const buildDir = 'docs'
const build = {
entryPoints: [entry],
bundle: true,
minify: false,
minify: true,
// https://esbuild.github.io/api/#keep-names
// We use code identifiers e.g. in ItemProperties for their names
keepNames: true,
// Splitting
// Entry points (our src/index.jsx) are currently not named with
// cache-busting segments, like index-x84nfi.js, so we should be
Expand Down
26 changes: 13 additions & 13 deletions config/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import esbuild from 'esbuild'
import http from 'http'
import * as common from './common.js'

const port = 8080;
const port = 8080

esbuild.serve({
port: port,
servedir: common.build.outdir
}, common.build).then(result => {
servedir: common.build.outdir,
}, common.build).then((result) => {
// The result tells us where esbuild's local server is
const {host, port} = result

Expand All @@ -21,10 +21,10 @@ esbuild.serve({
}

// Forward each incoming request to esbuild
const proxyReq = http.request(options, proxyRes => {
const proxyReq = http.request(options, (proxyRes) => {
// If esbuild returns "not found", send a custom 404 page
if (proxyRes.statusCode === 404) {
res.writeHead(404, { 'Content-Type': 'text/html' });
res.writeHead(404, {'Content-Type': 'text/html'})
res.end(
`<!DOCTYPE html>
<html>
Expand All @@ -50,20 +50,20 @@ esbuild.serve({
<body>
Resource not found. Redirecting...
</body>
</html>`);
return;
</html>`)
return
}

// Otherwise, forward the response from esbuild to the client
res.writeHead(proxyRes.statusCode, proxyRes.headers);
proxyRes.pipe(res, { end: true });
});
res.writeHead(proxyRes.statusCode, proxyRes.headers)
proxyRes.pipe(res, {end: true})
})

// Forward the body of the request to esbuild
req.pipe(proxyReq, { end: true });
}).listen(port);
req.pipe(proxyReq, {end: true})
}).listen(port)
console.log(`serving on http://localhost:${port} and watching...`)
}).catch((error) => {
console.error(`could not start serving: `, error);
console.error(`could not start serving: `, error)
process.exit(1)
})
13 changes: 1 addition & 12 deletions docs/index.css

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

2 changes: 1 addition & 1 deletion docs/index.css.map

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

2 changes: 1 addition & 1 deletion docs/index.ifc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ DATA;
#106= IFCCARTESIANPOINT((0.,0.,0.));
#108= IFCAXIS2PLACEMENT3D(#106,#104,#102);
#109= IFCLOCALPLACEMENT($,#108);
#112= IFCSITE('10R1ACiMwr1WD776J6P5$v',#28,'Build',$,$,#109,$,$,$,(46,54,0,0),(8,15,0,0),9999.,$,#1);
#112= IFCSITE('10R1ACiMwr1WD776J6P5$v',#28,'Build',$,$,#109,$,$,$,(46,54,0,0),(8,15,0,0),0.,$,#1);
#122= IFCRELAGGREGATES('0Du7$nzQXCktKlPUTLFSAT',#28,$,$,#89,(#112));
#130= IFCDIRECTION((1.,0.,0.));
#132= IFCDIRECTION((0.,0.,1.));
Expand Down