Textile binary distribution for Node (npm-textile-dep)
Official Textile binary distribution for Node projects
Join us on our public Slack channel for news, discussions, and status updates.
Table of Contents
Background
Textile provides encrypted, recoverable, schema-based, and cross-application data storage built on IPFS and 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
.
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
"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 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 <version> <platform> <architecture> <install directory>
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!
# 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:
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
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 on Slack.
- Log bugs, file 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 (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 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 and our contributor covenant code of conduct.
License
About
This package was heavily inspired (it started as a direct fork) by the 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.