chore: 🤖 setup ember storybook for component documentation

This commit is contained in:
Randall Morey committed 2020-04-27 17:35:03 -04:00
1 parent 60a835a248
commit 883809ba63
7 files changed
+3528 -115

No files matched your search

+2
View File
@@ -19,6 +19,8 @@ libpeerconnection.log
npm-debug.log*
testem.log
yarn-error.log
storybook-static
**/.storybook/*.html
# ember-try
.node_modules.ember-try
+2
View File
@@ -5,12 +5,14 @@
# compiled output
/dist/
/tmp/
/storybook-static/
# dependencies
/bower_components/
/node_modules/
# misc
main.js
/coverage/
!.*
+9
View File
@@ -0,0 +1,9 @@
module.exports = {
stories: ['../stories/**/*.stories.js'],
addons: [
'@storybook/addon-knobs',
'@storybook/addon-actions',
'@storybook/addon-links',
'@storybook/addon-storysource'
]
};
+10
View File
@@ -20,9 +20,13 @@
"start": "ember serve",
"test": "ember test",
"test:all": "ember try:each",
"prestorybook": "yarn build && yarn storybook:build",
"storybook": "start-storybook -p 6006 -s dist",
"storybook:build": "build-storybook -s dist",
"doc:toc": "doctoc README.md"
},
"dependencies": {
"babel-loader": "^8.1.0",
"ember-cli-babel": "^7.17.2",
"ember-cli-htmlbars": "^4.2.2"
},
@@ -30,6 +34,12 @@
"@ember/optional-features": "^1.3.0",
"@glimmer/component": "^1.0.0",
"@glimmer/tracking": "^1.0.0",
"@storybook/addon-actions": "^5.3.18",
"@storybook/addon-knobs": "^5.3.18",
"@storybook/addon-links": "^5.3.18",
"@storybook/addon-storysource": "^5.3.18",
"@storybook/ember": "^5.3.18",
"@storybook/ember-cli-storybook": "^0.2.1",
"babel-eslint": "^10.0.3",
"broccoli-asset-rev": "^3.0.0",
"doctoc": "^1.4.0",
+19
View File
@@ -0,0 +1,19 @@
import { hbs } from 'ember-cli-htmlbars';
import { action } from '@storybook/addon-actions';
import { text /*withKnobs, boolean, select */ } from '@storybook/addon-knobs';
export default {
title: 'Button',
};
export const Normal = () => ({
template: hbs`
<button {{action onClick}}>
{{text}}
</button>
`,
context: {
text: text('text', 'Button Text'),
onClick: action('clicked'),
},
});
+1 -1
View File
@@ -14,7 +14,7 @@
"test:addons:rose": "echo \"\n\ntest: addons/rose\n\" && cd addons/rose && yarn test",
"precommit": "yarn compliance:licenses && yarn audit && yarn lint && yarn test",
"commit": "git-cz",
"compliance:licenses": "license-checker --onlyAllow 'Apache License, Version 2.0;Apache-2.0;BSD;BSD-3-Clause;CC-BY-3.0;CC-BY-4.0;CC0-1.0;ISC;MIT;MPL-2.0;Public Domain;Unicode-TOU;Unlicense;WTFPL' --excludePackages 'watchtower-ui;base64-js@0.0.2'",
"compliance:licenses": "license-checker --onlyAllow 'Apache*;Apache License, Version 2.0;Apache-2.0;BSD;BSD-3-Clause;CC-BY-3.0;CC-BY-4.0;CC0-1.0;ISC;MIT;MPL-2.0;Public Domain;Unicode-TOU;Unlicense;WTFPL' --excludePackages 'watchtower-ui;base64-js@0.0.2'",
"doc:toc": "doctoc README.md"
},
"devDependencies": {
+3485 -114
View File
File diff suppressed because it is too large. Load diff