npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@hortiview/generator-hortiview

v1.2.2

Published

Generator for a HortiView module-template.

Downloads

29

Readme

HortiView Template-Generator

This yeoman-generator creates the scaffolding for a HortiView-module. The module will be based on a create-react-app and uses craco to configure webpack to make use of the module federation.
The generator creates the whole structure for a complete module, including the integration of routing, localization and integration of the module-token to access the backend-services, when embedded in HortiView.
The template uses the @hortiview/shared-components and requires access to the element-library of bayer (via the artifactory)

IF YOU DON'T HAVE ACCESS YET, ANWSER THE SECOND PROMPT WITH NO (n)

Features

The base module and the template are still in an early stage of development and will be enhanced further with ongoing development time.

  • Routing - the routing works fully integrated with HortiView
  • Breadcrumb - the breadcrumb of HortiView will be updated automatically
  • Localization - language switch in HortiView will be detected by the module as well
  • Backend-Servicewrapper - the HortiView Backend is wrapped in the "HortiViewService" in the template. Its automatically instantiated and can be used via the useHortiView-Hooks
  • Farm-Endpoints - the endpoints can be used, but are currently not "predefined" by the template
  • User-Endpoints - the endpoints can be used, but are currently not "predefined" by the template
  • CommonData-Endpoints - the endpoints can be used, but are currently not "predefined" by the template
  • Service-Mocks - all requests to the backend can be mocked via the GetMockReponse-Function. Calls are automatically mocked, when running in standalone-mode
  • Standalone-Mode - when running the module locally, it will run in an standalone-mode, where dependencies to HortiView-Properties are either predefined or mocked, so you can still run/debug the module without using the local-debug-module of the HortiView-Dev-Environment
  • Depedencies-Check - you can set in the ModuleBase-Component, which Properties from HortiView are required for your module to make it work correctly. Otherwise an handled error message in HortiView will be generated

Installation

You need to install yeoman-generator:

npm install -g yo

Then you need to install the generator itself. It should be installed globally:

npm i -g @hortiview/generator-hortiview

We recommend to install yarn as package-manager:

npm install -g yarn

How to use the generator?

After installing the depencies, you can call the generator.
You should call this inside a newly created folder for project, e.g.: (create a folder)
e.g. mkdir sensor-management

(call the generator)

yo @hortiview/hortiview

Anwser the question for a project-name (in kebap case):
e.g. sensor-management

Choose if you have enough permission to use element-components or anwser with no :
n

After entering the project-name the generator creates all config files, scaffoldings and installs the depedencies via yarn.
When the installation is done, everything is set up and you can start the project.

Getting started after generating a template

You can use yarn start:dev to start the project with the debug-configuration.
That means, that the project will run on port 3001 - if you use our dev-environment, the project can be included in HortiView in runtime.
Just log into HortiView and open the debug module (the debug module is only availible in the development-enviroment).

If you start the project via yarn:start (without :dev) it will use the normal configuration.

Integration in HortiView

To create a fully builded module, that can be uploaded to HortiView as a module, you need to run yarn build.
After some seconds a build is created with the correct configuration (config is consumed via the hvconfig.json-file), that already should be correct.

The whole build-folder can be uploaded as a vendor via the vendor-portal with the configuration-values from hvconfig.json.