update tsconfig

This commit is contained in:
Philipp Kunz 2024-04-14 18:37:25 +02:00
parent 3f99172ee9
commit f011ea4f5d
4 changed files with 118 additions and 31 deletions

View File

@ -5,17 +5,25 @@
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "tapbundle-fs",
"description": "an fs extension for tapbundle",
"description": "An extension for tapbundle that adds filesystem functionalities.",
"npmPackagename": "@push.rocks/tapbundle-fs",
"license": "MIT",
"projectDomain": "push.rocks"
"projectDomain": "push.rocks",
"keywords": [
"tapbundle",
"filesystem",
"extension",
"typescript",
"testing",
"smartfile"
]
}
},
"npmci": {
"npmGlobalTools": [],
"npmAccessLevel": "public"
},
"tsdocs": {
"tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
}
}

View File

@ -2,7 +2,7 @@
"name": "@push.rocks/tapbundle-fs",
"version": "1.0.4",
"private": false,
"description": "an fs extension for tapbundle",
"description": "An extension for tapbundle that adds filesystem functionalities.",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
@ -39,5 +39,13 @@
"cli.js",
"npmextra.json",
"readme.md"
],
"keywords": [
"tapbundle",
"filesystem",
"extension",
"typescript",
"testing",
"smartfile"
]
}

1
readme.hints.md Normal file
View File

@ -0,0 +1 @@

124
readme.md
View File

@ -1,39 +1,109 @@
# @pushrocks/tapbundle-fs
# @push.rocks/tapbundle-fs
an fs extension for tapbundle
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/tapbundle-fs)
* [gitlab.com (source)](https://gitlab.com/pushrocks/tapbundle-fs)
* [github.com (source mirror)](https://github.com/pushrocks/tapbundle-fs)
* [docs (typedoc)](https://pushrocks.gitlab.io/tapbundle-fs/)
## Install
To install `@push.rocks/tapbundle-fs`, you need to have Node.js installed on your system. If you have Node.js and npm (Node Package Manager) set up, you can install this package by running the following command in your terminal:
## Status for master
```bash
npm install @push.rocks/tapbundle-fs --save
```
Status Category | Status Badge
-- | --
GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/tapbundle-fs/badges/master/pipeline.svg)](https://lossless.cloud)
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/tapbundle-fs/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/tapbundle-fs)](https://lossless.cloud)
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/pushrocks/tapbundle-fs)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/tapbundle-fs)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/tapbundle-fs)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/tapbundle-fs)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
Make sure you are in your project directory or have a `package.json` file in your current directory where you are running the npm install command. This will add `@push.rocks/tapbundle-fs` as a dependency to your project.
## Usage
Use TypeScript for best in class intellisense
This package is designed to extend `tapbundle` with file system functionalities, leveraging the capabilities of `@pushrocks/smartfile` for enhanced file handling in Node.js projects. Below are some examples of how to utilize `@push.rocks/tapbundle-fs` in your TypeScript projects using ESM syntax.
## Contribution
### Basic Setup
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
First, you need to import the functionalities you want to use from `@push.rocks/tapbundle-fs`.
For further information read the linked docs at the top of this readme.
```typescript
import * as tapbundleFs from '@push.rocks/tapbundle-fs';
```
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
### Using smartfile functionalities
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)
`@push.rocks/tapbundle-fs` exports all functionalities from `@pushrocks/smartfile`, which allows you to perform various file system operations such as reading from, writing to files, and more.
#### Reading a File
To read a file from the filesystem, you can use the `readFile` function from the `smartfile` export.
```typescript
import { smartfile } from '@push.rocks/tapbundle-fs';
async function readMyFile() {
const filePath = './myFile.txt';
const fileContent = await smartfile.fs.readTextFile(filePath);
console.log(fileContent);
}
readMyFile();
```
The `readTextFile` method is asynchronous and returns a promise that resolves to the content of the file as a string.
#### Writing to a File
Similarly, to write content to a file, utilize the `writeFile` function.
```typescript
import { smartfile } from '@push.rocks/tapbundle-fs';
async function writeMyFile() {
const filePath = './myNewFile.txt';
const fileContent = 'Hello, World!';
await smartfile.fs.writeTextFile(filePath, fileContent);
console.log('File written successfully');
}
writeMyFile();
```
#### Working with JSON Files
`smartfile` also simplifies working with JSON files with `readJsonFile` and `writeJsonFile`.
```typescript
import { smartfile } from '@push.rocks/tapbundle-fs';
async function readAndWriteJson() {
const filePath = './myData.json';
const data = await smartfile.fs.readJsonFile(filePath);
console.log('Data:', data);
data.newField = 'New value';
await smartfile.fs.writeJsonFile(filePath, data);
console.log('JSON file updated successfully');
}
readAndWriteJson();
```
### Conclusion
`@push.rocks/tapbundle-fs` extends `tapbundle` to incorporate file system functionalities seamlessly into your testing workflow, powered by `@pushrocks/smartfile`. With this package, you have a powerful set of tools to manipulate files in your Node.js applications, making it easier to handle a variety of file operations including reading, writing, and modifying files.
Remember, the key to effectively utilizing `@push.rocks/tapbundle-fs` lies in understanding the underlying `@pushrocks/smartfile` package. For more comprehensive operations and features such as glob patterns, file copying, and directory scanning, refer to the `@pushrocks/smartfile` documentation.
By integrating file system operations within your `tapbundle` tests or Node.js applications, you can automate and enhance your testing and file handling capabilities, ensuring a more robust and maintainable codebase.
## License and Legal Information
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
### Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
### Company Information
Task Venture Capital GmbH
Registered at District court Bremen HRB 35230 HB, Germany
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.