@commonsku/styles
v1.17.59
Published
Common React components by commonsku
Downloads
469
Readme
https://www.commonsku.com/
// with npm
npm install @commonsku/styles
Styleguide
// with npm
npm run styleguide
You can also check out the src/App.tsx to see how to import in your projects
Testing
Local development
npm start
Testing locally with main repo
You can add this into the ~/.bashrc
or ~/.profile
Below code adds commnand cskustyled
to build and install commonsku styles into your local project
CSKU_DEV_DIR="$HOME/projects/PROJ_NAME"
CSKU_STYLES_DIR="$HOME/projects/commonsku-styles"
function fn_cskustyled() {
CSKUS_PKG_VERSION=$(cat $CSKU_STYLES_DIR/package.json 2>&1 | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]')
touch $CSKU_STYLES_DIR/dist && rm -r $CSKU_STYLES_DIR/dist \
&& touch $CSKU_STYLES_DIR/commonsku-styles-$CSKUS_PKG_VERSION.tgz && rm $CSKU_STYLES_DIR/commonsku-styles-$CSKUS_PKG_VERSION.tgz \
&& touch $CSKU_DEV_DIR/commonsku-styles-$CSKUS_PKG_VERSION.tgz && rm $CSKU_DEV_DIR/commonsku-styles-$CSKUS_PKG_VERSION.tgz \
&& cd $CSKU_STYLES_DIR \
&& npm run prepack \
&& npm pack \
&& cd $CSKU_DEV_DIR \
&& pm2 kill \
&& npm install $CSKU_STYLES_DIR/commonsku-styles-$CSKUS_PKG_VERSION.tgz \
&& npm run build:dll \
&& npm run start
}
alias cskustyled="fn_cskustyled"
From local
// add absolute path to package.json
"dependencies": {
"@commonsku/styles": "/abosolute/path/commonsku-styles",
}
From github
// add absolute path to package.json
"dependencies": {
"@commonsku/styles": "commonsku/commonsku-styles#branch-name",
}
From npm
// add absolute path to package.json
"dependencies": {
"@commonsku/styles": "^1.0.0",
}