Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
chore: move examples to external repo (#3821)
Browse files Browse the repository at this point in the history
- Removes all the examples from this repository
- Change CI to execute the test examples from external repo (https://github.com/ipfs-examples/js-ipfs-examples.git)
- Update `.md` files and add links to point to the new examples org/repos
- Remove scripts related with example tests
  • Loading branch information
oliveriosousa authored Aug 25, 2021
1 parent 4afd24a commit 1806bb2
Show file tree
Hide file tree
Showing 269 changed files with 224 additions and 13,051 deletions.
156 changes: 152 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,159 @@ jobs:
- npm run test:interface:message-port-client -- $RUN_SINCE -- -- --bail -t browser -- --browser firefox

- stage: test
name: examples
name: examples - ipfs browser add readable stream
script:
# Travis lets scripts continue even if previous steps fail so need to use &&: https://github.com/travis-ci/travis-ci/issues/1066
- npm run configure-examples &&
npm run test -- $RUN_SINCE --scope=example* --concurrency=1
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-add-readable-stream.git

- stage: test
name: examples - ipfs browser angular
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-angular.git

- stage: test
name: examples - ipfs browser browserify
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-browserify.git

- stage: test
name: examples - ipfs browser react
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-create-react-app.git

- stage: test
name: examples - ipfs browser exchange files
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-exchange-files.git

- stage: test
name: examples - ipfs browser ipns publish
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-ipns-publish.git

- stage: test
name: examples - ipfs browser mfs
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-mfs.git

- stage: test
name: examples - ipfs browser nextjs
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-nextjs.git

- stage: test
name: examples - ipfs browser parceljs
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-parceljs.git

- stage: test
name: examples - ipfs browser readable stream
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-readablestream.git

- stage: test
name: examples - ipfs browser script tag
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-script-tag.git

- stage: test
name: examples - ipfs browser service worker
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-service-worker.git

- stage: test
name: examples - ipfs browser sharing across tabs
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-sharing-node-across-tabs.git

- stage: test
name: examples - ipfs browser video streaming
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-video-streaming.git

- stage: test
name: examples - ipfs browser vue
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-vue.git

- stage: test
name: examples - ipfs browser webpack
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-browser-webpack.git

- stage: test
name: examples - ipfs circuit relaying
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-circuit-relaying.git

- stage: test
name: examples - ipfs custom ipfs repo
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-custom-ipfs-repo.git

- stage: test
name: examples - ipfs custom ipld formats
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-custom-ipld-formats.git

- stage: test
name: examples - ipfs custom libp2p
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-custom-libp2p.git

- stage: test
name: examples - ipfs-http-client browser pubsub
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-http-client-browser-pubsub.git

- stage: test
name: examples - ipfs-http-client bundle webpack
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-http-client-bundle-webpack.git

- stage: test
name: examples - ipfs-http-client name api
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-http-client-name-api.git

- stage: test
name: examples - ipfs-http-client upload file
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-http-client-upload-file.git

- stage: test
name: examples - ipfs 101
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-101.git

- stage: test
name: examples - ipfs-client add files
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-ipfs-client-add-files.git

- stage: test
name: examples - ipfs electron js
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-ipfs-client-add-files.git

- stage: test
name: examples - ipfs running multiple nodes
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-run-in-electron.git

- stage: test
name: examples - ipfs traverse ipld graphs
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-traverse-ipld-graphs.git

- stage: test
name: examples - types with typescript
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-types-use-ipfs-from-ts.git

- stage: test
name: examples - types with typed js
script:
- npm run test:external -- -- -- https://github.com/ipfs-examples/js-ipfs-types-use-ipfs-from-typed-js.git

- stage: release-rc
# only run on changes to master
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ We've come a long way, but this project is still in Alpha, lots of development i
## Getting started

* Read the [docs](https://github.com/ipfs/js-ipfs/tree/master/docs)
* Look into the [examples](https://github.com/ipfs/js-ipfs/tree/master/examples) to learn how to spawn an IPFS node in Node.js and in the Browser
* Look into the [examples](https://github.com/ipfs-examples/js-ipfs-examples/tree/master) to learn how to spawn an IPFS node in Node.js and in the Browser
* Consult the [Core API docs](https://github.com/ipfs/js-ipfs/tree/master/docs/core-api) to see what you can do with an IPFS node
* Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it
* Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs
Expand Down Expand Up @@ -98,7 +98,7 @@ console.info(cid)
* [Concepts](https://docs.ipfs.io/concepts/)
* [Config](./docs/CONFIG.md)
* [Core API](./docs/core-api)
* [Examples](./examples)
* [Examples](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples)
* [Development](./docs/DEVELOPMENT.md)

## Structure
Expand All @@ -113,7 +113,7 @@ This project is broken into several modules, their purposes are:
* [`/packages/ipfs-core-utils`](./packages/ipfs-core-utils) Helpers and utilities common to core and the HTTP RPC API client
* [`/packages/ipfs-daemon`](./packages/ipfs-daemon) Run js-IPFS as a background daemon
* [`/packages/ipfs-grpc-client`](./packages/ipfs-grpc-client) A gRPC client for js-IPFS
* [`/packages/ipfs-grpc-protocol`](./packages/ipfs-grpc-protocol]) Shared module between the gRPC client and server
* [`/packages/ipfs-grpc-protocol`](./packages/ipfs-grpc-protocol) Shared module between the gRPC client and server
* [`/packages/ipfs-grpc-server`](./packages/ipfs-grpc-server) A gRPC-over-websockets server for js-IPFS
* [`/packages/ipfs-http-client`](./packages/ipfs-http-client) A client for the RPC-over-HTTP API presented by both js-ipfs and go-ipfs
* [`/packages/ipfs-http-gateway`](./packages/ipfs-http-gateway) JS implementation of the [IPFS HTTP Gateway](https://docs.ipfs.io/concepts/ipfs-gateway/)
Expand Down Expand Up @@ -175,7 +175,7 @@ List of the main packages that make up the IPFS ecosystem.

[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)

The IPFS implementation in JavaScript needs your help! There are a few things you can do right now to help out:
The IPFS implementation in JavaScript needs your help! There are a few things you can do right now to help out:

Read the [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md) and [JavaScript Contributing Guidelines](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md).

Expand Down
8 changes: 6 additions & 2 deletions docs/IPLD.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Additional bases can be configured using the `bases` config property.
If your application requires support for extra codecs, you can configure them as follows:

1. Configure the [IPLD layer](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs/docs/MODULE.md#optionsipld) of your IPFS daemon to support the codec. This step is necessary so the node knows how to prepare data received over HTTP to be passed to IPLD for serialization:

```javascript
const ipfs = require('ipfs')

Expand Down Expand Up @@ -83,7 +84,10 @@ If your application requires support for extra codecs, you can configure them as
}
}
})
```

2. Configure your IPFS HTTP API Client to support the codec. This is necessary so that the client can send the data to the IPFS node over HTTP:

```javascript
const ipfsHttpClient = require('ipfs-http-client')
Expand Down Expand Up @@ -125,8 +129,8 @@ If your application requires support for extra codecs, you can configure them as

## Next steps

* See [examples/custom-ipld-formats](https://github.com/ipfs/js-ipfs/tree/master/examples/custom-ipld-formats) for runnable code that demonstrates the above with in-process IPFS nodes, IPFS run as a daemon and also the http client
* Also [examples/traverse-ipld-graphs](https://github.com/ipfs/js-ipfs/tree/master/examples/traverse-ipld-graphs) which uses the [ipld-format-to-blockcodec](https://www.npmjs.com/package/ipld-format-to-blockcodec) module to use older [IPLD format][]s that have not been ported over to the new [BlockCodec][] interface, as well as additional [Multihash Hashers](https://www.npmjs.com/package/multiformats#multihash-hashers).
* See [examples/custom-ipld-formats](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/custom-ipld-formats) for runnable code that demonstrates the above with in-process IPFS nodes, IPFS run as a daemon and also the http client
* Also [examples/traverse-ipld-graphs](https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/traverse-ipld-graphs) which uses the [ipld-format-to-blockcodec](https://www.npmjs.com/package/ipld-format-to-blockcodec) module to use older [IPLD format][]s that have not been ported over to the new [BlockCodec][] interface, as well as additional [Multihash Hashers](https://www.npmjs.com/package/multiformats#multihash-hashers).

[cid]: https://docs.ipfs.io/concepts/content-addressing/
[blockcodec]: https://www.npmjs.com/package/multiformats#multicodec-encoders--decoders--codecs
Expand Down
Loading

0 comments on commit 1806bb2

Please sign in to comment.