update tsconfig

This commit is contained in:
Philipp Kunz 2024-04-14 18:07:00 +02:00
parent db3e5be830
commit 3595a56779
4 changed files with 112 additions and 30 deletions

View File

@ -8,14 +8,24 @@
"shortDescription": "a wrapper for parcel", "shortDescription": "a wrapper for parcel",
"npmPackagename": "@push.rocks/smartparcel", "npmPackagename": "@push.rocks/smartparcel",
"license": "MIT", "license": "MIT",
"projectDomain": "push.rocks" "projectDomain": "push.rocks",
"description": "A wrapper for Parcel to simplify its usage in Node.js projects.",
"keywords": [
"parcel",
"wrapper",
"typescript",
"build tool",
"package bundling",
"web development",
"node.js"
]
} }
}, },
"npmci": { "npmci": {
"npmGlobalTools": [], "npmGlobalTools": [],
"npmAccessLevel": "public" "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" "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/smartparcel", "name": "@push.rocks/smartparcel",
"version": "1.0.13", "version": "1.0.13",
"private": false, "private": false,
"description": "a wrapper for parcel", "description": "A wrapper for Parcel to simplify its usage in Node.js projects.",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts", "typings": "dist_ts/index.d.ts",
"author": "Lossless GmbH", "author": "Lossless GmbH",
@ -38,5 +38,14 @@
], ],
"browserslist": [ "browserslist": [
"last 1 chrome versions" "last 1 chrome versions"
],
"keywords": [
"parcel",
"wrapper",
"typescript",
"build tool",
"package bundling",
"web development",
"node.js"
] ]
} }

1
readme.hints.md Normal file
View File

@ -0,0 +1 @@

116
readme.md
View File

@ -1,39 +1,101 @@
# @pushrocks/smartparcel # @push.rocks/smartparcel
a wrapper for parcel a wrapper for parcel
## Availabililty and Links ## Install
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartparcel)
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartparcel)
* [github.com (source mirror)](https://github.com/pushrocks/smartparcel)
* [docs (typedoc)](https://pushrocks.gitlab.io/smartparcel/)
## Status for master To install `@push.rocks/smartparcel`, you'll need to run the following command using npm (or yarn, or your preferred npm client). Make sure you have Node.js installed on your machine before doing so.
Status Category | Status Badge ```bash
-- | -- npm install @push.rocks/smartparcel --save
GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/smartparcel/badges/master/pipeline.svg)](https://lossless.cloud) ```
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/smartparcel/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/smartparcel)](https://lossless.cloud) or if you are using yarn:
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/pushrocks/smartparcel)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud) ```bash
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) yarn add @push.rocks/smartparcel
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/smartparcel)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartparcel)](https://lossless.cloud) This will add `@push.rocks/smartparcel` as a dependency to your project and download it to your `node_modules` folder.
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartparcel)](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)
## Usage ## Usage
Use TypeScript for best in class intellisense To make the most out of `@push.rocks/smartparcel`, you need to understand how to integrate it into your project for bundling your assets using Parcel. This guide will walk you through setting up and using `@push.rocks/smartparcel` effectively in a TypeScript environment.
## Contribution First, ensure you are working in a TypeScript enabled project setup. This walkthrough assumes you have TypeScript configured and ready to go.
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). :) ### Step 1: Importing `@push.rocks/smartparcel`
For further information read the linked docs at the top of this readme. Start by importing the module where you intend to use it. Typically, this would be in your build process file or a specific script designated for handling your asset pipeline.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) ```typescript
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy) import { Parcel } from '@push.rocks/smartparcel';
```
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com) The key class here is `Parcel`, which is a wrapper around the Parcel bundler, providing you with a simplified and potential custom API tailored for your project needs.
### Step 2: Configuring the Parcel Instance
Before you can use the `Parcel` class to bundle your assets, you need to instantiate it with appropriate configuration. The configuration involves specifying the entry files, the output directory, and the output file name.
```typescript
// Define the configuration
const entryFiles = ['./src/index.html']; // Entry points for Parcel can be a single file or an array of files.
const outputDir = './dist'; // The directory where the output should be stored.
const outputFile = 'bundle.js'; // The name of the output file.
// Create a new Parcel instance
const myParcel = new Parcel(entryFiles, outputDir, outputFile);
```
In this setup, we're telling `@push.rocks/smartparcel` to take an `index.html` file located in the `src` directory, bundle it (alongside any assets it references), and output the results in a `dist` directory with `bundle.js` as the bundled file name.
### Step 3: Building or Watching with Server
#### Building Assets
To bundle your assets without watching for changes, you can use the `build` method.
```typescript
(async () => {
await myParcel.build();
})();
```
This approach is ideal for production builds where you only need to bundle your assets once.
#### Developing with Watch and Serve
During development, you might want your assets to be rebuilt automatically upon file changes. Additionally, serving these assets through a local server can be highly beneficial. `@push.rocks/smartparcel` allows you to watch assets and serve them using a single call.
```typescript
(async () => {
await myParcel.watchAndServe();
})();
```
This method starts a process that watches for file changes and serves the bundled assets on a local server, making development workflows more efficient and streamlined.
### Conclusion
`@push.rocks/smartparcel` offers a simplified, yet powerful, interface for working with Parcel in TypeScript projects. By wrapping the complexity of configuring Parcel into an easy-to-use API, it allows developers to focus more on development rather than build tool configuration. As shown in this guide, setting up and using `@push.rocks/smartparcel` is straightforward, making it an excellent choice for projects looking to leverage the power of Parcel with minimal setup.
Remember, the examples provided here are meant to get you started. Depending on your project's needs, you may need to adjust the configurations. Refer to the official Parcel documentation for more detailed information on the options and capabilities available.
## 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.