Skip to content

Commit c1d8ea2

Browse files
committed
chore: Initial commit
0 parents  commit c1d8ea2

12 files changed

+307
-0
lines changed

.gitignore

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
docs
2+
package-lock.json
3+
yarn.lock
4+
5+
# Logs
6+
logs
7+
*.log
8+
npm-debug.log*
9+
10+
# Runtime data
11+
pids
12+
*.pid
13+
*.seed
14+
15+
# Directory for instrumented libs generated by jscoverage/JSCover
16+
lib-cov
17+
18+
# Coverage directory used by tools like istanbul
19+
coverage
20+
21+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
22+
.grunt
23+
24+
# node-waf configuration
25+
.lock-wscript
26+
27+
# Compiled binary addons (http://nodejs.org/api/addons.html)
28+
build/Release
29+
30+
# Dependency directory
31+
node_modules
32+
33+
# Optional npm cache directory
34+
.npm
35+
36+
# Optional REPL history
37+
.node_repl_history
38+
39+
dist
40+
41+
package-lock.js
42+
yarn.lock

.npmignore

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Runtime data
6+
pids
7+
*.pid
8+
*.seed
9+
10+
# Directory for instrumented libs generated by jscoverage/JSCover
11+
lib-cov
12+
13+
# Coverage directory used by tools like istanbul
14+
coverage
15+
16+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17+
.grunt
18+
19+
# Compiled binary addons (http://nodejs.org/api/addons.html)
20+
build/Release
21+
22+
# Optional npm cache directory
23+
.npm
24+
25+
# Optional REPL history
26+
.node_repl_history

