Skip to content

Instantly share code, notes, and snippets.

Tutorial adding npm dependencies

Foreman manage npm dependencies with a seperate project called [@theforeman/vendor] which responsible to deliver 3rd-party modules to foreman and its plugins. Foreman and its plugins consumes [@theforeman/vendor] project from npm in development and from rpm in production.

[@theforeman/vendor] lives inside a monorepo together with other foreman javascript tools in a project called [foreman-js].

In this tutorial you will learn how to add a new dependency to be available for foreman and it's plugins.

@sharvit
sharvit / slot-and-fill.js
Created August 18, 2019 15:46
Slot and fill suggestion
const LayoutToolbarButtonsSlot = () => (<>
<Slot id="layout-toolbar-buttons" multi />
<Fill slot="layout-toolbar-buttons" weight={100}>
<ExportButton />
</Fill>
<Fill slot="layout-toolbar-buttons" weight={200}>
<DocumentationButton documentationURL={documentationURL} />
</Fill>
</>);
import React from 'react';
import ForemanModal, { reducers } from './index';
import { setModalOpen, setModalClosed } from './ForemanModalActions';
import IntegrationTestHelper from '../../common/IntegrationTestHelper';
describe('ForemanModal - integration test', () => {
it('should flow', () => {
const integrationTestHelper = new IntegrationTestHelper(reducers);
/* eslint-disable no-await-in-loop, no-console */
const { sleep } = require('../helpers');
const { createNetworkProvider } = require('../web3');
class BlocktimeMonitor {
network;
protocol;