Comments (3)
Ah, I needed to run prettier
inside a shell. This works for Trunk.toml
:
[[hooks]]
stage = "post_build"
command = "sh"
command_arguments = ["-c", "prettier --write $TRUNK_STAGING_DIR/index.html"]
from trunk.
As a warning to others, in my experience both of the HTML formatters prettier
and tidy
break the resulting index.html
. When looking at the JavaScript Console in the browser developer tools, there are thousands of websocket failures. I'm not sure why exactly. It would seem that both tools default to making changes that they think are innocuous but are not. I chose not to spend time chasing rabbits down that hole.
from trunk.
Ah, I needed to run
prettier
inside a shell.
Yes, $FOO
is a construct which is evaluated by the shell, passing it as an argument will pass the literal $FOO
to the application. But using bash
like you did solves the issue.
Running trunk serve
will inject some WebSocket code for reloading the application "on change". However, running this only for releases (trunk build --release
) should be fine I guess.
from trunk.
Related Issues (20)
- Cloudflare: WebSocket connection to 'wss://{{trunk_address}}{{trunk_ws_base}}.well-known/trunk/ws' failed HOT 3
- Not able to build properly HOT 9
- Trunk uses wrong the wrong base64 alphabet for `integrity` hashes HOT 7
- Unable to build the latest (0.19.2) version HOT 6
- Changing minification defaults
- Handling absolute paths for webworker scripts HOT 1
- Re-thinking configuration HOT 18
- The initializer scripts should be preloaded before the wasm module HOT 2
- Trunk: command not found2024 HOT 3
- Outdated info about NixOS on webpage HOT 1
- Feature request: preload option for copy-file assets HOT 1
- Initialization order issue with exported WASM functions HOT 1
- Regression (0.19.3 -> 0.20.0): trunk does not initialize wasm unless a rust asset is used HOT 6
- Error spawning hook call for sh HOT 3
- Warn on unknown link attributes HOT 1
- Cannot load JS file from leptos app HOT 2
- help! trunk is not functioning properly HOT 4
- The --no-default-features cli parameter was altered in 0.21.0-alpha.2 HOT 3
- Automatically try the next available port HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trunk.