Skip to content

Commit 5a25c87

Browse files
committed
chore: add travis file and configure build scripts
1 parent 6429c6c commit 5a25c87

File tree

10 files changed

+126
-95
lines changed

10 files changed

+126
-95
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
*.lcov
3+
.nyc_output
4+
*.log
5+
package-lock.json

packages/ipfs-unixfs-exporter/.travis.yml renamed to .travis.yml

+16-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ stages:
77

88
node_js:
99
- '12'
10+
- '13'
1011

1112
os:
1213
- linux
@@ -21,20 +22,32 @@ jobs:
2122
- stage: check
2223
script:
2324
- npx aegir commitlint --travis
24-
- npx aegir dep-check
25+
- npm run depcheck
2526
- npm run lint
2627

2728
- stage: test
2829
name: chrome
2930
addons:
3031
chrome: stable
31-
script: npx aegir test -t browser -t webworker
32+
script: npm run test:browser
33+
34+
- stage: test
35+
name: chrome webworker
36+
addons:
37+
chrome: stable
38+
script: npm run test:webworker
39+
40+
- stage: test
41+
name: firefox
42+
addons:
43+
firefox: latest
44+
script: npm run test:browser -- --browsers FirefoxHeadless
3245

3346
- stage: test
3447
name: firefox
3548
addons:
3649
firefox: latest
37-
script: npx aegir test -t browser -t webworker -- --browsers FirefoxHeadless
50+
script: npm run test:webworker -- --browsers FirefoxHeadless
3851

3952
notifications:
4053
email: false