.travis.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Warning: This file is automatically synced from https://github.com/ipfs/ci-sync so if you want to change it, please change it there and ask someone to sync all repositories.
2+
sudo: false
3+
language: node_js
4+
5+
matrix:
6+
include:
7+
- node_js: 6
8+
env: CXX=g++-4.8
9+
- node_js: 8
10+
env: CXX=g++-4.8
11+
# - node_js: stable
12+
# env: CXX=g++-4.8
13+
14+
script:
15+
- npm run lint
16+
- npm run test
17+
- npm run coverage
18+
19+
before_script:
20+
- export DISPLAY=:99.0
21+
- sh -e /etc/init.d/xvfb start
22+
23+
after_success:
24+
- npm run coverage-publish
25+
26+
addons:
27+
firefox: 'latest'
28+
apt:
29+
sources:
30+
- ubuntu-toolchain-r-test
31+
packages:
32+
- g++-4.8

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 David Dias
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# ipfs-mfs JavaScript Implementation
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+
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
7+
[![Build Status](https://travis-ci.org/ipfs/js-ipfs-mfs.svg?style=flat-square&branch=master)](https://travis-ci.org/ipfs/js-ipfs-mfs)
8+
[![Coverage Status](https://coveralls.io/repos/github/ipfs/js-ipfs-mfs/badge.svg?branch=master)](https://coveralls.io/github/ipfs/js-ipfs-mfs?branch=master)
9+
[![Dependency Status](https://david-dm.org/ipfs/js-ipfs-mfs.svg?style=flat-square)](https://david-dm.org/ipfs/js-ipfs-mfs)
10+
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
11+
![](https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square)
12+
![](https://img.shields.io/badge/Node.js-%3E%3D4.0.0-orange.svg?style=flat-square)
13+
14+
> JavaScript implementation of the IPFS Mutable File System
15+
16+
[The MFS spec can be found inside the ipfs/specs repository](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#mutable-file-system)
17+
18+
## Table of Contents
19+
20+
- [Install](#install)
21+
- [npm](#npm)
22+
- [Use in Node.js](#use-in-nodejs)
23+
- [Use in a browser with browserify, webpack or any other bundler](#use-in-a-browser-with-browserify-webpack-or-any-other-bundler)
24+
- [Use in a browser Using a script tag](#use-in-a-browser-using-a-script-tag)
25+
- [Contribute](#contribute)
26+
- [License](#license)
27+
28+
## Install
29+
30+
### npm
31+
32+
```sh
33+
> npm i ipfs-mfs
34+
```
35+
36+
### Use in Node.js
37+
38+
```JavaScript
39+
const mfs = require('ipfs-mfs')
40+
```
41+
42+
### Use in a browser with browserify, webpack or any other bundler
43+
44+
The code published to npm that gets loaded on require is an ES5 transpiled version with the right shims added. This means that you can require it and use with your favourite bundler without having to adjust asset management process.
45+
46+
```JavaScript
47+
const mfs = require('ipfs-mfs')
48+
```
49+
50+
### Use in a browser using a script tag
51+
52+
Loading this module through a script tag will make the `mfs` obj available in the global namespace.
53+
54+
```html
55+
<script src="https://npmcdn.com/ipfs-mfs/dist/index.min.js"></script>
56+
<!-- OR -->
57+
<script src="https://npmcdn.com/ipfs-mfs/dist/index.js"></script>
58+
```
59+
60+
## Contribute
61+
62+
All are welcome, please join in! Open an [issue](https://github.com/ipfs/js-ipfs-mfs/issues) or send a [PR](https://github.com/ipfs/js-ipfs-mfs/pulls)!
63+
64+
This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).
65+
66+
[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)
67+
68+
## License
69+
70+
[MIT](LICENSE)

appveyor.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Warning: This file is automatically synced from https://github.com/ipfs/ci-sync so if you want to change it, please change it there and ask someone to sync all repositories.
2+
version: "{build}"
3+
4+
environment:
5+
matrix:
6+
- nodejs_version: "6"
7+
- nodejs_version: "8"
8+
9+
matrix:
10+
fast_finish: true
11+
12+
install:
13+
# Install Node.js
14+
- ps: Install-Product node $env:nodejs_version
15+
16+
# Upgrade npm
17+
- npm install -g npm
18+
19+
# Output our current versions for debugging
20+
- node --version
21+
- npm --version
22+
23+
# Install our package dependencies
24+
- npm install
25+
26+
test_script:
27+
- npm run test:node
28+
29+
build: off

ci/Jenkinsfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Warning: This file is automatically synced from https://github.com/ipfs/ci-sync so if you want to change it, please change it there and ask someone to sync all repositories.
2+
javascript()

circle.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Warning: This file is automatically synced from https://github.com/ipfs/ci-sync so if you want to change it, please change it there and ask someone to sync all repositories.
2+
machine:
3+
node:
4+
version: stable
5+
6+
dependencies:
7+
pre:
8+
- google-chrome --version
9+
- curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
10+
- sudo dpkg -i google-chrome.deb || true
11+
- sudo apt-get update
12+
- sudo apt-get install -f
13+
- sudo apt-get install --only-upgrade lsb-base
14+
- sudo dpkg -i google-chrome.deb
15+
- google-chrome --version

package.json

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"name": "ipfs-mfs",
3+
"version": "0.0.1",
4+
"description": "JavaScript implementation of the IPFS Mutable File System",
5+
"main": "src/index.js",
6+
"browser": {
7+
"fs": false
8+
},
9+
"scripts": {
10+
"test": "aegir test",
11+
"test:node": "aegir test -t node",
12+
"test:browser": "aegir test -t browser -t webworker",
13+
"build": "aegir build",
14+
"lint": "aegir lint",
15+
"release": "aegir release",
16+
"release-minor": "aegir release --type minor",
17+
"release-major": "aegir release --type major",
18+
"coverage": "aegir coverage"
19+
},
20+
"repository": {
21+
"type": "git",
22+
"url": "git+https://github.com/ipfs/js-ipfs-mfs.git"
23+
},
24+
"keywords": [
25+
"IPFS"
26+
],
27+
"author": "Alex Potsides <[email protected]>",
28+
"license": "MIT",
29+
"bugs": {
30+
"url": "https://github.com/ipfs/js-ipfs-mfs/issues"
31+
},
32+
"engines": {
33+
"node": ">=6.0.0",
34+
"npm": ">=3.0.0"
35+
},
36+
"homepage": "https://github.com/ipfs/js-ipfs-mfs#readme",
37+
"devDependencies": {
38+
"aegir": "^13.0.6",
39+
"chai": "^4.1.2",
40+
"dirty-chai": "^2.0.1",
41+
"pre-commit": "^1.2.2",
42+
"safe-buffer": "^5.1.1"
43+
},
44+
"dependencies": {
45+
46+
},
47+
"pre-commit": [
48+
"lint",
49+
"test"
50+
],
51+
"contributors": [
52+
"Alex Potsides <[email protected]>"
53+
]
54+
}

src/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
'use strict'
2+
3+
module.exports = () => {}

test/mfs.spec.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* eslint-env mocha */
2+
'use strict'
3+
4+
const mfs = require('../src')
5+
6+
describe('mfs', () => {
7+
it('does something', (done) => {
8+
mfs()
9+
10+
done()
11+
})
12+
})

0 commit comments

Comments
 (0)