"description":"A toolkit for constructing web application manifests with TypeScript support.",
"npmPackagename":"@push.rocks/smartmanifest",
"description":"a module for creating web app manifests",
"npmPackagename":"@pushrocks/smartmanifest",
"license":"MIT",
"projectDomain":"push.rocks",
"keywords":[
"web app manifest",
"service worker",
"PWA",
"TypeScript",
"node.js",
"web development"
]
"projectDomain":"push.rocks"
}
},
"npmci":{
"npmGlobalTools":[],
"npmAccessLevel":"public"
},
"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"
PackagePhobia (package size on registry) | [](https://lossless.cloud)
BundlePhobia (total size when bundled) | [](https://lossless.cloud)
## Usage
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:
## Contribution
### Basic Example
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). :)
Create an instance of `SmartManifest` by importing the module and configuring it with essential manifest properties:
```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). :)
// Create SmartManifest instance
const yourAppManifest = new SmartManifest(manifestOptions);
For further information read the linked docs at the top of this readme.
// 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 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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.