README.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# ipfs-unixfs JavaScript Implementation <!-- omit in toc -->
2+
3+
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
4+
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
5+
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
6+
[![Travis CI](https://flat.badgen.net/travis/ipfs/js-ipfs-unixfs)](https://travis-ci.com/ipfs/js-ipfs-unixfs)
7+
[![Codecov](https://codecov.io/gh/ipfs/js-ipfs-unixfs/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-ipfs-unixfs)
8+
[![Deps](https://david-dm.org/ipfs/js-ipfs-unixfs.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-unixfs)
9+
[![Style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
10+
![](https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square)
11+
![](https://img.shields.io/badge/Node.js-%3E%3D8.0.0-orange.svg?style=flat-square)
12+
13+
> JavaScript implementation of IPFS' UnixFS (a Unix FileSystem files representation on top of a MerkleDAG)
14+
15+
The UnixFS spec can be found inside the [ipfs/specs repository](http://github.com/ipfs/specs)
16+
17+
## Lead Maintainer <!-- omit in toc -->
18+
19+
[Alex Potsides](https://github.com/achingbrain)
20+
21+
## Table of Contents <!-- omit in toc -->
22+
23+
- [Install](#install)
24+
- [npm](#npm)
25+
- [Use in Node.js](#use-in-nodejs)
26+
- [Use in a browser with browserify, webpack or any other bundler](#use-in-a-browser-with-browserify-webpack-or-any-other-bundler)
27+
- [Use in a browser Using a script tag](#use-in-a-browser-using-a-script-tag)
28+
- [Usage](#usage)
29+
- [Examples](#examples)
30+
- [Create a file composed by several blocks](#create-a-file-composed-by-several-blocks)
31+
- [Create a directory that contains several files](#create-a-directory-that-contains-several-files)
32+
- [API](#api)
33+
- [UnixFS Data Structure](#unixfs-data-structure)
34+
- [create an unixfs Data element](#create-an-unixfs-data-element)
35+
- [add and remove a block size to the block size list](#add-and-remove-a-block-size-to-the-block-size-list)
36+
- [get total fileSize](#get-total-filesize)
37+
- [marshal and unmarshal](#marshal-and-unmarshal)
38+
- [is this UnixFS entry a directory?](#is-this-unixfs-entry-a-directory)
39+
- [has an mtime been set?](#has-an-mtime-been-set)
40+
- [Contribute](#contribute)
41+
- [License](#license)
42+
43+
## Structure
44+
45+
* `/packages/ipfs-unixfs` Serialization/deserialization of UnixFS objects to protocol buffers
46+
* `/packages/ipfs-unixfs-importer` Builds DAGs from files and directories
47+
* `/packages/ipfs-unixfs-exporter` Exports DAGs
48+
49+
## Contribute
50+
51+
Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-ipfs-unixfs/issues)!
52+
53+
This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).
54+
55+
[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)
56+
57+
## License
58+
59+
[MIT](LICENSE)

lerna.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"lerna": "3.20.2",
3+
"packages": [
4+
"packages/*"
5+
],
6+
"version": "independent",
7+
"command": {
8+
"bootstrap": {
9+
"hoist": true
10+
},
11+
"run": {
12+
"stream": true
13+
}
14+
}
15+
}

package.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "js-ipfs-unixfs",
3+
"version": "1.0.0",
4+
"description": "JS implementation of the IPFS UnixFS",
5+
"scripts": {
6+
"postinstall": "lerna bootstrap",
7+
"reset": "lerna run --parallel clean && rm -rf packages/*/node_modules packages/*/package-lock.json node_modules",
8+
"test": "lerna run --parallel test",
9+
"test:node": "lerna run --parallel test:node",
10+
"test:browser": "lerna run --parallel test:browser",
11+
"test:webworker": "lerna run --parallel test:webworker",
12+
"coverage": "lerna run --parallel coverage",
13+
"build": "lerna run --parallel build",
14+
"deploy": "lerna run --parallel deploy",
15+
"start": "NODE_ENV=development lerna run --parallel start",
16+
"clean": "lerna run --parallel clean",
17+
"lint": "lerna run --parallel lint",
18+
"depcheck": "lerna run --parallel depcheck",
19+
"publish": "lerna publish"
20+
},
21+
"devDependencies": {
22+
"lerna": "^3.20.2"
23+
}
24+
}

packages/ipfs-unixfs-exporter/package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414
"test:webworker": "aegir test -t webworker",
1515
"build": "aegir build",
1616
"lint": "aegir lint",
17-
"release": "aegir release",
18-
"release-minor": "aegir release --type minor",
19-
"release-major": "aegir release --type major",
17+
"prepublishOnly": "aegir release --test=false --lint=false --bump=false --publish=false",
2018
"coverage": "nyc -s npm run test:node && nyc report --reporter=html",
21-
"dep-check": "aegir dep-check"
19+
"depcheck": "aegir dep-check"
2220
},
2321
"repository": {
2422
"type": "git",

packages/ipfs-unixfs-importer/.travis.yml

-40
This file was deleted.

packages/ipfs-unixfs-importer/package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414
"test:webworker": "aegir test -t webworker",
1515
"build": "aegir build",
1616
"lint": "aegir lint",
17-
"release": "aegir release",
18-
"release-minor": "aegir release --type minor",
19-
"release-major": "aegir release --type major",
17+
"prepublishOnly": "aegir release --test=false --lint=false --bump=false --publish=false",
2018
"coverage": "nyc -s npm run test:node && nyc report --reporter=html",
21-
"dep-check": "aegir dep-check"
19+
"depcheck": "aegir dep-check"
2220
},
2321
"repository": {
2422
"type": "git",

packages/ipfs-unixfs/.travis.yml

-40
This file was deleted.

packages/ipfs-unixfs/package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
"test:webworker": "aegir test -t webworker",
1515
"build": "aegir build",
1616
"lint": "aegir lint",
17-
"release": "aegir release",
18-
"release-minor": "aegir release --type minor",
19-
"release-major": "aegir release --type major",
20-
"coverage": "nyc -s aegir test -t node && nyc report --reporter=html"
17+
"prepublishOnly": "aegir release --test=false --lint=false --bump=false --publish=false",
18+
"coverage": "nyc -s aegir test -t node && nyc report --reporter=html",
19+
"depcheck": "aegir dep-check"
2120
},
2221
"repository": {
2322
"type": "git",

0 commit comments

Comments
 (0)