Skip to content

renatoargh/ghwiki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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-test.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('Testing...', err => {
      if (err) {
        throw err
      }

      wiki.cleanup()
    })
  })
})

MIT

About

Helps cloning github wiki repositories programatically

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published