
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@noths/shared-components
Advanced tools
Set of shareable noths components
You will need both, the @noths/vendor-bundle
and @noths/shared-components
to use shared-components. The vendor bundle contains the react
and react-dom
and redux
dependencies.
Your application must use the same version of the vendor-bundle dependencies.
Install vendor bundle dependencies
npm install react@16.2.0 react-dom@16.2.0 redux@3.7.2
Install from NPM
npm install @noths/shared-components
npm install @noths/vendor-bundle
You will need the following in your package.json
:
"@noths/shared-components": "file:../frontend-packages/packages/shared-components",
"@noths/vendor-bundle": "file:../frontend-packages/packages/vendor-bundle",
PS: Don't forget to run npm run build
to generate the latest build for each package before starting to use it.
There is a separate import location to get the styled component version of a shared component
import { Button } from '@noths/shared-components/styled';
You can continue doing imports from both styled and the BEM/Scss implementation while migrating to styled components:
import { FormInput } from '@noths/shared-components';
import { Button } from '@noths/shared-components/styled';
This package generates <script>
and <style>
tags for integrating into your template.
In your template generator (your server.js or webpack config):
// 1. import utilities
import { createJsTag as createVendorJsTag } from '@noths/vendor-bundle';
import { createStyleTag, createJsTag } from '@noths/shared-components';
// 2. Generate tags, using development mode if needed
let sharedComponentsStyle = createStyleTag({ isDev });
let sharedComponentsJs = createJsTag({ isDev });
let vendorJS = createVendorJsTag({ isDev });
<!DOCTYPE html>
<html>
<head>
<title>App</title>
<!-- Shared-components style integration -->
{{{ sharedComponentsStyle }}}
</head>
<body>
<!-- Your Markup Container -->
<div id="app">{{{ renderedHtml }}}</div>
<!-- Shared-components javascript integration -->
{{{ vendorJS }}}
{{{ sharedComponentsJs }}}
<!-- Your Client App -->
<script src="{{ assets.app.js }}"></script>
</body>
</html>
const SharedComponentsPlugin = require('@noths/shared-components').SharedComponentsPlugin;
// Add the plugin to the webpack configuration
{
...
loaders: ...,
plugins: [new SharedComponentsPlugin()],
}
Import your shared-components like so:
import { Button } from '@noths/shared-components';
On the root folder run
npm run bootstrap
As part of a merge into main, storybook will be updated and made available here: http://unwrapped.notonthehighstreet.com/frontend-packages
To run and use storybook use the following command:
npm run storybook
Generate assets:
npm run build
Release version
npm version (major|minor|patch|[...tag])
npm publish
Beta version
npm run prerelease
FAQs
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.