Skip to content

Commit

Permalink
Update pubspec.yaml and README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fatihsever committed Jan 16, 2024
1 parent f86cb14 commit cdccf53
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ Developed with 💙 by [Fatih Sever][fatihsever_link]
Please visit the [official documentation][docs_link].

## Installation 💻
### From pub:
For quick start, please include the following in pubspec.yaml
```yaml
dependencies:
kubeconfig: 1.0.0+1
```
For more information, please visit the [pub.dev](https://pub.dev/packages/kubeconfig/install)
### From npm:
`kubeconfig` compiled to JavaScript, as an npm package. You can add it to your project using the command below.
```bash
Expand All @@ -36,10 +28,28 @@ npm install --save kubeconfig

For more information, please visit the [npmjs.com](https://www.npmjs.com/package/kubeconfig)

### From pub:
For quick start, please include the following in pubspec.yaml
```yaml
dependencies:
kubeconfig: 1.0.0+1
```
For more information, please visit the [pub.dev](https://pub.dev/packages/kubeconfig/install)
## Quick Start 🚀
Validating a kubeconfig file:
### JavaScript:
```javascript
import { readFileSync } from 'fs';
import { Kubeconfig } from './kubeconfig';

let kubeconfigYaml = readFileSync('kube/config.yaml');
let kubeconfig = Kubeconfig.fromYaml(kubeconfigYaml);
let validationResult = kubeconfig.validate();
```

### Dart:
```dart
import 'dart:io';
Expand All @@ -52,27 +62,17 @@ void main() {
}
```

### JavaScript:
```javascript
import { readFileSync } from 'fs';
import { Kubeconfig } from './kubeconfig';
let kubeconfigYaml = readFileSync('kube/config.yaml');
let kubeconfig = Kubeconfig.fromYaml(kubeconfigYaml);
let validationResult = kubeconfig.validate();
```

## Examples 📋
### Dart:
- **Validate**: [example/dart/validate.dart](example/validate.dart)
- **Convert**: [example/dart/convert.dart](example/convert.dart)
- **Merge**: [example/dart/merge.dart](example/merge.dart)

### Javascript:
- **Validate**: [example/js/validate.js](example/validate.js)
- **Convert**: [example/js/validate.js](example/validate.js)
- **Merge**: [example/js/validate.js](example/validate.js)

### Dart:
- **Validate**: [example/dart/validate.dart](example/validate.dart)
- **Convert**: [example/dart/convert.dart](example/convert.dart)
- **Merge**: [example/dart/merge.dart](example/merge.dart)

[kubeconfig_logo]: assets/logo.svg
[kubeconfig_link]: https://fatihsever.github.io/kubeconfig-lib/
[ci_badge]: https://github.com/fatihsever/kubeconfig-lib/actions/workflows/ci.yml/badge.svg?branch=main
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: kubeconfig
description: Kubeconfig utility. Validate, convert, and merge kubeconfig files.
description: Kubeconfig utility library for Javascript and Dart. Validate, convert, or merge kubeconfig files.
version: 1.0.0+1
repository: https://github.com/fatihsever/kubeconfig-lib

Expand Down

0 comments on commit cdccf53

Please sign in to comment.