Removing the need for Lerna by converting to a single npm package.
At present contains 2 packages: calculate-distance-util and simple-loading-component.
- npm install
- 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
- npm run test (will run all tests)
- npm run build
- npm publish --access public (will automatically run prepublish first)
<pre>
|-- dist (Compiled)
| `-- index.js
|-- src
| |-- calculate-distance-utils
| |-- simple-loading-spinner
| `-- index.js
`-- webpack.config.js
</pre>
Given a set of 4 coordinates calculates the distance in KM between them.
import { calculateDistance } from "@lmeikle/my-mono-repo-to-single-package";
let distance = calculateDistance(a, b, c, d);
Renders a simple react loading spinner.
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;