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

a standalone example that doesn't require Node.js #8

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tylerxue
Copy link

a standalone example that doesn't require Node.js, RequireJs and Browserify and other unnecessary external dependencies.

a standalone example that doesn't require Node.js, RequireJs and Browserify and other unnecessary external dependencies.
@jlin27
Copy link
Contributor

jlin27 commented Jan 29, 2024

Thanks for the PR @tylerxue.

Is this PR proposing changes that update the existing code to be an example that doesn't require Node.js, RequireJs, and Browserify or are you just suggesting that we create such an example?

If it is the second, have you checked out our Next.js Demo App. We have more examples in the 0x-examples repo.

If it is the first, can you please provide details on what code changes were made in this PR?

@tylerxue
Copy link
Author

it's the first case, all changes are in the new folder named 'swap-demo-tutorial-part-tyler' which i think should be renamed if you plan to merge it.

  1. remove qs.stringify by providing a substitute function 'build_query_string'.
  2. include web3 and bignumber directly in the index.html:
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script> <script src='https://cdn.jsdelivr.net/npm/[email protected]/bignumber.min.js'></script>

so now for the app to start up and running, you dont need to install Node.js and build node_modules anymore.
for a new learner, less dependencies, less complexities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants