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

Commit ac45d3f

Browse files
fix: add guidelines and instructions (#40)
* fix: add guidelines and instructions * fix: add missing instruction to update CI * fix: typo in angular README.md
1 parent 0ed87d6 commit ac45d3f

File tree

4 files changed

+60
-4
lines changed

4 files changed

+60
-4
lines changed

README.md

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
- [IPFS Tutorials at ProtoSchool](#ipfs-tutorials-at-protoschool)
3131
- [Documentation](#documentation)
3232
- [Contributing](#contributing)
33+
- [Guidelines](#guidelines)
34+
- [Steps to follow after adding a new example](#steps-to-follow-after-adding-a-new-example)
3335
- [Want to hack on IPFS?](#want-to-hack-on-ipfs)
3436

3537
## About The Project
@@ -60,11 +62,11 @@ Make sure you have installed all of the following prerequisites on your developm
6062
```
6163
2. Install NPM packages
6264
```sh
63-
npm run init
65+
yarn install
6466
```
6567
3. Run all the examples
6668
```sh
67-
npm run test:examples
69+
yarn run test
6870
```
6971

7072
## Structure
@@ -96,6 +98,60 @@ Contributions are what make the open source community such an amazing place to b
9698
4. Push to the Branch (`git push origin feature/amazing-feature`)
9799
5. Open a Pull Request
98100

101+
### Guidelines
102+
103+
- Follow the [example-template](`https://github.com/ipfs-examples/example-template`)
104+
- 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
105+
106+
- Examples must:
107+
- Live inside the `/examples/` folder
108+
- Have tests and should make use of `test-util-ipfs-example` library
109+
- If possible use `playwright` as test framework
110+
- Implement the following scripts:
111+
- `clean`: used to clean all the unnecessary code (e.g.: files generated by bundlers and package managers)
112+
- `build`: used to build the example
113+
- `start`: used to start the example
114+
- `test`: used to test the example
115+
116+
- README must have (see example inside `example-template`):
117+
- Link to `Codesandbox.com` for one-click running demonstration
118+
- References for documentation/tutorials used to build the example
119+
- _Optional:_ Screenshots, gifs, etc... under `img/` folder
120+
121+
- Update the CI to run the tests of the new example as standalone
122+
- Edit `github/workflows/ci.yml`
123+
- Add the test name to `project` under `matrix`
124+
125+
- Extend the `test-util-ipfs-example` library if needed to reuse code in other examples
126+
127+
### Steps to follow after adding a new example
128+
129+
- Update `js-ipfs` CI to run the test script of the example
130+
- Edit the `.travis.yml`, search for the test examples section and add the following:
131+
132+
```yml
133+
- stage: test
134+
name: examples - {TODO_EXAMPLE NAME}
135+
script:
136+
- npm run test:external -- -- -- https://github.com/ipfs-examples/{TODO_GIT_URL}.git
137+
```
138+
139+
- Create a new repository based on (https://github.com/ipfs-examples/example-fork-go-template) following the name: `js-ipfs-{EXAMPLE_NAME}` with a description
140+
141+
- Turn off issue/wikis/projects/discussions
142+
143+
<p align="center">
144+
<img src="./img/repo_details.png" width="300" alt="Repo Details">
145+
</p>
146+
147+
- Disable Releases/Environments/Packages
148+
149+
<p align="center">
150+
<img src="./img/repo_settings.png" width="500" alt="Repo Settings">
151+
</p>
152+
153+
- Follow the instruction inside the README
154+
99155
## Want to hack on IPFS?
100156

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

examples/browser-angular/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
</a>
55
</p>
66

7-
<h3 align="center"><b>IPFS React App</b></h3>
7+
<h3 align="center"><b>IPFS Angular App</b></h3>
88

99
<p align="center">
10-
<b><i>Using js-ipfs in a `create-react-app`</i></b>
10+
<b><i>Using js-ipfs with `Angular`</i></b>
1111
<br />
1212
<br />
1313
<img src="https://raw.githubusercontent.com/jlord/forkngo/gh-pages/badges/cobalt.png" width="200">

img/repo_details.png

125 KB
Loading

img/repo_settings.png

329 KB
Loading

0 commit comments

Comments
 (0)