diff --git a/package.json b/package.json index 4bcae02..f2c6e74 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,8 @@ "main": "index.js", "scripts": { "clean": "rm -rf dist/*", - "build": "parcel build index.html --public-url '.'", - "dev": "parcel index.html", - "test": "echo \"Error: no test specified\" && exit 1", + "start": "parcel src/index.html", + "build": "npm run clean && parcel build src/index.html --public-url '.'", "deploy": "ipfs add -r --quieter dist" }, "keywords": [], diff --git a/readme.md b/readme.md index bfb7a26..ab3fdb6 100644 --- a/readme.md +++ b/readme.md @@ -4,17 +4,32 @@ A website for decoding CIDs -- build: `npm run build` -- dev: `npm run dev` -- add to ipfs: `npm run deploy` +## Getting started -Linux users: If you see `Error: ENOSPC: no space left on device` errors, crank up your max inotify watches: +With node and npm installed, clone the repo and run: +```console +npm i ``` -sysctl -w fs.inotify.max_user_watches=524288 -echo "fs.inotify.max_user_watches=524288" >>/etc/sysctl.conf + +To start the hot-code-reloading dev server: + +```console +npm start +``` + +To build the optimized static website to the `dist` folder: + +```console +npm run build +``` + +To add the `dist` folder to your local ipfs repo and print the root CID: + +```console +npm run deploy ``` ---- +## License License MIT 2018 diff --git a/src/img/ipfs-logo.svg b/src/img/ipfs-logo.svg new file mode 100644 index 0000000..5d24074 --- /dev/null +++ b/src/img/ipfs-logo.svg @@ -0,0 +1 @@ +IPFS logo (new) \ No newline at end of file diff --git a/src/img/ipld-tree.svg b/src/img/ipld-tree.svg new file mode 100644 index 0000000..4e57fc4 --- /dev/null +++ b/src/img/ipld-tree.svg @@ -0,0 +1 @@ +logotype_IPLD \ No newline at end of file diff --git a/src/img/multiformats-logo.svg b/src/img/multiformats-logo.svg new file mode 100644 index 0000000..a7b9223 --- /dev/null +++ b/src/img/multiformats-logo.svg @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/index.html b/src/index.html similarity index 84% rename from index.html rename to src/index.html index 9c51af9..743eb2f 100644 --- a/index.html +++ b/src/index.html @@ -10,8 +10,8 @@
- - + +

CID inspector

@@ -62,15 +62,15 @@

CID inspecto Base32 CIDv1 -
+
diff --git a/index.js b/src/index.js similarity index 100% rename from index.js rename to src/index.js diff --git a/main.css b/src/main.css similarity index 100% rename from main.css rename to src/main.css