Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-deploy-npm

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-deploy-npm

Publish your angular packages to npm by just run `npm deploy your-packages`

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20K
decreased by-1.45%
Maintainers
1
Weekly downloads
 
Created
Source

ngx-deploy-npm 🚀

NPM version The MIT License

Deploy your Angular Package to NPM directly from the Angular CLI! 🚀

Table of contents:


⚠️ Prerequisites

This command has the following prerequisites:

  • Angular project created via Angular CLI v8.3.0 or greater (execute ng update @angular/cli @angular/core to upgrade your project if necessary)

🚀 Quick Start (local development)

This quick start assumes that you already an existing Angular project with a publishable package created

  1. Add ngx-deploy-npm to your project. It will configure all your libraries present in the project

    ng add ngx-deploy-npm
    
  2. Deploy your library to NPM with all default settings. Your library will be automatically built in production mode.

    ng deploy your-library
    
  3. Your library should be published on npm. So go and check npm.js

🚀 Continuous Delivery

🚧 coming soon 🚧

📦 Options

--configuration
  • optional
  • Alias: -c
  • Default: production (string)
  • Example:
    • ng deploy – Angular project is build in production mode
    • ng deploy --configuration=test – Angular project is using the configuration test (this configuration must exist in the angular.json file)

A named build target, as specified in the configurations section of angular.json. Each named target is accompanied by a configuration of option defaults for that target. Same as ng build --configuration=XXX.

--tag
  • optional
  • Default: latest (string)
  • Example:
    • ng deploy --tag alpha – Your package will be available for download using that tag, npm install your-package@alpha useful for RC versions, alpha, betas.

Registers the published package with the given tag, such that npm install @ will install this version. By default, npm publish updates and npm install installs the latest tag. See npm-dist-tag for details about tags.

--access
  • Default: public (string)
  • Example:
    • ng deploy --access public

Tells the registry whether this package should be published as public or restricted. Only applies to scoped packages, which default to restricted. If you don’t have a paid account, you must publish with --access public to publish scoped packages.

--otp
  • optional
  • Default: public (string)
  • Example:
    • ng deploy --otp TOKEN

If you have two-factor authentication enabled in auth-and-writes mode then you can provide a code from your authenticator with this.

--dry-run
  • optional
  • Default: false (boolean)
  • Example:
    • ng deploy --dry-run

For testing: Run through without making any changes. Execute with --dry-run and nothing will happen. A list of options will be printed

📁 Configuration File

To avoid all these command-line cmd options, you can write down your configuration in the angular.json file in the options attribute of your deploy project's architect. Just change the kebab-case to lower camel case. This is the notation of all options in lower camel case:

  • access
  • configuration
  • dryRun
  • otp
  • tag

A list of all available options is also available here.

Example:

ng deploy your-library --tag alpha --access public --dry-run

becomes

"deploy": {
  "builder": "ngx-deploy-npm:deploy",
  "options": {
    "tag": "alpha",
    "access": "public",
    "dryRun": "true"
  }
}

And just run ng deploy 😄.

ℹ️ You can always use the --dry-run option to verify if your configuration is right.

🧐 Essential considerations

Readme and Licence

The licence and the readme must be in the root of the library. They are being copyed at the moment of deployment

Version bumping

This deployer do not bumps or creates a new version of the package, it just build the package/library, take the package.json as it and publish it.

You must take care about the version by yourself. Maybe using a script that sets the version

🏁 Next milestones

We are looking forward to the following features:

  • Implement Continuous Everything:
    • Integration
    • Inspection
    • Delivery
  • Specify which library add the deployer on the ng add
  • Compatibility with Nx
  • Continuous Delivery Documentation
  • Add all the RFC proposals of ngx-deploy-starter
  • ChangeLog Compatibility
  • Custom Readme and Licence Paths

Your feature that's not on the list yet?

We look forward to any help. PRs are welcome! 😃

License

Code released under the MIT license.

🚀 Powered By ngx-deploy-starter

Keywords

FAQs

Package last updated on 09 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc