Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
andreupifarre committed Oct 24, 2018
1 parent 69547d5 commit add77ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 31 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -4,7 +4,7 @@ Any form of contribution is welcomed.

## Acknowledgements

- Andreu Pifarre
- <It could be you!>

## Open source contributor incentives

Expand Down
34 changes: 4 additions & 30 deletions README.md
Expand Up @@ -5,6 +5,8 @@
Preload is a 1.1kb JavaScript library for preloading assets on the browser. Preload provides the ability to load assets of different
file types, composite progress events.

## Getting started

```js
const preload = Preload();
preload.preload([
Expand All @@ -18,36 +20,8 @@ preload.preload([
}
```

## Getting started

Clone this repository and install its dependencies:

```bash
git clone https://github.com/rollup/rollup-starter-lib
cd rollup-starter-lib
npm install
```

`npm run build` builds the library to `dist`, generating three files:

* `dist/how-long-till-lunch.cjs.js`
A CommonJS bundle, suitable for use in Node.js, that `require`s the external dependency. This corresponds to the `"main"` field in package.json
* `dist/how-long-till-lunch.esm.js`
an ES module bundle, suitable for use in other people's libraries and applications, that `import`s the external dependency. This corresponds to the `"module"` field in package.json
* `dist/how-long-till-lunch.umd.js`
a UMD build, suitable for use in any environment (including the browser, as a `<script>` tag), that includes the external dependency. This corresponds to the `"browser"` field in package.json

`npm run dev` builds the library, then keeps rebuilding it whenever the source files change using [rollup-watch](https://github.com/rollup/rollup-watch).

`npm test` builds the library, then tests it.

## Variations

* [babel](https://github.com/rollup/rollup-starter-lib/tree/babel) — illustrates writing the source code in ES2015 and transpiling it for older environments with [Babel](https://babeljs.io/)
* [buble](https://github.com/rollup/rollup-starter-lib/tree/buble) — similar, but using [Bublé](https://buble.surge.sh/) which is a faster alternative with less configuration



## License

Released for free under the MIT license, which means you can use it for almost any purpose (including commercial projects). We appreciate credit where possible, but it is not a requirement.

[MIT](LICENSE).

0 comments on commit add77ac

Please sign in to comment.