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

predeploy-builder

v1.1.0

Published

a builder used to generate api at apiary and update client lib on npm

Downloads

5

Readme

predeploy-builder

A builder used to generate an api at apiary/generate client lib and publish client lib to npm

##Requirements

1.Install swagger-codegen command line tools at https://github.com/swagger-api/swagger-codegen
2.npm install -g cli-codegen 
3.Easiest to run this code while app is running and swagger is at localhost:8000/swagger.json
4.Look at https://www.npmjs.com/package/cli-codegen if swagger location different.

##Example First:

npm install predeploy-builder

Next:

var builder = require('builder');

var config  = {
	client: { //required for .makeClientLib(),writePackage() and publish() 
		file: 'File name' //not required,
		classname: 'classname for javascript gen' //required for js
		language: 'language to generate lib for' //required
	}
	apiary : {
		token: 'your apiary account token' //required
		name: 'your apiary api name' //required,
		sub_domain: 'This is used to point readme to your proper api location in apiary' //required for writeReadme()
	}
	package: { //Anything not passed in will be pulled from project package file that was used to generate lib
		name: 'name that will go in package' //not required
		version: 'version that will go in package' //not required
		description: 'description that will go in package' //not required
		author: 'author that will go in package' //not required
		license: 'license that will go in package' //not required
	}
	port: 'port your api is hosted on' // will default to 8000 if not passed in
}	

var build = new builder(config);

###genDocs: Note: right now you can only push docs that are in .yaml format

build.genDocs( (err,result) => {} )

//This Method is used to publish api to apiary

###makeClientLib:

build.makeClientLib( (err,result => {} )

//This Method is used to generate client library for a language based on config from earlier.

###writePackage

build.writePackage( (err,result) => {} )

//this Method is used to write a package file in order to prep for npm publish

###writeReadme

build.writeReadme ( (err,result) => {} )

//This Method is used to write a readme.md pointing to apiary docs.	

###publish

build.publish( (err,result) => {} )

//This method is used to publish the newly made client lib to npm

###Note: makeClientLib(),writePackage() and publish() should all be used togeather. Only makeClientLib() can work on its own.