The JavaScript implementation of IPFS is available as two packages, ipfs-core and ipfs.
ipfs-core contains the core api and is intended to be used to run an IPFS node as part of your application without the need to start external processes or manage API ports and servers.
ipfs is built on ipfs-core but also includes the CLI, an HTTP RPC API server and other tools to run ipfs as a background process so is a larger install with more dependencies.
If you are writing an application that needs to access the IPFS network, use ipfs-core. If you wish to use js-IPFS in a terminal window or run it as a server for use by multiple otherwise unrelated processes, use ipfs.
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
Fork the IPFS Examples Project (https://github.com/ipfs-examples/js-ipfs-examples)
Create your Feature Branch (git checkout -b feature/amazing-feature)
Commit your Changes (git commit -a -m 'feat: add some amazing feature')
Push to the Branch (git push origin feature/amazing-feature)
This repository serves as template to create new examples to guarantee consistency between examples. It contains all the necessary files to create a new example
This repository serves as template to be used as a reference of how to implement the CI in order to sync the example with a standalone repo (correspondent to each example)
Examples must:
Live inside the /examples/ folder
Have tests and should make use of test-util-ipfs-example library
If possible use playwright as test framework
Implement the following scripts:
clean: used to clean all the unnecessary code (e.g.: files generated by bundlers and package managers)
build: used to build the example
start: used to start the example
test: used to test the example
README must have (see example inside example-template):
Link to Codesandbox.com for one-click running demonstration
References for documentation/tutorials used to build the example
Optional: Screenshots, gifs, etc... under img/ folder
Update the CI to run the tests of the new example as standalone
Edit github/workflows/ci.yml
Add the test name to project under matrix
Extend the test-util-ipfs-example library if needed to reuse code in other examples
Open a PR to the ipfs/js-ipfs project that edits the .github/workflows/test.yml in order to make sure a js-ipfs release does not break your new example.
Search .github/workflows/test.yml for the test-examples section and add a block at the end of the example matrix key similar to:
- name: my super fun new examplerepo: https://github.com/ipfs-examples/js-ipfs-my-super-fun-new-example.gitdeps: ipfs-core@$PWD/packages/ipfs-core/dist,ipfs-http-client@$PWD/packages/ipfs-http-client/dist
The value of the deps key will vary depending on which modules from js-ipfs your example uses. Above we override the ipfs-core and ipfs-http-client modules, but your example may different deps.
Please see the existing setup in .github/workflows/test.yml for how to ensure you are overriding the correct modules.
Want to hack on IPFS?
The IPFS implementation in JavaScript needs your help! There are a few things you can do right now to help out:
Check out existing issues The issue list has many that are marked as 'help wanted' or 'difficulty:easy' which make great starting points for development, many of which can be tackled with no prior IPFS knowledge
Look at the IPFS Roadmap This are the high priority items being worked on right now
Perform code reviews More eyes will help
a. speed the project along
b. ensure quality, and
c. reduce possible future bugs.
请发表评论