0.1.14 • Published 6 years ago
k8stypes v0.1.14
k8stypes
This repository contains TypeScript type definitions for Kubernetes resources.
Usage
Installation
npm install -D k8stypes;Usage
TypeScript
import { Deployment } from 'k8stypes/apps/v1/Deployment';
const deployment : Deployment = {/* ... */};
export deployment;JavaScript
/**
* @typedef {import('k8stypes/apps/v1/Deployment').Deployment} Deployment
*/
/** @type {Deployment} */
const deployment = {/* ... */};
module.exports = deployment;Development Runbook
All development should be done within the /src directory. The root directory is used only for publishing to NPM.
Retrieving the latest Kubernetes OpenAPI specification
npm run update;This has only been tested to work on Ubuntu.
Generating the TypeScript definitions
npm run generate;This will result in a
./srcdirectory containing the TypeScript definitions.
Building the JavaScript version
npm run build;This will result in the NPM publishable package at
./lib. Runnpm publishfrom./libof the repository to publish it:
Publishing the package
- Bump the appropriate version in
package.json - Commit the change
- Navigate to
./liband run:
npm publish;License
This code is licensed under the MIT license.