-
Notifications
You must be signed in to change notification settings - Fork 22
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
web container #253
web container #253
Conversation
src/examples.ts
Outdated
@@ -8,7 +8,7 @@ export interface ExampleProject { | |||
|
|||
const example = { | |||
repo: "dfinity/examples", | |||
branch: "master", | |||
branch: "bump-agent-js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a comment here to set this back to the master
branch after it's merged.
src/examples.ts
Outdated
const json = JSON.parse(packageJson); | ||
if (json.scripts) { | ||
Object.entries(json.scripts).forEach(([key, value]) => { | ||
if (typeof value === "string" && value.startsWith("dfx")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems okay for now, and perhaps we can find a more elegant way to do this in the future.
One possibility could be to create a simulated dfx
command which always succeeds and prints an informational message to the console like "Skipped running command: `dfx generate my_canister`".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, that's the first thing I tried. There is a PATH
environment variable, but jsh
doesn't seem to respect it. So we will have to call ./dfx
instead of dfx
. I haven't tried to pass PATH directly in spawn though.
return; | ||
} | ||
const userAgent = navigator.userAgent.toLowerCase(); | ||
// TODO: double check the browsers listed here indeed works |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could use one of these solutions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. It seems window.chrome
is not very robust. Some versions of Edge has that, and some don't. The current solution is probably more reliable.
Co-authored-by: Ryan Vandersmith <[email protected]>
Co-authored-by: Ryan Vandersmith <[email protected]>
* create new canisters on demand; deploy stored wasm * fix * fix * fix * chore: Whitelist frontend canister hash from dfx version 0.24.1 (#265) Co-authored-by: adamspofford-dfinity <[email protected]> * fix * fix * fix cycle after expiration (#266) * fix * fix * fix --------- Co-authored-by: DFINITY bot <[email protected]> Co-authored-by: adamspofford-dfinity <[email protected]>
Workflow:
canister_id.json
and.env
files needed for frontend buildpackage.json
, a selection of non-".mo" file will enable frontend buildnpm install
,npm run build
node upploadAsset.js <asset_canister> <dist_dir>
Known limitations:
npm install
in jsh. Normal deployment is fine. Safari support is only in TP.