npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gitbook-setup

v1.3.13

Published

This is my first node package that will be for setup gitbook.

Downloads

178

Readme

README STILL IN WRITING PROCESS

Welcome to the gitbook-setup package

Coverage Status Build Status npm npm npm

If you've found this module to be useful and wish to support it, you may do so by visiting this pledgie campaign:

Motivation

Imagine to build...

Global installation

$ npm install -g gitbook-setup
$ gitbook-setup [help]

Local installation

$ npm install --save gitbook-setup

Usage

Doc creation

var gitbook_setup = require('gitbook-setup')

var info = {
  name: "title",
  deploys: "heroku"
}

gitbook_setup.create(info, (err, allInfo) => {
  if (err) console.log(err)
  else {
    console.log("Book summary: ")
    console.log(allInfo)
  }
})

Optionally info can have a path variable to create the document at that path:

var gitbook_setup = require('gitbook-setup')

var info = {
  name: "title",
  deploys: "heroku",
  path: "/home/rudy/Desktop/Docs/"
}

gitbook_setup.create(info, (err, allInfo) => {
  if (err) console.log(err)
  else {
    console.log("Book summary: ")
    console.log(allInfo)
  }
})

Doc installation

Dependencies

| Name | Version | |--------------|----------------------------------| | Nodejs | >= 8.x.x | | NPM | >= 3.x.x |

Possible commands

  • Create
  • Install
  • Deploy

Book creation

You have now three options for creating a book:

  • Passing book configuration through arguments.
  • Giving a file with the whole configuration.
  • In interactive form. The program will ask you for all information.

The creation of a book by interactive form is the most user-friendly. The argument form of creation is useful when you want to create a lot of books for example and fast for students. The file method of creation could be useful when you want to send through the network the book information to create it in other place for example I could send a file configuration to China and there they can create the book.

To create a book you have to execute

> gitbook-setup create [interactive (default) | args | file -f <filename> ]

By Arguments

If you want to create a book by arguments you have these fields:

  • -n bookname (required)
  • -t book (default) | api | faq | own:moduleName
  • -d heroku | gh-pages | moduleName
  • -a author/s
  • -i description

Example 1 - Simplest book

> gitbook-setup create args -n Sample

Will output: Sample 1

Example 2 - Simplest book with my own template

> gitbook-setup create args -n Sample -t own:myTemplate

Will output: Sample 1

Example 3 - Book deployed to Heroku

> gitbook-setup create args -n Sample -d heroku

Will output: Sample 1

Example 4 - Book deployed to Heroku and gh-pages

> gitbook-setup create args -n Sample -d heroku,gh-pages

Will output: Sample 1

Example 5 - Book titled 'Our Piano History' with the template 'Classical Sheets', deployed to heroku, gh-pages and my server 'BestMusic', written by Frederic Chopin and Sergei Rachmaninoff and with some description about the book

> gitbook-setup create args -n 'Our Piano History' -t own:'Classical Sheets' -d heroku,gh-pages,BestMusic -a 'Frederic Chopin','Sergei Rachmaninoff' -i 'Amazing story about our piano lifes'

Will output: Sample 1

By file

If you saw the output of the previous examples you have to create a file with the identical content. For example you want a book title myBook that allows deployment to heroku you have to create a file like that:

File 1

This file will create the same book:

File 2

Because by defaut the type is book.

The field name is a requirement. All other fields are optional.

Interactive

The program will just ask you for all fields and you will fill them.