ghwiki

1.0.0 • Public • Published

ghwiki

Example

const Wiki = require('ghwiki')

const wiki = new Wiki({
  user: 'renatoargh',
  accessToken: 'yourTokenOrPassword',
  repo: 'renatoargh/ghwiki'
})

console.log('Cloning URL:', wiki.url())

wiki.clone(err => {
  if (err) {
    throw err
  }

  const path = wiki.path('/this-is-a-tes2t.md')
  fs.writeFileSync(path, '# Test!')

  wiki.ls((err, items) => {
    if (err) {
      throw err
    }

    console.log(wiki.path())
    console.log(JSON.stringify(items, null, 4))

    wiki.commitAndPush('Testando', err => {
      if (err) {
        throw err
      }

      wiki.cleanup()
    })
  })
})

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i ghwiki

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • gammasoft