MAP/CP UI library
Setup
Install module and its dependencies
npm i --save-dev webpack-svgstore-plugin style-loader css-loader stylus-loader stylus
npm i --save cp-ui https://nexus.x2sy.com/repository/mgg-npm-private-group/
Add the following plugin to your webpack plugins
section:
new SvgStore({
svgoOptions: {
plugins: [
{removeComments: true},
{removeMetadata: true},
{removeTitle: true},
{removeDesc: true},
{removeEmptyText: true},
{removeAttrs: {attrs: '(stroke|fill|fill-opacity)' }},
{cleanupIDs: true },
],
},
prefix: '',
baseUrl: '',
}),
Add the following rules to your webpack module.rules
section:
{ test: /\.styl$/, loader: 'style-loader!css-loader!stylus-loader', }, { test: /\.css$/, loader: 'style-loader!css-loader', } ], },
Development
npm run start
Build
npm run build
Storybook
npm run storybook
npm run build-storybook
Publishing
https://wiki.x2sy.com/pages/viewpage.action?spaceKey=MGG&title=Megogo+NPM