update tsconfig
This commit is contained in:
parent
69d30c3897
commit
2e0b5b57db
@ -5,17 +5,25 @@
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "push.rocks",
|
||||
"gitrepo": "smartmanifest",
|
||||
"description": "a module for creating web app manifests",
|
||||
"description": "A toolkit for constructing web application manifests with TypeScript support.",
|
||||
"npmPackagename": "@push.rocks/smartmanifest",
|
||||
"license": "MIT",
|
||||
"projectDomain": "push.rocks"
|
||||
"projectDomain": "push.rocks",
|
||||
"keywords": [
|
||||
"web app manifest",
|
||||
"service worker",
|
||||
"PWA",
|
||||
"TypeScript",
|
||||
"node.js",
|
||||
"web development"
|
||||
]
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
10
package.json
10
package.json
@ -2,7 +2,7 @@
|
||||
"name": "@push.rocks/smartmanifest",
|
||||
"version": "2.0.2",
|
||||
"private": false,
|
||||
"description": "a module for creating web app manifests",
|
||||
"description": "A toolkit for constructing web application manifests with TypeScript support.",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"author": "Lossless GmbH",
|
||||
@ -35,5 +35,13 @@
|
||||
"type": "module",
|
||||
"browserslist": [
|
||||
"last 1 chrome versions"
|
||||
],
|
||||
"keywords": [
|
||||
"web app manifest",
|
||||
"service worker",
|
||||
"PWA",
|
||||
"TypeScript",
|
||||
"node.js",
|
||||
"web development"
|
||||
]
|
||||
}
|
1
readme.hints.md
Normal file
1
readme.hints.md
Normal file
@ -0,0 +1 @@
|
||||
|
132
readme.md
132
readme.md
@ -1,40 +1,118 @@
|
||||
# @pushrocks/smartmanifest
|
||||
# @push.rocks/smartmanifest
|
||||
a module for creating web app manifests
|
||||
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartmanifest)
|
||||
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartmanifest)
|
||||
* [github.com (source mirror)](https://github.com/pushrocks/smartmanifest)
|
||||
* [docs (typedoc)](https://pushrocks.gitlab.io/smartmanifest/)
|
||||
## Install
|
||||
|
||||
## Status for master
|
||||
To start using `@push.rocks/smartmanifest`, first, you need to install it through npm or yarn. Here’s how you can do it using npm:
|
||||
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/smartmanifest/badges/master/pipeline.svg)](https://lossless.cloud)
|
||||
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/smartmanifest/badges/master/coverage.svg)](https://lossless.cloud)
|
||||
npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/smartmanifest)](https://lossless.cloud)
|
||||
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/pushrocks/smartmanifest)](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/smartmanifest)](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartmanifest)](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartmanifest)](https://lossless.cloud)
|
||||
```sh
|
||||
npm install @push.rocks/smartmanifest --save
|
||||
```
|
||||
|
||||
Or, if you are using yarn, you can do:
|
||||
|
||||
```sh
|
||||
yarn add @push.rocks/smartmanifest
|
||||
```
|
||||
|
||||
This will add `@push.rocks/smartmanifest` to your project dependencies and you're ready to start using it to generate web app manifests with ease.
|
||||
|
||||
## Usage
|
||||
|
||||
## Contribution
|
||||
The `@push.rocks/smartmanifest` module simplifies the creation of web app manifests, providing a straightforward TypeScript interface to construct and output manifest files, which are essential for modern web applications. Here’s how to get started:
|
||||
|
||||
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). :)
|
||||
### Basic Example
|
||||
|
||||
Create an instance of `SmartManifest` by importing the module and configuring it with essential manifest properties:
|
||||
|
||||
## Contribution
|
||||
```typescript
|
||||
// Import the module
|
||||
import { SmartManifest, ISmartManifestConstructorOptions } from '@push.rocks/smartmanifest';
|
||||
|
||||
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). :)
|
||||
// Define manifest options
|
||||
const manifestOptions: ISmartManifestConstructorOptions = {
|
||||
name: 'Your App Name',
|
||||
short_name: 'AppName',
|
||||
start_url: '/',
|
||||
display: 'standalone',
|
||||
theme_color: '#000000',
|
||||
background_color: '#ffffff',
|
||||
icons: [
|
||||
{
|
||||
src: 'icons/icon-192x192.png',
|
||||
sizes: '192x192',
|
||||
type: 'image/png'
|
||||
},
|
||||
{
|
||||
src: 'icons/icon-512x512.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
// Create SmartManifest instance
|
||||
const yourAppManifest = new SmartManifest(manifestOptions);
|
||||
|
||||
## Legal
|
||||
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||
// Output the manifest as a JSON string
|
||||
console.log(yourAppManifest.jsonString());
|
||||
```
|
||||
|
||||
This example shows the creation of a simple web app manifest using `@push.rocks/smartmanifest`. Essential attributes such as `name`, `short_name`, `start_url`, `display`, `theme_color`, `background_color`, and `icons` are specified in the `ISmartManifestConstructorOptions`.
|
||||
|
||||
### Advanced Configuration
|
||||
|
||||
The module also allows for more advanced configuration of the manifest, supporting fields for orientation, related applications, and even custom extensions. For example, setting the manifest to encourage the application to be shown in a fullscreen mode with a specific orientation or setting related applications for app stores:
|
||||
|
||||
```typescript
|
||||
import { SmartManifest, ISmartManifestConstructorOptions } from '@push.rocks/smartmanifest';
|
||||
|
||||
const advancedManifestOptions: ISmartManifestConstructorOptions = {
|
||||
name: 'Advanced App',
|
||||
short_name: 'AdvApp',
|
||||
display: 'fullscreen',
|
||||
orientation: 'landscape',
|
||||
related_applications: [
|
||||
{
|
||||
platform: 'play',
|
||||
id: 'com.example.app'
|
||||
}
|
||||
],
|
||||
// Further customization here
|
||||
};
|
||||
|
||||
const advancedAppManifest = new SmartManifest(advancedManifestOptions);
|
||||
|
||||
console.log(advancedAppManifest.jsonString());
|
||||
```
|
||||
|
||||
### Working with Icons
|
||||
|
||||
The icons field in the manifest is particularly important for ensuring your application has a compelling presence on the user's home screen and within task switchers across various platforms. `@push.rocks/smartmanifest` allows you to specify multiple icons, different dimensions, and purposes (for example, any, maskable, or monochrome).
|
||||
|
||||
### Using the Output
|
||||
|
||||
Once you have generated the JSON string representation of your web app's manifest, you can write this to a `manifest.json` file at the root of your web project or serve it dynamically via a web server. Ensuring the manifest is correctly linked within your application's `<head>` section with `<link rel="manifest" href="/manifest.json">` is crucial for the web app to be recognized as such by browsers and platforms.
|
||||
|
||||
### Conclusion
|
||||
|
||||
By leveraging `@push.rocks/smartmanifest`, developers can streamline the generation of web app manifests, ensuring their applications meet the criteria for progressive web apps (PWAs) and providing a superior user experience across devices and platforms. The use of TypeScript for configuration encapsulates the complexity of manifest generation, making the process more intuitive and error-free.
|
||||
|
||||
## 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.
|
||||
|
Loading…
Reference in New Issue
Block a user