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

Commit e337a7c

Browse files
authored
chore: fix examples (#2800)
Pulls examples up to root and lets lerna work out dependencies on ipfs and ipfs-http-client from elsewhere in the project.
1 parent 09d76e0 commit e337a7c

File tree

194 files changed

+303
-326
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+303
-326
lines changed

.travis.yml

Lines changed: 7 additions & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
language: node_js
22

3+
services:
4+
- xvfb
5+
36
branches:
47
only:
58
- master
@@ -57,7 +60,7 @@ jobs:
5760
include:
5861
- stage: check
5962
script:
60-
- npm run build -- -- -- --bundlesize
63+
- npm run build -- --scope={ipfs,ipfs-http-client} -- -- --bundlesize
6164
- npm run dep-check -- -- -- -- -i wrtc -i electron-webrtc
6265
- npm run lint -- --concurrency 1
6366

@@ -124,166 +127,10 @@ jobs:
124127
- npm run test:interop:electron-renderer -- -- -- --bail --timeout 10000
125128

126129
- stage: test
127-
name: example - browser-add-readable-stream
128-
script:
129-
- cd packages/ipfs
130-
- npm run build
131-
- cd examples
132-
- npm install
133-
- npm run test -- browser-add-readable-stream
134-
135-
- stage: test
136-
name: example - browser-browserify
137-
script:
138-
- cd packages/ipfs
139-
- npm run build
140-
- cd examples
141-
- npm install
142-
- npm run test -- browser-browserify
143-
144-
- stage: test
145-
name: example - browser-create-react-app
146-
script:
147-
- cd packages/ipfs
148-
- npm run build
149-
- cd examples
150-
- npm install
151-
- npm run test -- browser-create-react-app
152-
153-
- stage: test
154-
name: example - browser-mfs
155-
script:
156-
- cd packages/ipfs
157-
- npm run build
158-
- cd examples
159-
- npm install
160-
- npm run test -- browser-mfs
161-
162-
- stage: test
163-
name: example - browser-parceljs
164-
script:
165-
- cd packages/ipfs
166-
- npm run build
167-
- cd examples
168-
- npm install
169-
- npm run test -- browser-parceljs
170-
171-
- stage: test
172-
name: example - browser-readablestream
173-
script:
174-
- cd packages/ipfs
175-
- npm run build
176-
- cd examples
177-
- npm install
178-
- npm run test -- browser-readablestream
179-
180-
- stage: test
181-
name: example - browser-script-tag
182-
script:
183-
- cd packages/ipfs
184-
- npm run build
185-
- cd examples
186-
- npm install
187-
- npm run test -- browser-script-tag
188-
189-
- stage: test
190-
name: example - browser-video-streaming
191-
script:
192-
- cd packages/ipfs
193-
- npm run build
194-
- cd examples
195-
- npm install
196-
- npm run test -- browser-video-streaming
197-
198-
- stage: test
199-
name: example - browser-vue
200-
script:
201-
- cd packages/ipfs
202-
- npm run build
203-
- cd examples
204-
- npm install
205-
- npm run test -- browser-vue
206-
207-
- stage: test
208-
name: example - browser-webpack
209-
script:
210-
- cd packages/ipfs
211-
- npm run build
212-
- cd examples
213-
- npm install
214-
- npm run test -- browser-webpack
215-
216-
- stage: test
217-
name: example - circuit-relaying
218-
script:
219-
- cd packages/ipfs
220-
- npm run build
221-
- cd examples
222-
- npm install
223-
- npm run test -- circuit-relaying
224-
225-
- stage: test
226-
name: example - custom-ipfs-repo
227-
script:
228-
- cd packages/ipfs
229-
- npm run build
230-
- cd examples
231-
- npm install
232-
- npm run test -- custom-ipfs-repo
233-
234-
- stage: test
235-
name: example - custom-libp2p
236-
script:
237-
- cd packages/ipfs
238-
- npm run build
239-
- cd examples
240-
- npm install
241-
- npm run test -- custom-libp2p
242-
243-
- stage: test
244-
name: example - exchange-files-in-browser
245-
script:
246-
- cd packages/ipfs
247-
- npm run build
248-
- cd examples
249-
- npm install
250-
- npm run test -- exchange-files-in-browser
251-
252-
- stage: test
253-
name: example - explore-ethereum-blockchain
254-
script:
255-
- cd packages/ipfs
256-
- npm run build
257-
- cd examples
258-
- npm install
259-
- npm run test -- explore-ethereum-blockchain
260-
261-
- stage: test
262-
name: example - ipfs-101
263-
script:
264-
- cd packages/ipfs
265-
- npm run build
266-
- cd examples
267-
- npm install
268-
- npm run test -- ipfs-101
269-
270-
- stage: test
271-
name: example - running-multiple-nodes
272-
script:
273-
- cd packages/ipfs
274-
- npm run build
275-
- cd examples
276-
- npm install
277-
- npm run test -- running-multiple-nodes
278-
279-
- stage: test
280-
name: example - traverse-ipld-graphs
130+
name: examples
281131
script:
282-
- cd packages/ipfs
283-
- npm run build
284-
- cd examples
285-
- npm install
286-
- npm run test -- traverse-ipld-graphs
132+
- npm run build -- --scope={ipfs,ipfs-http-client}
133+
- npm run test -- --scope=example* --concurrency=1
287134

288135
- stage: release-rc
289136
# only run on changes to master

packages/ipfs/examples/browser-add-readable-stream/index.html renamed to examples/browser-add-readable-stream/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</head>
66
<body>
77
<pre id="output"></pre>
8-
<script src="../../dist/index.js"></script>
8+
<script src="./node_modules/ipfs/dist/index.js"></script>
99
<script src="index.js"></script>
1010
</body>
1111
</html>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "example-browser-add-readable-stream",
3+
"version": "1.0.0",
4+
"description": "How to add readable streams in the browser",
5+
"main": "index.js",
6+
"private": true,
7+
"scripts": {
8+
"serve": "http-server public -a 127.0.0.1 -p 8888",
9+
"start": "npm run serve",
10+
"test": "test-ipfs-example"
11+
},
12+
"keywords": [],
13+
"license": "MIT",
14+
"devDependencies": {
15+
"ipfs": "^0.41.0",
16+
"test-ipfs-example": "^1.0.0"
17+
},
18+
"dependencies": {}
19+
}

0 commit comments

Comments
 (0)