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

@jenkins-cd/blueocean-dashboard

v1.0.0-alpha.1

Published

Dashboard for Jenkins Blue Ocean

Downloads

12

Readme

Dashboard plugin

This plugin provides the main Dashboard user interface for Blue Ocean. It has a bunch of GUI components and extension points for other plugins to extend. This is where the fun happens.

Running and modifying this plugin

With mvn

  1. Go into blueocean and run mvn hpi:run in a terminal. (mvn clean install from the root of the project is always a good idea regularly!)
  2. From this directory, run npm run bundle:watch to watch for JS changes and reload them.
  3. Open browser to http://localhost:8080/jenkins/blue/ to see this
  4. hack away. Refreshing the browser will pick up changes. If you add a new extension point or export a new extension you may need to restart the mvn hpi:run process.

With npm/storybook

We are supporting React Storybook https://voice.kadira.io/introducing-react-storybook-ec27f28de1e2#.8zsjledjp

npm run storybook

Then it’ll start a webserver on port 9001. Further on any change it will refresh the page for you on the browser. The design is not the same as in blueocean yet but you can fully develop the components without a running jenkins,

Writing Stories

Basically, a story is a single view of a component. It's like a test case, but you can preview it (live) from the Storybook UI.

You can write your stories anywhere you want. But keeping them close to your components is a pretty good idea.

Let's write some stories:

// src/main/js/components/stories/button.js

import React from 'react';
import { storiesOf, action } from '@kadira/storybook';

storiesOf('Button', module)
  .add('with a text', () => (
    <button onClick={action('clicked')}>My First Button</button>
  ))
  .add('with no text', () => (
    <button></button>
  ));

Here, we simply have two stories for the built-in button component. But, you can import any of your components and write stories for them instead.

Configurations for storybook

Now you need to tell Storybook where it should load the stories from. For that, you need to add the new story to the configuration file .storybook/config.js:

// .storybook/config.js
import { configure } from '@kadira/storybook';

function loadStories() {
  require('../src/main/js/components/stories/index');
  require('../components/stories/button'); // add this line
}

configure(loadStories, module);

or to the src/main/js/components/stories/index.js (this is the preferred way):

// src/main/js/components/stories/index.js
require('./pipelines');
require('./status');
require('./button'); // add this line

That's it. Now simply run “npm run storybook” and start developing your components.

Running Tests

Tests are run via jest using the gulp-jest plugin. Three modes of execution are supported:

npm run test

Runs jest and outputs JUnit test reports and code coverage metrics, in the 'reports' and 'coverage' dirs. This is the "full" execution that is run in CI.

npm run test-fast

Runs jest without test reports or coverage. Fastest run, useful for local development.

npm run test-debug

Runs jest in debug mode listening on localhost:5858. You must attach a debugger for execution to proceed. Test reports and coverage are skipped.

Running select test(s)

All of the above profiles support executing one or more tests via jest's testPathPattern parameter:

npm run test:fast -- --test test/js/UrlUtils-spec.js # one test

npm run test:fast -- --test /capability/ # any tests in a 'capability' dir

npm run test:fast -- --test Url # any test with 'Url' in the name

Linting with npm

ESLint with React linting options have been enabled.

npm run lint

lint:fix

You can use the command lint:fix and it will try to fix all offenses, however there maybe some more that you need to fix manually.

npm run lint:fix

lint:watch

You can use the command lint:watch and it will give rapid feedback (as soon you save, lint will run) while you try to fix all offenses.

gulp lint:watch --continueOnLint