Fig - library for gallery of Riot tag
You can check each component like a React Styleguidist by list.
It is also possible to check only specific component information.
https://www.npmjs.com/package/@t4y3/fig
Component | Types of Component | Full |
---|---|---|
Mount the custom tag specified in tags in the iframe.
It is for displaying and confirming the custom tag created.
Use it like a style guide.
npm i @t4y3/fig
# Server start
fig-start
Access localhost: 8080
- Please build and generate a static file
# Generate static file
fig-build
# or Specify the dist directory(default: dist)
fig-build docs
.fig/config.js
.fig/head.html
path/to/fig.js
Set the following rule in .fig/config.js
.
module.exports = {
'title': 'Your project name',
'bundle': 'dist/bundle.js',
'figures': [
'path/to/components1/fig.js',
'path/to/components2/fig.js',
'path/to/components3/fig.js'
]
};
title
- Title of the Styleguide- default:
Fig
- default:
bundle
- files required to display custom tags
<link rel="stylesheet" href="path/to/style.css">
<script type="text/javascript" src="path/to/script.js"></script>
- Add resources other than bundle files.
- It will be added in the head tag.
const InFig = require('@t4y3/fig');
InFig.set('Button')
.add('red', () => {
return `<my-button type="{ type }" text="click"></my-button>`
}, {
type: 'red'
})
.add('blue', () => {
return `<my-button type="{ type }" text="click"></my-button>`
}, {
type: 'blue'
});
# Install npm packages
npm i
# build & watch
npm run watch
# example start
npm start
# bundle
npm run build
- Hyperapp - View
# Checkout Release branch from `develop`
git checkout -b release/x.x.x
# Version Up
npm version major|minor|patch
# Publishes a package to the registry
npm publish
# Update master branch
git push origin release/x.x.x
# Push git tags
git push origin --tags
# Merge `release/x.x.x` into `master`
# Merge `release/x.x.x` into `develop`