Skip to content

Commit

Permalink
chore: use prepare script to auto-build after install (storacha#210)
Browse files Browse the repository at this point in the history
Adds a
[`prepare`](https://docs.npmjs.com/cli/v6/using-npm/scripts#life-cycle-scripts)
script to automatically run `build` and `compile` after `install`. This
gives us one fewer steps to get started and is a good habit as prepare
also runs if folks depend on your modules from a git branch or similar.

see: https://docs.npmjs.com/cli/v6/using-npm/scripts#life-cycle-scripts

Also:
- updates an old ref to `npm` in the scripts
- removes `build` and `compile` from CI action as it's included in
`install` now thanks to `prepare`
- updates example readmes to remove `build` step
- adds us as maintainers!
- adds `package-lock.json` to gitignore so we don't get double lock
madness.


License: MIT
Signed-off-by: Oli Evans <[email protected]>
  • Loading branch information
olizilla authored Jan 6, 2023
1 parent 4bd233b commit 511f13e
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 14 deletions.
4 changes: 0 additions & 4 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,5 @@ runs:
args: [--frozen-lockfile, --strict-peer-dependencies]
- run: pnpm run lint
shell: bash
- run: pnpm run compile
shell: bash
- run: pnpm run build
shell: bash
- run: pnpm test
shell: bash
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build
coverage
node_modules
package-lock.json
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<a href="https://beta.ui.web3.storage"><img width="250" src="https://bafybeianokbu4dgpfd2mq3za3wejtpscsy25ad6vocmmtxskcq6zig4cuq.ipfs.w3s.link/w3ui-logo-stroke.png" alt="Web3.Storage UI logo" /></a>
</h1>


<h3 align="center">Headless, type-safe, UI components for the next generation Web3.Storage APIs.</h3>

<p align="center">
Expand All @@ -16,6 +17,8 @@
> Open an issue on the repo or reach out to the #web3-storage channel on [IPFS Discord](https://docs.ipfs.tech/community/chat/#discord) if you have any
questions!

This repo contains reusauble UI modules for web3.storage in your favourite UI framework, and a set of example apps to see them dance.

## Documentation

[beta.ui.web3.storage](https://beta.ui.web3.storage)
Expand Down Expand Up @@ -46,6 +49,23 @@ questions!

Feel free to join in. All welcome. Please read our [contributing guidelines](https://github.com/web3-storage/w3ui/blob/main/CONTRIBUTING.md) and/or [open an issue](https://github.com/web3-storage/w3ui/issues)!

### Getting started

To contribute to this project, clone the w3ui repository and enter the `w3ui` directory

```sh
git clone https://github.com/web3-storage/w3ui
cd w3ui
```

Install dependencies and build:

```sh
pnpm install
```

Then pick an example app from the list, `cd` into it's directory and run `pnpm start` to try it out.

## License

Dual-licensed under [MIT + Apache 2.0](https://github.com/web3-storage/w3ui/blob/main/LICENSE.md)
1 change: 0 additions & 1 deletion examples/solid/file-upload/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ To run this example:

```sh
npm install
npm run build
```

- Change to this example directory and run the example:
Expand Down
1 change: 0 additions & 1 deletion examples/solid/multi-file-upload/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ To run this example:

```sh
npm install
npm run build
```

- Change to this example directory and run the example:
Expand Down
1 change: 0 additions & 1 deletion examples/solid/sign-up-in/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ To run this example:

```sh
npm install
npm run build
```

- Change to this example directory and run the example:
Expand Down
1 change: 0 additions & 1 deletion examples/solid/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ To run this example:

```sh
npm install
npm run build
```

- Change to this example directory and run the example:
Expand Down
1 change: 0 additions & 1 deletion examples/solid/uploads-list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ To run this example:

```sh
npm install
npm run build
```

- Change to this example directory and run the example:
Expand Down
1 change: 0 additions & 1 deletion examples/vue/file-upload/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ To run this example:

```sh
npm install
npm run build
```

- Change to this example directory and run the example:
Expand Down
1 change: 0 additions & 1 deletion examples/vue/sign-up-in/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ To run this example:

```sh
npm install
npm run build
```

- Change to this example directory and run the example:
Expand Down
1 change: 0 additions & 1 deletion examples/vue/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ To run this example:

```sh
npm install
npm run build
```

- Change to this example directory and run the example:
Expand Down
1 change: 0 additions & 1 deletion examples/vue/uploads-list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ To run this example:

```sh
npm install
npm run build
```

- Change to this example directory and run the example:
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
"version": "0.0.0",
"description": "Headless, type-safe, UI components for the next generation Web3.Storage APIs.",
"author": "Alan Shaw",
"maintainers": [ "travis", "yusefnapora", "olizilla" ],
"license": "Apache-2.0 OR MIT",
"scripts": {
"build": "rollup --config rollup.config.js && npm run typecheck",
"prepare": "pnpm run build && pnpm run compile",
"build": "rollup --config rollup.config.js && pnpm run typecheck",
"clean": "rm -rf node_modules package-lock.json coverage packages/*/{package-lock.json,build,node_modules}",
"compile": "pnpm run --recursive --if-present compile",
"lint": "ts-standard",
Expand Down

0 comments on commit 511f13e

Please sign in to comment.