npm-publish-programmatically

1.0.1 • Public • Published

npm-publish-programatically

publish a thing to npm. but without touching the filesystem or anything like that.

installation

npm install npm-publish-programatically

usage

const npmPublishProgramatically = require('npm-publish-programatically');
 
npmPublishProgramatically({
  'package.json': {
    name: 'cool-package',
    version: '1.0.0',
    main: 'index.js'
  },
 
  'main.js': `module.exports = function(greeting) {
    console.log('hello ' + greeting)
  }`
}, {
  auth: {
    token: 'ffffffff-ffff-ffff-ffff-ffffffffffff'
  }
}).then(
  () => console.log('publish succeeded'),
  err => console.error('publish failed', err)
);

options

auth: {token} (required)

provide your npm auth token. you probably have one in ~/.npmrc.

registry

npm registry url. it's probably https://registry.npmjs.com, which is the default.

access

public for public packages (default), private for private packages.

licence

ISC

Readme

Keywords

none

Package Sidebar

Install

npm i npm-publish-programmatically

Weekly Downloads

4

Version

1.0.1

License

MIT

Last publish

Collaborators

  • quarterto