https://github.com/textileio/npm-textile-dep
https://github.com/textileio/npm-textile-dep
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/textileio/npm-textile-dep
- Owner: textileio
- License: mit
- Created: 2020-02-15T00:09:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-15T01:08:09.000Z (over 6 years ago)
- Last Synced: 2025-01-29T21:51:14.458Z (over 1 year ago)
- Language: TypeScript
- Size: 41 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Textile binary distribution for Node _(npm-textile-dep)_
[](https://textile.io)
[](https://slack.textile.io)
[](./package.json)
[](./package.json)
[](https://www.npmjs.com/package/@textile/textile-dep)
[](https://www.npmjs.com/package/@textile/textile-dep)
[](./LICENSE)
[](https://david-dm.org/textileio/npm-textile-dep)
[](https://circleci.com/gh/textileio/npm-textile-dep)
[](https://github.com/RichardLitt/standard-readme)
[](https://textileio.github.io/npm-textile-dep/)
> Official Textile binary distribution for Node projects
Join us on our [public Slack channel](https://slack.textile.io/) for news, discussions, and status updates.
## Table of Contents
- [Textile binary distribution for Node _(npm-textile-dep)_](#textile-binary-distribution-for-node-npm-textile-dep)
- [Table of Contents](#table-of-contents)
- [Background](#background)
- [Usage](#usage)
- [Overriding the textile version](#overriding-the-textile-version)
- [Arguments](#arguments)
- [Development](#development)
- [Maintainer](#maintainer)
- [Contributing](#contributing)
- [License](#license)
- [About](#about)
## Background
[Textile](https://www.textile.io) provides encrypted, recoverable, schema-based, and cross-application data storage built on [IPFS](https://github.com/ipfs) and [libp2p](https://github.com/libp2p). We like to think of it as a decentralized data wallet with built-in protocols for sharing and recovery, or more simply, **an open and programmable iCloud**.
## Usage
This module downloads `textile` binaries from https://github.com/textileio/textile/releases into your project.
By default it will download the textile version that matches the npm version of this module. So depending on `@textile/npm-textile-dep@0.6.3` will install `textile v0.6.3` for your current system architecture, in to your project at `node_modules/@textile/textile-dep/binary/textile{.exe}`.
For a more 'standard' approach to installing `textile` in JS projects, see [`@textile/textile`](https://github.com/textileio/npm-textile).
### Overriding the textile version
You can override the version of `textile` that gets downloaded by adding by adding a `textile.version` field to your `package.json`
```json
"textile": {
"version": "v0.6.3"
},
```
### Arguments
When used via `node dist/bin.js`, you can specify the target platform, version and architecture via environment variables: `TARGET_OS`, `TARGET_VERSION` and `TARGET_ARCH`.
We fetch the versions dynamically from [GitHub](https://github.com/textileio/textile/releases) where the OSes and architectures are listed as Assets. You can also fetch specific versions via command line arguments in the order of:
```
node dist/bin.js
```
For example:
```
node dist/bin.js v0.6.3 linux amd64 ./textile
```
## Development
**Note**: The binary gets put in the `binary` folder inside the module folder, so don't commit this!
```sh
# Run all the unit tests
npm run test
# Lint everything
# NOTE: Linting uses `prettier` to auto-fix styling issues when possible
npm run lint
```
You can also compile the Typescript yourself with:
```sh
npm run build
```
If you want to push out a _new_ release, simply run `npm version {path|minor|major}` to run the CI-based release process, `npm` will automatically bump the version, and the CI will fetch the relevant `textile` version for testing etc.
## Maintainer
[Carson Farmer](https://github.com/carsonfarmer)
## Contributing
This library is a work in progress. As such, there's a few things you can do right now to help out:
* Ask questions! We'll try to help. Be sure to drop a note (on the above issue) if there is anything you'd like to work on and we'll update the issue to let others know. Also [get in touch](https://slack.textile.io) on Slack.
* Log bugs, [file issues](https://github.com/textileio/npm-textile-dep/issues), submit pull requests!
* **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
* Take a look at [textile](https://github.com/textileio/textile) (which is where the binary is built). Contributions here that would be most helpful are **top-level comments** about how it should look based on our understanding. Again, the more eyes the better.
* **Add tests**. There can never be enough tests.
* **Contribute to the [Textile docs](https://github.com/textileio/docs)** with any additions or questions you have about Textile and its various implementations. A good example would be asking, "What is an Textile daemon". If you don't know a term, odds are someone else doesn't either. Eventually, we should have a good understanding of where we need to improve communications and teaching together to make Textile even better.
Before you get started, be sure to read our [contributors guide](./CONTRIBUTING.md) and our [contributor covenant code of conduct](./CODE_OF_CONDUCT.md).
## License
[MIT](./LICENSE)
## About
This package was heavily inspired (it started as a direct fork) by the [`npm-go-ipfs-dep`](https://github.com/ipfs/npm-go-ipfs-dep) library. Big thanks to all the contributors to that original package! See `package.json`, `LICENSE`, and `CHANGELOG.md` in that project for details and contributions.