
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@citydev/ui-library
Advanced tools
To provide a consistent and standard UI design, a new standalone UI library package @citydev/ui-library is extracted and updated from the previous esb-ui-web in buildings project. Together with the storybook, you can refer for UI layout, API interface, and basic use cases. Please follow the steps below to proceed with library migration or adoption.
@citydev:registry= http://npm.envisioncn.com:7001/
yarn add @citydev/ui-library
import { Button } from '@citydev/ui-library';
import Button from '@citydev/ui-library/lib/components/Button';
import * as React from 'react';
import DemoPage from './pages/DemoPage';
import { theme } from '@citydev/ui-library/lib/theme.css';
function App() {
React.useLayoutEffect(() => {
document.body.classList.add(theme);
return () => {
document.body.classList.remove(theme);
};
}, []);
return <DemoPage />;
}
export default App;
Update webpack config file For multirepo project, just update in webpack config in the root directory. For monorepo project, update webpack config inside those modules that dependent on @citydev/ui-library
Vanilla-extract is used in our library. To let the predefined style work properly, webpack config needs to update. To setup vanilla-extract, please follow vanilla-extract setup
const { VanillaExtractPlugin } = require('@vanilla-extract/webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
plugins: [new VanillaExtractPlugin(), new MiniCssExtractPlugin()],
module: {
rules: [
{
test: /\.vanilla\.css$/i, // Targets only CSS files generated by vanilla-extract
use: [
MiniCssExtractPlugin.loader,
{
loader: require.resolve('css-loader'),
options: {
url: false, // Required as image imports should be handled via JS/TS import statements
},
},
],
},
],
},
};
Vanilla-extract let developers write styles locally in TypeScript file and generate static CSS files at build time. When import @citydev/ui-library, we need to include @citydev/ui-library in js/jsx file that @vanilla-extract/babel-plugin can process the compiled css.js.
rules: [
{
test: /\.jsx?$/,
use: {
loader: 'babel-loader',
options: {
inputSourceMap: true,
sourceMaps: 'inline',
presets: [
["@babel/preset-env", { targets: "last 2 versions" }],
["@babel/preset-react"],
],
plugins: [
'@babel/plugin-syntax-dynamic-import',
'@vanilla-extract/babel-plugin',
],
},
},
include: [path.resolve(__dirname, "src")],
exclude: /node_modules(?!\/@citydev\/ui-library)/,
}
tsc -p tsconfig.json
You can visit storybook to view components demo and docs (still in progress to cover more)

demo
FAQs
city building UI library
We found that @citydev/ui-library demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.