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

fabric8-analytics-dependency-editor-jyas

v0.0.1

Published

Dependency editor

Downloads

11

Readme

= Fabric8 Analytics Dependency Editor

image:https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic%20release-b4d455.svg[Semantic Release, link="https://github.com/semantic-release/semantic-release"]

Fabric8 Analytics Dependency Editor is a stack analysis feature.

== Running the app

=== Set NODE_ENV If you're just trying to test the application, please use inmemory mode which will load the app with mock data for you. If you, however, want to contribute to the codebase, unset it back or to "development" (default) mode and rebuild.

[source,shell]

$ export NODE_ENV=inmemory # <1> 
$ export NODE_ENV=development # <2>
$ export NODE_ENV=production # <3>

<1> In-memory mode for trying-out the app
<2> Development mode for contributing to the source
<2> Production mode for deploying the application

Once you're done setting the environment, you can proceed with the next step(s)

NOTE: If you're directly trying to run the app in dev mode, you can skip this step, as NODE_ENV is treated as "development" by default.

=== First run

If you're trying to run the app for the first time:

$ npm install

Then, start the app with:

$ npm start

=== Fresh run

If you trying to refresh your installation, you need to run:

$ npm run reinstall

Then, start the app with:

$ npm start

=== Testcase run

To run the linter, unit tests, and functional test use:

$ npm test

== Other useful scripts

The package.json file's scripts: section lists all the tasks we run.

Here are some of the most useful/frequently used scripts you may need to run:

[cols="1,2,4", options="header"] |=== |Scipt |Command |Description

|Lint |$ npm run lint |Runs the TypeScript and Angular 2 linter

|Validation |$ npm run validate |Validates the webpack build

|Unit Tests |$ npm run test:unit |Runs the unit tests

|Functional Tests |$ npm run test:func |Runs the functional tests

|Continuous Tests |$ npm run watch:test |Looks for changes in source code and runs unit tests |===

== Building the app

=== Production build

To generate production build, set API URL and run build script as follows:


$ npm run build:prod

The build output will be under dist directory.

To create a docker image, run this command immediately after the production build completion:

=== Library Build

==== For production:

To build the fabric8-stack-analysis-ui as an npm library, use:


$ npm run build

The created library will be placed in dist.

IMPORTANT: You shouldn't ever publish the build manually, instead you should let the CD pipeline do a semantic release.

==== For development:

To build fabric8-analytics-dep-editor as an npm library and embed it into a webapp such as fabric8-ui, you should:

Step 1: Run npm run watch:library in the source directory:: This will build fabric8-analytics-dep-editor as a library and then set up a watch task to rebuild any ts, html and scss files you change.

Step 2: Run npm link <path to fabric8-stack-analysis-ui>/dist-watch --production:: In the webapp into which you are embedding. This will create a symlink from node_modules/fabric8-analytics-dep-editor to the dist-watch directory and install that symlinked node module into your webapp.

Step 3: Run your webapp in development mode:: Make sure you have a watch on node_modules/fabric8-analytics-dep-editor enabled. You will have access to both JS and SASS sourcemaps if your webapp is properly setup.

NOTE: fabric8-ui is setup to do reloading and sourcemaps automatically when you run npm start.

** To hit stack analysis api in standalone mode** Put a token in the environment variable with key as 'STACK_API_TOKEN'.

== CSS and LESS

fabric8-analytics-dep-editor uses LESS for it's stylesheets. It also uses the Angular emulation of the shadow dom, so you will normally want to place your styles in the .component.LESS file next to the html and the typescript.

We use mixins to avoid polluting components with uncessary style classes, and to avoid an explosion of shared files.

The src/assets/stylesheets/ directory includes a shared directory. These are shared global styles that we will refactor out in to a shared library at some point. Only update these styles if you are making a truly global style, and are going to synchronise your changes across all the various UI projects.

== Contributing to the app

The development guide is part of the link:./CONTRIBUTING.adoc[contributors' instructions]. Please check it out in order to contribute to this project.