Skip to content

lmeikle/my-mono-repo-to-single-package

Repository files navigation

my-mono-repo-to-single-repo

Removing the need for Lerna by converting to a single npm package.
At present contains 2 packages: calculate-distance-util and simple-loading-component.

Download and Installation:
  • npm install
Running locally:
  • npm run start

Using storybook to test things without having to link from another project.
Need the alpha version of storybook to work with webpack 4.
npm i -g @storybook/cli@alpha
npm i --save-dev @storybook/react@alpha

Testing:
  • npm run test (will run all tests)
Building:
  • npm run build
Publishing:
  • npm publish --access public (will automatically run prepublish first)

Structure

<pre>
|-- dist (Compiled)
|   `-- index.js
|-- src
|   |-- calculate-distance-utils
|   |-- simple-loading-spinner
|   `-- index.js
`-- webpack.config.js
</pre>

calculate-distance-util

Given a set of 4 coordinates calculates the distance in KM between them.

Example:

import { calculateDistance } from "@lmeikle/my-mono-repo-to-single-package";

let distance = calculateDistance(a, b, c, d);

simple-loading-spinner

Renders a simple react loading spinner.

Example:

import React, { Component } from "react";
import { LoadingComponent } from "@lmeikle/my-mono-repo-to-single-package";

class HelloWorld extends Component {
  render() {
    return <LoadingComponent />;
  }
}
export default HelloWorld;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published