This package has been deprecated

Author message:

resin-config-json is deprecated, please use balena-config-json instead

resin-config-json

2.0.0 • Public • Published

resin-config-json

npm version dependencies Build Status Build status

Join our online chat at Gitter chat

Resin.io config.json manipulation utilities.

Role

The intention of this module is to provide low level utilities to read and write config.json from Resin.io devices.

THIS MODULE IS LOW LEVEL AND IS NOT MEANT TO BE USED BY END USERS DIRECTLY.

Installation

Install resin-config-json by running:

$ npm install --save resin-config-json

Documentation

config.read(image, type) ⇒ Promise

Kind: static method of config
Summary: Read a config.json from an image
Access: public
Fulfil: Object - config.json

Param Type Description
image String image or drive path
type String device type slug

Example

config.read('/dev/disk2', 'raspberry-pi').then (config) ->
    console.log(config)

config.write(image, type, config) ⇒ Promise

Kind: static method of config
Summary: Write a config.json to an image
Access: public

Param Type Description
image String image or drive path
type String device type slug
config Object config.json

Example

config.write '/dev/disk2', 'raspberry-pi',
    username: 'foobar'
.then ->
    console.log('Done!')

Support

If you're having any problem, please raise an issue on GitHub and the Resin.io team will be happy to help.

Tests

Run the test suite by doing:

$ gulp test

Contribute

Before submitting a PR, please make sure that you include tests, and that coffeelint runs without any warning:

$ gulp lint

License

The project is licensed under the Apache 2.0 license.

Package Sidebar

Install

npm i resin-config-json

Weekly Downloads

2

Version

2.0.0

License

Apache-2.0

Unpacked Size

23.5 kB

Total Files

12

Last publish

Collaborators

  • balena.io