diff --git a/.circleci/config.yml b/.circleci/config.yml
index fc2d4ec761c2..7cdc5a340fa3 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -44,6 +44,7 @@ jobs:
- examples/vue-kitchen-sink/node_modules
- examples/svelte-kitchen-sink/node_modules
- examples/marko-cli/node_modules
+ - examples/riot-kitchen-sink/node_modules
- addons
- app
- lib
@@ -96,6 +97,11 @@ jobs:
command: |
cd examples/mithril-kitchen-sink
yarn build-storybook
+ - run:
+ name: Build riot kitchen-sink
+ command: |
+ cd examples/riot-kitchen-sink
+ yarn build-storybook
- run:
name: Run image snapshots
command: yarn test --image
@@ -148,6 +154,11 @@ jobs:
command: |
cd examples/mithril-kitchen-sink
yarn storybook --smoke-test
+ - run:
+ name: Run riot kitchen-sink (smoke test)
+ command: |
+ cd examples/riot-kitchen-sink
+ yarn storybook --smoke-test
react-native:
<<: *defaults
steps:
diff --git a/.teamcity/OpenSourceProjects_Storybook/buildTypes/StotybookApp.kt b/.teamcity/OpenSourceProjects_Storybook/buildTypes/StotybookApp.kt
index 7b77ab7b4209..9c280a961cdf 100644
--- a/.teamcity/OpenSourceProjects_Storybook/buildTypes/StotybookApp.kt
+++ b/.teamcity/OpenSourceProjects_Storybook/buildTypes/StotybookApp.kt
@@ -15,7 +15,8 @@ enum class StorybookApp(val appName: String, val exampleDir: String, val merged:
HTML("HTML", "html-kitchen-sink"),
MARKO("Marko", "marko-cli"),
HYPERAPP("Hyperapp", "hyperapp-kitchen-sink", false),
- SVELTE("Svelte", "svelte-kitchen-sink");
+ SVELTE("Svelte", "svelte-kitchen-sink"),
+ RIOT("Riot", "riot-kitchen-sink");
val lowerName = appName.toLowerCase()
diff --git a/README.md b/README.md
index 24666eb7b12d..41637a7a85c3 100644
--- a/README.md
+++ b/README.md
@@ -87,6 +87,7 @@ For additional help, join us [in our Slack](https://now-examples-slackin-rrirkqo
- [Marko](app/marko) alpha [![Marko](https://img.shields.io/npm/dt/@storybook/marko.svg)](app/marko)
- [HTML](app/html) alpha [![HTML](https://img.shields.io/npm/dt/@storybook/html.svg)](app/html)
- [Svelte](app/svelte) alpha [![Svelte](https://img.shields.io/npm/dt/@storybook/svelte.svg)](app/svelte)
+- [Riot](app/riot) alpha [![Riot](https://img.shields.io/npm/dt/@storybook/riot.svg)](app/riot)
### Sub Projects
diff --git a/app/riot/.npmignore b/app/riot/.npmignore
new file mode 100644
index 000000000000..b467c377fd1b
--- /dev/null
+++ b/app/riot/.npmignore
@@ -0,0 +1,2 @@
+src
+.babelrc
diff --git a/app/riot/README.md b/app/riot/README.md
new file mode 100644
index 000000000000..37f41da559b4
--- /dev/null
+++ b/app/riot/README.md
@@ -0,0 +1,26 @@
+# Storybook for Riot alpha
+
+* * *
+
+Storybook for Riot is a UI development environment for the components written with riot.js.
+With it, you can visualize different states of your UI components and develop them interactively.
+
+![Storybook Screenshot](https://github.com/storybooks/storybook/blob/master/media/storybook-intro.gif)
+
+Storybook runs outside of your app.
+So you can develop UI components in isolation without worrying about app specific dependencies and requirements.
+
+## Getting Started
+
+```sh
+npm i -g @storybook/cli
+cd my-app
+getstorybook --html
+```
+
+For more information visit: [storybook.js.org](https://storybook.js.org)
+
+* * *
+
+Storybook also comes with a lot of [addons](https://storybook.js.org/addons/introduction) and a great API to customize as you wish.
+You can also build a [static version](https://storybook.js.org/basics/exporting-storybook) of your storybook and deploy it anywhere you want.
diff --git a/app/riot/bin/build.js b/app/riot/bin/build.js
new file mode 100755
index 000000000000..26142ec0af29
--- /dev/null
+++ b/app/riot/bin/build.js
@@ -0,0 +1,4 @@
+#!/usr/bin/env node
+
+process.env.NODE_ENV = process.env.NODE_ENV || 'production';
+require('../dist/server/build');
diff --git a/app/riot/bin/index.js b/app/riot/bin/index.js
new file mode 100755
index 000000000000..2e96258ce63d
--- /dev/null
+++ b/app/riot/bin/index.js
@@ -0,0 +1,3 @@
+#!/usr/bin/env node
+
+require('../dist/server');
diff --git a/app/riot/package.json b/app/riot/package.json
new file mode 100644
index 000000000000..fb03018a7a7b
--- /dev/null
+++ b/app/riot/package.json
@@ -0,0 +1,49 @@
+{
+ "name": "@storybook/riot",
+ "version": "4.0.0-alpha.18",
+ "description": "Storybook for riot.js: View riot snippets in isolation with Hot Reloading.",
+ "homepage": "https://github.com/storybooks/storybook/tree/master/app/riot",
+ "bugs": {
+ "url": "https://github.com/storybooks/storybook/issues"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/storybooks/storybook.git"
+ },
+ "license": "MIT",
+ "main": "dist/client/index.js",
+ "bin": {
+ "build-storybook": "./bin/build.js",
+ "start-storybook": "./bin/index.js",
+ "storybook-server": "./bin/index.js"
+ },
+ "scripts": {
+ "prepare": "node ../../scripts/prepare.js"
+ },
+ "dependencies": {
+ "@babel/runtime": "^7.0.0-rc.2",
+ "@storybook/core": "4.0.0-alpha.18",
+ "common-tags": "^1.8.0",
+ "global": "^4.3.2",
+ "moment": "^2.22.2",
+ "riot": "^3.11.1",
+ "riot-hot-reload": "^1.0.0",
+ "riot-tag-loader": "^2.1.0",
+ "raw-loader": "^0.5.1",
+ "riot-compiler": "^3.5.1",
+ "react": "^16.4.2",
+ "react-dom": "^16.4.2"
+ },
+ "devDependencies": {
+ "cross-env": "^5.2.0",
+ "@babel/preset-flow": "^7.0.0-rc.2",
+ "@babel/preset-react": "^7.0.0-rc.2",
+ "@babel/runtime": "^7.0.0-rc.2",
+ "@babel/preset-env": "^7.0.0-rc.2",
+ "@babel/plugin-transform-runtime": "^7.0.0-rc.2",
+ "@babel/plugin-transform-modules-commonjs": "^7.0.0-rc.2"
+ },
+ "peerDependencies": {
+ "babel-core": "^7.0.0 || ^8.0.0 || ^8.0.0-beta.6"
+ }
+}
diff --git a/app/riot/src/client/index.js b/app/riot/src/client/index.js
new file mode 100644
index 000000000000..88fb416f70ef
--- /dev/null
+++ b/app/riot/src/client/index.js
@@ -0,0 +1,9 @@
+export {
+ storiesOf,
+ setAddon,
+ addDecorator,
+ addParameters,
+ configure,
+ getStorybook,
+ forceReRender,
+} from './preview';
diff --git a/app/riot/src/client/preview/globals.js b/app/riot/src/client/preview/globals.js
new file mode 100644
index 000000000000..0ec7f2b138a6
--- /dev/null
+++ b/app/riot/src/client/preview/globals.js
@@ -0,0 +1,3 @@
+import { window } from 'global';
+
+window.STORYBOOK_ENV = 'riot';
diff --git a/app/riot/src/client/preview/index.js b/app/riot/src/client/preview/index.js
new file mode 100644
index 000000000000..cf0121006825
--- /dev/null
+++ b/app/riot/src/client/preview/index.js
@@ -0,0 +1,18 @@
+import { start } from '@storybook/core/client';
+
+import './globals';
+import render from './render';
+
+const { clientApi, configApi, forceReRender } = start(render);
+
+export const {
+ storiesOf,
+ setAddon,
+ addDecorator,
+ addParameters,
+ clearDecorators,
+ getStorybook,
+} = clientApi;
+
+export const { configure } = configApi;
+export { forceReRender };
diff --git a/app/riot/src/client/preview/render-riot.js b/app/riot/src/client/preview/render-riot.js
new file mode 100644
index 000000000000..33a25cd7d907
--- /dev/null
+++ b/app/riot/src/client/preview/render-riot.js
@@ -0,0 +1,72 @@
+import { document } from 'global';
+
+export function guessRootName(stringified) {
+ const whiteSpaceLocation = stringified.indexOf(' ', stringified.indexOf('<') + 1);
+ const firstWhitespace = whiteSpaceLocation === -1 ? stringified.length : whiteSpaceLocation;
+ const supposedName = stringified.trim().match(/^<[^ >]+\/>$/)
+ ? stringified.trim().replace(/[<>/]/g, '')
+ : stringified.substring(
+ stringified.indexOf('<') + 1,
+ Math.min(firstWhitespace, stringified.indexOf('>'))
+ );
+ const matchingBuiltInTag = document.createElement(supposedName).constructor.name;
+ return matchingBuiltInTag === 'HTMLUnknownElement' ? supposedName : 'root';
+}
+
+export function renderStringified(
+ { tags, scenario = `<${(tags[0] || []).boundAs || guessRootName(tags[0] || '')}/>` },
+ { unregister, tag2, mount, compiler } // eslint-disable-line no-unused-vars
+) {
+ unregister('root');
+ tags.forEach(oneTag => {
+ const rootName = oneTag.boundAs || guessRootName(oneTag);
+ const { content } = oneTag || {};
+ const sourceCodeWithoutRoot = content ? content.trim() : oneTag;
+ const sourceCode =
+ rootName === 'root' ? `${sourceCodeWithoutRoot} ` : sourceCodeWithoutRoot;
+ const compiled = compiler
+ .compile(sourceCode, {})
+ .replace("var riot = require('riot')", '')
+ .trim();
+ unregister(rootName);
+ eval(`${compiled}`.replace(/riot\.tag2/g, 'tag2')); // eslint-disable-line no-eval
+ });
+ const sourceCode = `${scenario} `;
+ if (scenario !== ' ')
+ eval(`${compiler.compile(sourceCode, {})}`.replace(/riot\.tag2/g, 'tag2')); // eslint-disable-line no-eval
+ mount('*');
+}
+
+// eslint-disable-next-line no-unused-vars
+export function renderRaw(sourceCode, { unregister, mount, compiler, tag2 }) {
+ unregister('root');
+ // eslint-disable-next-line no-eval
+ eval(
+ `${compiler.compile(sourceCode.replace("var riot = require('riot')", '').trim(), {})}`.replace(
+ /riot.tag2/g,
+ 'tag2'
+ )
+ );
+ mount('root', /riot\.tag2\s*\(\s*'([^']+)'/.exec(sourceCode)[1], {});
+}
+
+export function renderCompiledObject(component, { rootElement }) {
+ if (component.length) rootElement.appendChild(component[0].__.root); // eslint-disable-line no-underscore-dangle
+}
+
+export function render(component, context) {
+ const { tags } = component || {};
+ if (typeof component === 'string') {
+ renderRaw(component, context);
+ return true;
+ }
+ if (Array.isArray(tags)) {
+ renderStringified(component, context);
+ return true;
+ }
+ if (component && Array.isArray(component)) {
+ renderCompiledObject(component, context);
+ return true;
+ }
+ return false;
+}
diff --git a/app/riot/src/client/preview/render-riot.test.js b/app/riot/src/client/preview/render-riot.test.js
new file mode 100644
index 000000000000..851b127a0627
--- /dev/null
+++ b/app/riot/src/client/preview/render-riot.test.js
@@ -0,0 +1,137 @@
+import { document } from 'global';
+import { unregister, tag2, mount } from 'riot/riot';
+import compiler from 'riot-compiler';
+import { render } from './render-riot';
+
+document.body = document.createElement('body');
+const rootElement = document.body.appendChild(document.createElement('root'));
+
+const context = {
+ unregister,
+ rootElement,
+ compiler,
+ tag2,
+ mount,
+};
+
+beforeEach(() => {
+ rootElement.innerHTML = '';
+ unregister('root');
+});
+
+describe('render a riot element', () => {
+ it('should not work with nothing', () => {
+ expect(render(null, context)).toBe(false);
+
+ expect(rootElement.innerHTML).toEqual('');
+ });
+
+ it('can work with some text', () => {
+ expect(render({ tags: ['
'] }, context)).toBe(true);
+
+ expect(rootElement.innerHTML).toEqual('');
+ });
+
+ it('can work with raw code', () => {
+ expect(render("riot.tag2('root', 'raw code
', '', '', () => {})", context)).toBe(
+ true
+ );
+
+ expect(rootElement.innerHTML).toEqual('raw code
');
+ });
+
+ it('can work with compiled code', () => {
+ expect(render([], context)).toBe(true);
+ // does only work in true mode, and not in jest mode
+ });
+
+ it('can nest several tags', () => {
+ expect(
+ render(
+ {
+ tags: [
+ ' ',
+ ' ',
+ ' ',
+ ' ',
+ ' ',
+ ],
+ scenario: 'Content
',
+ },
+ context
+ )
+ ).toBe(true);
+
+ expect(rootElement.innerHTML).toEqual(
+ `
+
+
+ `
+ .trim()
+ .replace(/\n\s* {
+ expect(
+ render(
+ {
+ tags: [
+ {
+ content:
+ "simple test ({opts.test || 'without parameter'}). Oh, by the way ({opts.riotValue || '... well, nothing'})
",
+ boundAs: 'mustBeUniquePlease',
+ },
+ ],
+ scenario:
+ ' ',
+ },
+ context
+ )
+ ).toBe(true);
+
+ expect(rootElement.innerHTML).toEqual(
+ 'simple test (with a parameter). Oh, by the way (value is mapped to riotValue)
'
+ );
+ });
+});
diff --git a/app/riot/src/client/preview/render.js b/app/riot/src/client/preview/render.js
new file mode 100644
index 000000000000..6599cfe899d4
--- /dev/null
+++ b/app/riot/src/client/preview/render.js
@@ -0,0 +1,23 @@
+import { document } from 'global';
+import { stripIndents } from 'common-tags';
+import { mount, unregister, tag2 } from 'riot';
+import compiler from 'riot-compiler';
+import { render as renderRiot } from './render-riot';
+
+const rootElement = document.getElementById('root');
+
+export default function renderMain({ story, selectedKind, selectedStory, showMain, showError }) {
+ showMain();
+ rootElement.innerHTML = ' ';
+ const context = { unregister, mount, tag2, compiler, rootElement };
+ const component = story();
+ const rendered = renderRiot(component, context);
+ if (!rendered)
+ showError({
+ title: `Expecting a riot snippet or a riot component from the story: "${selectedStory}" of "${selectedKind}".`,
+ description: stripIndents`
+ Did you forget to return the component snippet from the story?
+ Use "() => " or when defining the story.
+ `,
+ });
+}
diff --git a/app/riot/src/server/build.js b/app/riot/src/server/build.js
new file mode 100644
index 000000000000..d8abf06a4396
--- /dev/null
+++ b/app/riot/src/server/build.js
@@ -0,0 +1,4 @@
+import { buildStatic } from '@storybook/core/server';
+import options from './options';
+
+buildStatic(options);
diff --git a/app/riot/src/server/index.js b/app/riot/src/server/index.js
new file mode 100644
index 000000000000..15b113175abe
--- /dev/null
+++ b/app/riot/src/server/index.js
@@ -0,0 +1,5 @@
+import { buildDev } from '@storybook/core/server';
+
+import options from './options';
+
+buildDev(options);
diff --git a/app/riot/src/server/options.js b/app/riot/src/server/options.js
new file mode 100644
index 000000000000..94465235684e
--- /dev/null
+++ b/app/riot/src/server/options.js
@@ -0,0 +1,8 @@
+import packageJson from '../../package.json';
+
+import wrapInitialConfig from './wrapInitialConfig';
+
+export default {
+ packageJson,
+ wrapInitialConfig,
+};
diff --git a/app/riot/src/server/wrapInitialConfig.js b/app/riot/src/server/wrapInitialConfig.js
new file mode 100644
index 000000000000..89da2adf72f0
--- /dev/null
+++ b/app/riot/src/server/wrapInitialConfig.js
@@ -0,0 +1,17 @@
+export default config => ({
+ ...config,
+ module: {
+ ...config.module,
+ rules: [
+ ...config.module.rules,
+ {
+ test: /\.tag$/,
+ use: [
+ {
+ loader: require.resolve('riot-tag-loader'),
+ },
+ ],
+ },
+ ],
+ },
+});
diff --git a/examples/riot-kitchen-sink/.gitignore b/examples/riot-kitchen-sink/.gitignore
new file mode 100644
index 000000000000..6c96c5cff124
--- /dev/null
+++ b/examples/riot-kitchen-sink/.gitignore
@@ -0,0 +1,15 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+
+# dependencies
+node_modules
+
+# testing
+coverage
+
+# production
+build
+
+# misc
+.DS_Store
+.env
+npm-debug.log
diff --git a/examples/riot-kitchen-sink/.storybook/addons.js b/examples/riot-kitchen-sink/.storybook/addons.js
new file mode 100644
index 000000000000..ff96ea46a3bd
--- /dev/null
+++ b/examples/riot-kitchen-sink/.storybook/addons.js
@@ -0,0 +1,8 @@
+import '@storybook/addon-storysource/register';
+import '@storybook/addon-actions/register';
+import '@storybook/addon-links/register';
+import '@storybook/addon-notes/register';
+import '@storybook/addon-knobs/register';
+import '@storybook/addon-viewport/register';
+import '@storybook/addon-options/register';
+import '@storybook/addon-backgrounds/register';
diff --git a/examples/riot-kitchen-sink/.storybook/config.js b/examples/riot-kitchen-sink/.storybook/config.js
new file mode 100644
index 000000000000..41fa9ab736bd
--- /dev/null
+++ b/examples/riot-kitchen-sink/.storybook/config.js
@@ -0,0 +1,15 @@
+import { configure } from '@storybook/riot';
+import { setOptions } from '@storybook/addon-options';
+
+setOptions({
+ hierarchyRootSeparator: /\|/,
+});
+
+function loadStories() {
+ require('../src/stories');
+
+ const req = require.context('../src/stories', true, /\.stories\.js$/);
+ req.keys().forEach(filename => req(filename));
+}
+
+configure(loadStories, module);
diff --git a/examples/riot-kitchen-sink/.storybook/webpack.config.js b/examples/riot-kitchen-sink/.storybook/webpack.config.js
new file mode 100644
index 000000000000..647e02ae0d4a
--- /dev/null
+++ b/examples/riot-kitchen-sink/.storybook/webpack.config.js
@@ -0,0 +1,12 @@
+const path = require('path');
+
+module.exports = (storybookBaseConfig, configType, defaultConfig) => {
+ defaultConfig.module.rules.push({
+ test: [/\.stories\.js$/, /index\.js$/],
+ loaders: [require.resolve('@storybook/addon-storysource/loader')],
+ include: [path.resolve(__dirname, '../src')],
+ enforce: 'pre',
+ });
+
+ return defaultConfig;
+};
diff --git a/examples/riot-kitchen-sink/README.md b/examples/riot-kitchen-sink/README.md
new file mode 100644
index 000000000000..c99dc3c0ec5a
--- /dev/null
+++ b/examples/riot-kitchen-sink/README.md
@@ -0,0 +1,3 @@
+# Storybook Demo
+
+This is a demo app to test riot.js integration with Storybook. Run `npm install` to sync Storybook module with the source code and run `npm run storybook` to start the Storybook.
diff --git a/examples/riot-kitchen-sink/index.html b/examples/riot-kitchen-sink/index.html
new file mode 100644
index 000000000000..8e597cae1104
--- /dev/null
+++ b/examples/riot-kitchen-sink/index.html
@@ -0,0 +1,11 @@
+
+
+
+
+ demo2
+
+
+
+
+
+
diff --git a/examples/riot-kitchen-sink/package.json b/examples/riot-kitchen-sink/package.json
new file mode 100644
index 000000000000..b91abdad5603
--- /dev/null
+++ b/examples/riot-kitchen-sink/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "riot-example",
+ "version": "4.0.0-alpha.18",
+ "private": true,
+ "scripts": {
+ "build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
+ "build-storybook": "build-storybook -s public",
+ "dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
+ "storybook": "start-storybook -p 9009 -s public"
+ },
+ "dependencies": {
+ "riot-hot-reload": "^1.0.0",
+ "riot-compiler": "^3.5.1",
+ "riot": "^3.11.1"
+ },
+ "devDependencies": {
+ "@storybook/riot": "4.0.0-alpha.18",
+ "@babel/core": "^7.0.0-rc.2",
+ "@storybook/addon-actions": "4.0.0-alpha.18",
+ "@storybook/addon-backgrounds": "4.0.0-alpha.18",
+ "@storybook/addon-centered": "4.0.0-alpha.18",
+ "@storybook/addon-knobs": "4.0.0-alpha.18",
+ "@storybook/addon-links": "4.0.0-alpha.18",
+ "@storybook/addon-notes": "4.0.0-alpha.18",
+ "@storybook/addon-options": "4.0.0-alpha.18",
+ "@storybook/addon-storyshots": "4.0.0-alpha.18",
+ "@storybook/addon-storysource": "4.0.0-alpha.18",
+ "@storybook/addon-viewport": "4.0.0-alpha.18",
+ "@storybook/addons": "4.0.0-alpha.18",
+ "babel-core": "^7.0.0-bridge.0",
+ "babel-loader": "^8.0.0-beta.6",
+ "cross-env": "^5.2.0",
+ "file-loader": "^1.1.11",
+ "svg-url-loader": "^2.3.2",
+ "riot-tag-loader": "^2.1.0",
+ "raw-loader": "^0.5.1",
+ "webpack": "^4.16.4",
+ "webpack-dev-server": "^3.1.5"
+ }
+}
diff --git a/examples/riot-kitchen-sink/public/favicon.ico b/examples/riot-kitchen-sink/public/favicon.ico
new file mode 100644
index 000000000000..4f929bca31aa
Binary files /dev/null and b/examples/riot-kitchen-sink/public/favicon.ico differ
diff --git a/examples/riot-kitchen-sink/public/index.html b/examples/riot-kitchen-sink/public/index.html
new file mode 100644
index 000000000000..aab5e3b00ce4
--- /dev/null
+++ b/examples/riot-kitchen-sink/public/index.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+ React App
+
+
+
+
+
+
diff --git a/examples/riot-kitchen-sink/public/logo.png b/examples/riot-kitchen-sink/public/logo.png
new file mode 100644
index 000000000000..65e6a956f539
Binary files /dev/null and b/examples/riot-kitchen-sink/public/logo.png differ
diff --git a/examples/riot-kitchen-sink/riotshots.test.js b/examples/riot-kitchen-sink/riotshots.test.js
new file mode 100644
index 000000000000..02d25b4b7ee5
--- /dev/null
+++ b/examples/riot-kitchen-sink/riotshots.test.js
@@ -0,0 +1,9 @@
+import path from 'path';
+import initStoryshots, { multiSnapshotWithOptions } from '@storybook/addon-storyshots';
+
+initStoryshots({
+ framework: 'riot',
+ configPath: path.join(__dirname, '.storybook'),
+ integrityOptions: { cwd: path.join(__dirname, 'src', 'stories') },
+ test: multiSnapshotWithOptions(),
+});
diff --git a/examples/riot-kitchen-sink/src/App.tag b/examples/riot-kitchen-sink/src/App.tag
new file mode 100644
index 000000000000..ff464566c5c1
--- /dev/null
+++ b/examples/riot-kitchen-sink/src/App.tag
@@ -0,0 +1,58 @@
+
+
+
+
+
Essential Links
+
+
Ecosystem
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/riot-kitchen-sink/src/index.js b/examples/riot-kitchen-sink/src/index.js
new file mode 100644
index 000000000000..eaf309452dbc
--- /dev/null
+++ b/examples/riot-kitchen-sink/src/index.js
@@ -0,0 +1,5 @@
+import { mount } from 'riot';
+// eslint-disable-next-line no-unused-vars
+import App from './App.tag';
+
+mount('*');
diff --git a/examples/riot-kitchen-sink/src/logo.png b/examples/riot-kitchen-sink/src/logo.png
new file mode 100644
index 000000000000..65e6a956f539
Binary files /dev/null and b/examples/riot-kitchen-sink/src/logo.png differ
diff --git a/examples/riot-kitchen-sink/src/stories/AnotherTest.tag b/examples/riot-kitchen-sink/src/stories/AnotherTest.tag
new file mode 100644
index 000000000000..c6e9d75b657a
--- /dev/null
+++ b/examples/riot-kitchen-sink/src/stories/AnotherTest.tag
@@ -0,0 +1 @@
+yet another test, precompiled this time (WARN, only works in lower case, never upper case with precompiled templates)
\ No newline at end of file
diff --git a/examples/riot-kitchen-sink/src/stories/Button.tag b/examples/riot-kitchen-sink/src/stories/Button.tag
new file mode 100644
index 000000000000..6039f32d2e56
--- /dev/null
+++ b/examples/riot-kitchen-sink/src/stories/Button.tag
@@ -0,0 +1,23 @@
+
+ {opts.content} !
+
+
+
+
+
diff --git a/examples/riot-kitchen-sink/src/stories/SimpleTest.tag b/examples/riot-kitchen-sink/src/stories/SimpleTest.tag
new file mode 100644
index 000000000000..d9afbd766b63
--- /dev/null
+++ b/examples/riot-kitchen-sink/src/stories/SimpleTest.tag
@@ -0,0 +1 @@
+simple test ({opts.test || 'without parameter'}). Oh, by the way ({opts.riotValue || '... well, nothing'})
\ No newline at end of file
diff --git a/examples/riot-kitchen-sink/src/stories/Welcome.tag b/examples/riot-kitchen-sink/src/stories/Welcome.tag
new file mode 100644
index 000000000000..a3965f4ff449
--- /dev/null
+++ b/examples/riot-kitchen-sink/src/stories/Welcome.tag
@@ -0,0 +1,99 @@
+
+
+
Welcome to Storybook for riot.js
+
+ This is a UI component dev environment for your riot app.
+
+
+ We've added some basic stories inside the
+ src/stories
+ directory.
+
+ A story is a single state of one or more UI components.
+ You can have as many stories as you want.
+
+ (Basically a story is like a visual test case.)
+
+
+ See these sample
+ stories
+ for a component called
+ Button
+ .
+
+
+
+ Just like that, you can add your own components as stories.
+
+ You can also edit those components and see changes right away.
+
+ (Try editing the Button
component
+ located at src/stories/Button.tag
.)
+
+
+ Usually we create stories with smaller UI components in the app.
+ Have a look at the
+
+ Writing Stories
+
+ section in our documentation.
+
+
+ NOTE:
+
+ Have a look at the
+ .storybook/webpack.config.js
+ to add webpack
+ loaders and plugins you are using in this project.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/riot-kitchen-sink/src/stories/addon-actions.stories.js b/examples/riot-kitchen-sink/src/stories/addon-actions.stories.js
new file mode 100644
index 000000000000..b3045c7b223e
--- /dev/null
+++ b/examples/riot-kitchen-sink/src/stories/addon-actions.stories.js
@@ -0,0 +1,14 @@
+import { storiesOf } from '@storybook/riot';
+// eslint-disable-next-line import/no-unresolved,import/no-webpack-loader-syntax
+import ButtonRaw from 'raw-loader!./Button.tag';
+
+storiesOf('Addon|Actions', module)
+ .add('Action only', () => ({
+ tags: [{ boundAs: 'my-button', content: ButtonRaw }],
+ scenario: 'Click me to log the action ',
+ }))
+ .add('Multiple actions', () => ({
+ tags: [{ boundAs: 'my-button', content: ButtonRaw }],
+ scenario:
+ '(Double) click me to log the action ',
+ }));
diff --git a/examples/riot-kitchen-sink/src/stories/addon-backgrounds.stories.js b/examples/riot-kitchen-sink/src/stories/addon-backgrounds.stories.js
new file mode 100644
index 000000000000..ddb8c6ef1bb4
--- /dev/null
+++ b/examples/riot-kitchen-sink/src/stories/addon-backgrounds.stories.js
@@ -0,0 +1,28 @@
+import { storiesOf } from '@storybook/riot';
+import { withBackgrounds } from '@storybook/addon-backgrounds';
+// eslint-disable-next-line import/no-unresolved,import/no-webpack-loader-syntax
+import ButtonRaw from 'raw-loader!./Button.tag';
+
+storiesOf('Addon|Backgrounds', module)
+ .addDecorator(
+ withBackgrounds([
+ { name: 'twitter', value: '#00aced' },
+ { name: 'facebook', value: '#3b5998', default: true },
+ ])
+ )
+ .add('story 1', () => {
+ const content = 'You should be able to switch backgrounds for this story';
+
+ return {
+ tags: [{ boundAs: 'my-button', content: ButtonRaw }],
+ scenario: `${content} `,
+ };
+ })
+ .add('story 2', () => {
+ const content = 'This one too!';
+
+ return {
+ tags: [{ boundAs: 'my-button', content: ButtonRaw }],
+ scenario: `${content} `,
+ };
+ });
diff --git a/examples/riot-kitchen-sink/src/stories/addon-knobs.stories.js b/examples/riot-kitchen-sink/src/stories/addon-knobs.stories.js
new file mode 100644
index 000000000000..17df2278625e
--- /dev/null
+++ b/examples/riot-kitchen-sink/src/stories/addon-knobs.stories.js
@@ -0,0 +1,80 @@
+import { storiesOf } from '@storybook/riot';
+import { action } from '@storybook/addon-actions';
+import {
+ withKnobs,
+ text,
+ number,
+ boolean,
+ array,
+ select,
+ color,
+ date,
+ button,
+} from '@storybook/addon-knobs';
+
+storiesOf('Addon|Knobs', module)
+ .addDecorator(withKnobs)
+ .add('Simple', () => {
+ const name = text('Name', 'John Doe');
+ const age = number('Age', 44);
+ const content = `I am ${name} and I'm ${age} years old.`;
+
+ return {
+ tags: [`${content}
`],
+ };
+ })
+ .add('All knobs', () => {
+ const name = text('Name', 'Jane');
+ const stock = number('Stock', 20, {
+ range: true,
+ min: 0,
+ max: 30,
+ step: 5,
+ });
+ const fruits = {
+ Apple: 'apples',
+ Banana: 'bananas',
+ Cherry: 'cherries',
+ };
+ const fruit = select('Fruit', fruits, 'apples');
+ const price = number('Price', 2.25);
+
+ const colour = color('Border', 'deeppink');
+ const today = date('Today', new Date('Jan 20 2017 GMT+0'));
+ const items = array('Items', ['Laptop', 'Book', 'Whiskey']);
+ const nice = boolean('Nice', true);
+
+ const stockMessage = stock
+ ? `I have a stock of ${stock} ${fruit}, costing $${price} each.`
+ : `I'm out of ${fruit}${nice ? ', Sorry!' : '.'}`;
+ const salutation = nice ? 'Nice to meet you!' : 'Leave me alone!';
+ const dateOptions = { year: 'numeric', month: 'long', day: 'numeric', timeZone: 'UTC' };
+
+ button('Arbitrary action', action('You clicked it!'));
+
+ return {
+ tags: [
+ `
+
+
My name is ${name},
+
today is ${new Date(today).toLocaleDateString('en-US', dateOptions)}
+
${stockMessage}
+
Also, I have:
+
+ ${items.map(item => `${item} `).join('')}
+
+
${salutation}
+
+ `.replace(/[\n\r\s]+/g, ' '),
+ ],
+ };
+ })
+ .add('XSS safety', () => ({
+ tags: [
+ `
+
+ ${text('Rendered string', '
')}
+
+ `.replace(/[\n\r\s]+/g, ' '),
+ ],
+ }));
diff --git a/examples/riot-kitchen-sink/src/stories/addon-links.stories.js b/examples/riot-kitchen-sink/src/stories/addon-links.stories.js
new file mode 100644
index 000000000000..21bd0026d878
--- /dev/null
+++ b/examples/riot-kitchen-sink/src/stories/addon-links.stories.js
@@ -0,0 +1,15 @@
+import { storiesOf } from '@storybook/riot';
+import { mount } from 'riot';
+// eslint-disable-next-line no-unused-vars
+import Button from './Button.tag';
+
+storiesOf('Addon|Links', module).add('Go to welcome', () =>
+ mount('root', 'my-button', {
+ rounded: true,
+ content: 'This button links to Welcome',
+ value: 'with a parameter',
+ handleClick: () => {
+ global.window.location = 'iframe.html?selectedKind=Welcome&selectedStory=Welcome';
+ },
+ })
+);
diff --git a/examples/riot-kitchen-sink/src/stories/addon-notes.stories.js b/examples/riot-kitchen-sink/src/stories/addon-notes.stories.js
new file mode 100644
index 000000000000..54923e5bd9f4
--- /dev/null
+++ b/examples/riot-kitchen-sink/src/stories/addon-notes.stories.js
@@ -0,0 +1,29 @@
+import { storiesOf } from '@storybook/riot';
+import { withNotes } from '@storybook/addon-notes';
+
+storiesOf('Addon|Notes', module)
+ .addDecorator(withNotes)
+ .add(
+ 'Simple note',
+ () => ({
+ tags: [
+ 'Etiam vulputate elit eu venenatis eleifend. Duis nec lectus augue. Morbi egestas diam sed vulputate mollis. Fusce egestas pretium vehicula. Integer sed neque diam. Donec consectetur velit vitae enim varius, ut placerat arcu imperdiet. Praesent sed faucibus arcu. Nullam sit amet nibh a enim eleifend rhoncus. Donec pretium elementum leo at fermentum. Nulla sollicitudin, mauris quis semper tempus, sem metus tristique diam, efficitur pulvinar mi urna id urna.
',
+ ],
+ }),
+ { notes: 'My notes on some bold text' }
+ )
+ .add(
+ 'Note with HTML',
+ () => ({
+ tags: ['🤔😳😯😮 😄😩😓😱 🤓😑😶😊
'],
+ }),
+ {
+ notes: `
+ My notes on emojies
+
+ It's not all that important to be honest, but..
+
+ Emojis are great, I love emojis, in fact I like using them in my Component notes too! 😇
+ `,
+ }
+ );
diff --git a/examples/riot-kitchen-sink/src/stories/core.stories.js b/examples/riot-kitchen-sink/src/stories/core.stories.js
new file mode 100644
index 000000000000..cb6819915de3
--- /dev/null
+++ b/examples/riot-kitchen-sink/src/stories/core.stories.js
@@ -0,0 +1,16 @@
+import { storiesOf, addParameters } from '@storybook/riot';
+import { tag2, mount } from 'riot';
+
+const globalParameter = 'globalParameter';
+const chapterParameter = 'chapterParameter';
+const storyParameter = 'storyParameter';
+
+tag2('parameters', 'Parameters are {JSON.stringify (this.opts)}
', '', '', () => {});
+
+addParameters({ globalParameter });
+
+storiesOf('Core|Parameters', module)
+ .addParameters({ chapterParameter })
+ .add('passed to story', ({ parameters: { fileName, ...parameters } }) =>
+ mount('root', 'parameters', { ...parameters, storyParameter })
+ );
diff --git a/examples/riot-kitchen-sink/src/stories/index.js b/examples/riot-kitchen-sink/src/stories/index.js
new file mode 100644
index 000000000000..a024d25601c5
--- /dev/null
+++ b/examples/riot-kitchen-sink/src/stories/index.js
@@ -0,0 +1,26 @@
+import { storiesOf } from '@storybook/riot';
+import { linkTo } from '@storybook/addon-links';
+// eslint-disable-next-line import/no-unresolved,import/no-webpack-loader-syntax
+import ButtonRaw from 'raw-loader!./Button.tag';
+import { mount } from 'riot';
+// eslint-disable-next-line no-unused-vars
+import Welcome from './Welcome.tag';
+// eslint-disable-next-line no-unused-vars
+import App from '../App.tag';
+
+storiesOf('Welcome', module).add('Welcome', () =>
+ mount('root', 'welcome', { goToButton: linkTo('Button') })
+);
+
+storiesOf('App', module).add('App', () => mount('root', 'app', {}));
+
+storiesOf('Button', module)
+ // Works if riot.component is called in the config.js in .storybook
+ .add('rounded', () => ({
+ tags: [{ boundAs: 'my-button', content: ButtonRaw }],
+ scenario: 'A Button with rounded edges ',
+ }))
+ .add('square', () => ({
+ tags: [{ boundAs: 'my-button', content: ButtonRaw }],
+ scenario: 'A Button with square edges ',
+ }));
diff --git a/examples/riot-kitchen-sink/src/stories/story-code.stories.js b/examples/riot-kitchen-sink/src/stories/story-code.stories.js
new file mode 100644
index 000000000000..b120137d2181
--- /dev/null
+++ b/examples/riot-kitchen-sink/src/stories/story-code.stories.js
@@ -0,0 +1,55 @@
+import { storiesOf } from '@storybook/riot';
+import { tag2, mount } from 'riot';
+// eslint-disable-next-line import/no-webpack-loader-syntax,import/no-unresolved
+import SimpleTestRaw from 'raw-loader!./SimpleTest.tag';
+// eslint-disable-next-line no-unused-vars
+import anothertest from './AnotherTest.tag';
+
+storiesOf('Story|How to create a story', module)
+ .add(
+ 'built with tag2',
+ () =>
+ tag2('test', 'simple test ({ opts.value })
', '', '', () => {}) &&
+ mount('root', 'test', { value: 'with a parameter' })
+ )
+
+ .add('built as string', () => ({ tags: ['simple test
'] }))
+
+ .add('built from raw import', () => SimpleTestRaw)
+
+ .add(
+ 'built from tags and scenario',
+ () => ({
+ tags: [{ content: SimpleTestRaw, boundAs: 'mustBeUniquePlease' }],
+ scenario:
+ ' ',
+ }),
+ {
+ notes:
+ 'WARN : the tag file root element must have exactly the same name (or else you will see nothing)',
+ }
+ )
+
+ .add('built from the precompilation', () => mount('root', 'anothertest', {}), {
+ notes: 'WARN, only works in lower case, never upper case with precompiled templates',
+ });
+
+storiesOf('Story|Nest tags', module)
+ .add('Three tags', () => ({
+ tags: [
+ 'Simple title Simple Content ',
+ ' ',
+ '
',
+ ],
+ }))
+
+ .add('Matriochka', () => ({
+ tags: [
+ ' ',
+ ' ',
+ ' ',
+ ' ',
+ ' ',
+ ],
+ scenario: 'Content
',
+ }));
diff --git a/examples/riot-kitchen-sink/webpack.config.js b/examples/riot-kitchen-sink/webpack.config.js
new file mode 100644
index 000000000000..2ef2e14ab232
--- /dev/null
+++ b/examples/riot-kitchen-sink/webpack.config.js
@@ -0,0 +1,83 @@
+const path = require('path');
+const webpack = require('webpack');
+
+module.exports = {
+ entry: './src/index.js',
+ output: {
+ path: path.resolve(__dirname, './dist'),
+ publicPath: '/dist/',
+ filename: 'build.js',
+ },
+ plugins: [],
+ module: {
+ rules: [
+ {
+ test: /\.tag/,
+ exclude: /node_modules/,
+ use: [
+ {
+ loader: 'riot-tag-loader',
+ options: {
+ hot: false, // set it to true if you are using hmr
+ // add here all the other riot-compiler options riot.js.org/guide/compiler/
+ // template: 'pug' for example
+ },
+ },
+ ],
+ },
+ {
+ test: /\.js$/,
+ loader: 'babel-loader',
+ exclude: /node_modules/,
+ },
+ {
+ test: /\.(png|jpg|gif)$/,
+ loader: 'file-loader',
+ options: {
+ name: '[name].[ext]?[hash]',
+ },
+ },
+ {
+ test: /\.svg$/,
+ loader: 'svg-url-loader',
+ options: {
+ noquotes: true,
+ },
+ },
+ ],
+ },
+ resolve: {
+ alias: {
+ riot$: 'riot/dist/riot.esm.js',
+ },
+ },
+ devServer: {
+ historyApiFallback: true,
+ noInfo: true,
+ },
+ performance: {
+ hints: false,
+ },
+ devtool: '#eval-source-map',
+};
+
+if (process.env.NODE_ENV === 'production') {
+ module.exports.devtool = '#source-map';
+ // http://riot-loader.riotjs.org/en/workflow/production.html
+ module.exports.plugins = (module.exports.plugins || []).concat([
+ new webpack.DefinePlugin({
+ 'process.env': {
+ NODE_ENV: '"production"',
+ },
+ }),
+ new webpack.optimize.UglifyJsPlugin({
+ sourceMap: true,
+ compress: {
+ warnings: false,
+ },
+ }),
+ new webpack.LoaderOptionsPlugin({
+ minimize: true,
+ }),
+ ]);
+}
diff --git a/jest.config.js b/jest.config.js
index 635fb207c841..b39d144c1bfc 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -27,6 +27,7 @@ module.exports = {
'^.+\\.(ts|html)$': '/node_modules/jest-preset-angular/preprocessor.js',
'.*\\.(vue)$': '/node_modules/jest-vue-preprocessor',
'.*\\.(svelte)$': '/node_modules/svelte-jest',
+ '^.+\\.(tag)$': '/node_modules/riot-jest-transformer',
},
testPathIgnorePatterns: ['/node_modules/', '/dist/', 'addon-jest.test.js', '/cli/test/'],
collectCoverage: false,
@@ -43,5 +44,16 @@ module.exports = {
setupTestFrameworkScriptFile: './scripts/jest.init.js',
setupFiles: ['raf/polyfill'],
testURL: 'http://localhost',
- moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node', '.html', '.svelte', 'vue'],
+ moduleFileExtensions: [
+ 'ts',
+ 'tsx',
+ 'js',
+ 'jsx',
+ 'json',
+ 'node',
+ '.html',
+ '.svelte',
+ 'vue',
+ 'tag',
+ ],
};
diff --git a/package.json b/package.json
index 0cd745c9b692..663fae88bf13 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,7 @@
"examples/vue-kitchen-sink",
"examples/svelte-kitchen-sink",
"examples/official-storybook",
+ "examples/riot-kitchen-sink",
"lib/cli/test/run/*"
],
"scripts": {
@@ -135,6 +136,8 @@
"remark-cli": "^5.0.0",
"remark-lint": "^6.0.2",
"remark-preset-lint-recommended": "^3.0.2",
+ "riot": "3.11.1",
+ "riot-jest-transformer": "1.0.10",
"shelljs": "^0.8.2",
"svelte-jest": "^0.2.0",
"tslint": "~5.11.0",
diff --git a/scripts/build-storybooks.sh b/scripts/build-storybooks.sh
index 772555587f41..d2426d786209 100755
--- a/scripts/build-storybooks.sh
+++ b/scripts/build-storybooks.sh
@@ -2,7 +2,7 @@
#
# This builds all the example storybooks for running chromatic on your dev machine
-examples=(angular-cli cra-kitchen-sink html-kitchen-sink marko-cli mithril-kitchen-sink polymer-cli vue-kitchen-sink svelte-kitchen-sink official-storybook)
+examples=(angular-cli cra-kitchen-sink html-kitchen-sink marko-cli mithril-kitchen-sink polymer-cli vue-kitchen-sink svelte-kitchen-sink official-storybook riot-kitchen-sink)
for example in "${examples[@]}"
do
diff --git a/scripts/test.js b/scripts/test.js
index 54a73034b025..b6efa7158d0d 100755
--- a/scripts/test.js
+++ b/scripts/test.js
@@ -44,7 +44,7 @@ const createOption = ({ defaultValue, option, name, extraParam }) => ({
const tasks = {
core: createProject({
- name: `Core & React & Vue & Polymer & Angular & Svelte ${chalk.gray('(core)')}`,
+ name: `Core & React & Vue & Polymer & Angular & Svelte & Riot ${chalk.gray('(core)')}`,
defaultValue: true,
option: '--core',
projectLocation: path.join(__dirname, '..'),
diff --git a/yarn.lock b/yarn.lock
index 9f57faaaf8f9..7c8fc7032465 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -195,7 +195,7 @@
dependencies:
"@babel/highlight" "7.0.0-rc.1"
-"@babel/core@^7.0.0-rc.3":
+"@babel/core@^7.0.0-rc.2", "@babel/core@^7.0.0-rc.3":
version "7.0.0-rc.3"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0-rc.3.tgz#0c3b5c4fcc65ea3fc7c019202aca6cd0b17705e7"
dependencies:
@@ -661,7 +661,7 @@
"@babel/helper-module-transforms" "7.0.0-rc.3"
"@babel/helper-plugin-utils" "7.0.0-rc.3"
-"@babel/plugin-transform-modules-commonjs@7.0.0-rc.3":
+"@babel/plugin-transform-modules-commonjs@7.0.0-rc.3", "@babel/plugin-transform-modules-commonjs@^7.0.0-rc.2":
version "7.0.0-rc.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.0.0-rc.3.tgz#11792a4314820bb5f149e3f5c7eed10b342220ca"
dependencies:
@@ -738,7 +738,7 @@
dependencies:
regenerator-transform "^0.13.3"
-"@babel/plugin-transform-runtime@^7.0.0-rc.3":
+"@babel/plugin-transform-runtime@^7.0.0-rc.2", "@babel/plugin-transform-runtime@^7.0.0-rc.3":
version "7.0.0-rc.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.0.0-rc.3.tgz#5a32af88f1a02e696e3e112709495a9b20bb8a2d"
dependencies:
@@ -793,7 +793,7 @@
core-js "^2.5.7"
regenerator-runtime "^0.11.1"
-"@babel/preset-env@^7.0.0-rc.3":
+"@babel/preset-env@^7.0.0-rc.2", "@babel/preset-env@^7.0.0-rc.3":
version "7.0.0-rc.3"
resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.0.0-rc.3.tgz#b05748a412614bca9f754266610b6cba8f49af10"
dependencies:
@@ -839,14 +839,14 @@
js-levenshtein "^1.1.3"
semver "^5.3.0"
-"@babel/preset-flow@^7.0.0-rc.3":
+"@babel/preset-flow@^7.0.0-rc.2", "@babel/preset-flow@^7.0.0-rc.3":
version "7.0.0-rc.3"
resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.0.0-rc.3.tgz#78927d4c4d882ad4bf9ccfe6c78d202e57ec2f90"
dependencies:
"@babel/helper-plugin-utils" "7.0.0-rc.3"
"@babel/plugin-transform-flow-strip-types" "7.0.0-rc.3"
-"@babel/preset-react@^7.0.0-rc.3":
+"@babel/preset-react@^7.0.0-rc.2", "@babel/preset-react@^7.0.0-rc.3":
version "7.0.0-rc.3"
resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.0.0-rc.3.tgz#e149390ca6042511974df3dde87e72416fc321cd"
dependencies:
@@ -878,7 +878,7 @@
dependencies:
regenerator-runtime "^0.12.0"
-"@babel/runtime@^7.0.0-rc.3":
+"@babel/runtime@^7.0.0-rc.2", "@babel/runtime@^7.0.0-rc.3":
version "7.0.0-rc.3"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.0.0-rc.3.tgz#7b0d6762220d2efa2958e72f8a661e1409c2d5d9"
dependencies:
@@ -1136,10 +1136,24 @@
dependencies:
babel-runtime "^6.5.0"
+"@types/acorn@^4.0.3":
+ version "4.0.3"
+ resolved "https://registry.yarnpkg.com/@types/acorn/-/acorn-4.0.3.tgz#d1f3e738dde52536f9aad3d3380d14e448820afd"
+ dependencies:
+ "@types/estree" "*"
+
"@types/clone@^0.1.29":
version "0.1.30"
resolved "https://registry.yarnpkg.com/@types/clone/-/clone-0.1.30.tgz#e7365648c1b42136a59c7d5040637b3b5c83b614"
+"@types/estree@*":
+ version "0.0.39"
+ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
+
+"@types/estree@0.0.38":
+ version "0.0.38"
+ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.38.tgz#c1be40aa933723c608820a99a373a16d215a1ca2"
+
"@types/jasmine@*", "@types/jasmine@~2.8.8":
version "2.8.8"
resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.8.tgz#bf53a7d193ea8b03867a38bfdb4fbb0e0bf066c9"
@@ -2195,7 +2209,7 @@ babel-core@6.26.0:
slash "^1.0.0"
source-map "^0.5.6"
-babel-core@^6.0.0, babel-core@^6.24.1, babel-core@^6.26.0, babel-core@^6.26.3, babel-core@^6.7.2:
+babel-core@^6.0.0, babel-core@^6.23.1, babel-core@^6.24.1, babel-core@^6.26.0, babel-core@^6.26.3, babel-core@^6.7.2:
version "6.26.3"
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207"
dependencies:
@@ -5675,6 +5689,12 @@ date-now@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
+date-time@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/date-time/-/date-time-2.1.0.tgz#0286d1b4c769633b3ca13e1e62558d2dbdc2eba2"
+ dependencies:
+ time-zone "^1.0.0"
+
dateformat@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
@@ -6566,6 +6586,10 @@ eslint-config-react-app@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-2.1.0.tgz#23c909f71cbaff76b945b831d2d814b8bde169eb"
+eslint-config-riot@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/eslint-config-riot/-/eslint-config-riot-1.0.0.tgz#fbd65386980b30fbcd0e1305d4c3fb8614ef2119"
+
eslint-import-resolver-node@^0.3.1:
version "0.3.2"
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a"
@@ -6858,6 +6882,10 @@ estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
+estree-walker@^0.5.2:
+ version "0.5.2"
+ resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.5.2.tgz#d3850be7529c9580d815600b53126515e146dd39"
+
esutils@^2.0.0, esutils@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
@@ -9225,6 +9253,12 @@ is-redirect@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24"
+is-reference@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.1.0.tgz#50e6ef3f64c361e2c53c0416cdc9420037f2685b"
+ dependencies:
+ "@types/estree" "0.0.38"
+
is-regex@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
@@ -10911,6 +10945,10 @@ localtunnel@^1.8.3:
openurl "1.1.1"
yargs "6.6.0"
+locate-character@^2.0.5:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/locate-character/-/locate-character-2.0.5.tgz#f2d2614d49820ecb3c92d80d193b8db755f74c0f"
+
locate-path@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
@@ -10990,6 +11028,10 @@ lodash.defaults@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
+lodash.every@^4.6.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.every/-/lodash.every-4.6.0.tgz#eb89984bebc4364279bb3aefbbd1ca19bfa6c6a7"
+
lodash.find@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.find/-/lodash.find-4.6.0.tgz#cb0704d47ab71789ffa0de8b97dd926fb88b13b1"
@@ -10998,6 +11040,10 @@ lodash.flattendeep@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2"
+lodash.foreach@^4.5.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53"
+
lodash.includes@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f"
@@ -11061,6 +11107,14 @@ lodash.keys@^4.0.8:
version "4.2.0"
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-4.2.0.tgz#a08602ac12e4fb83f91fc1fb7a360a4d9ba35205"
+lodash.map@^4.6.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3"
+
+lodash.maxby@^4.6.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.maxby/-/lodash.maxby-4.6.0.tgz#082240068f3c7a227aa00a8380e4f38cf0786e3d"
+
lodash.memoize@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
@@ -11848,7 +11902,7 @@ module-deps@^6.0.0:
through2 "^2.0.0"
xtend "^4.0.0"
-moment@^2.6.0:
+moment@^2.22.2, moment@^2.6.0:
version "2.22.2"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66"
@@ -12915,6 +12969,10 @@ parse-link-header@^1.0.1:
dependencies:
xtend "~4.0.1"
+parse-ms@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-1.0.1.tgz#56346d4749d78f23430ca0c713850aef91aa361d"
+
parse-passwd@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6"
@@ -13648,6 +13706,12 @@ pretty-format@^4.2.1:
version "4.3.1"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-4.3.1.tgz#530be5c42b3c05b36414a7a2a4337aa80acd0e8d"
+pretty-ms@^3.1.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-3.2.0.tgz#87a8feaf27fc18414d75441467d411d6e6098a25"
+ dependencies:
+ parse-ms "^1.0.0"
+
prismjs@^1.8.4, prismjs@~1.15.0:
version "1.15.0"
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.15.0.tgz#8801d332e472091ba8def94976c8877ad60398d9"
@@ -15283,6 +15347,10 @@ require-main-filename@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
+require-relative@^0.8.7:
+ version "0.8.7"
+ resolved "https://registry.yarnpkg.com/require-relative/-/require-relative-0.8.7.tgz#7999539fc9e047a37928fa196f8e1563dabd36de"
+
require-self-ref@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/require-self-ref/-/require-self-ref-2.0.1.tgz#4004901fa930c8c19dddccaec613854ec8baca9b"
@@ -15410,6 +15478,63 @@ rimraf@~2.2.6:
version "2.2.8"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582"
+riot-cli@^4.0.2:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/riot-cli/-/riot-cli-4.1.0.tgz#500520af825772d5455028a4f2699d13ff326fa2"
+ dependencies:
+ chalk "^2.3.2"
+ chokidar "^2.0.3"
+ co "^4.6.0"
+ optionator "^0.8.2"
+ riot-compiler "^3.5.1"
+ rollup "^0.57.1"
+
+riot-compiler@^3.5.1:
+ version "3.5.1"
+ resolved "https://registry.yarnpkg.com/riot-compiler/-/riot-compiler-3.5.1.tgz#ab4abb861fdb630765de6685091f967061de49df"
+ dependencies:
+ skip-regex "^0.3.1"
+ source-map "^0.7.2"
+ string-similarity "^1.2.0"
+
+riot-hot-reload@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/riot-hot-reload/-/riot-hot-reload-1.0.0.tgz#a99da0659ca0eff6e140758454e687f7c06e4ebe"
+
+riot-jest-transformer@1.0.10:
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/riot-jest-transformer/-/riot-jest-transformer-1.0.10.tgz#be682bcabf978258847a0825ef948d5afef0b5ca"
+ dependencies:
+ babel-core "^6.23.1"
+ riot "^3.3.1"
+
+riot-observable@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/riot-observable/-/riot-observable-3.0.0.tgz#8bbd2daf72a2141bb043082df4023dc504bad2eb"
+
+riot-tag-loader@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/riot-tag-loader/-/riot-tag-loader-2.1.0.tgz#396926e5711d31002380bfb92cf67f9a54262d41"
+ dependencies:
+ loader-utils "^1.1.0"
+
+riot-tmpl@^3.0.8:
+ version "3.0.8"
+ resolved "https://registry.yarnpkg.com/riot-tmpl/-/riot-tmpl-3.0.8.tgz#dd654e72a3a1520cb009cbef70c73856ded584a6"
+ dependencies:
+ eslint-config-riot "^1.0.0"
+
+riot@3.11.1, riot@^3.11.1, riot@^3.3.1:
+ version "3.11.1"
+ resolved "https://registry.yarnpkg.com/riot/-/riot-3.11.1.tgz#f98bbcaa6cbf74cbd3be5c1aa3abf8b9f731dd5b"
+ dependencies:
+ riot-cli "^4.0.2"
+ riot-compiler "^3.5.1"
+ riot-observable "^3.0.0"
+ riot-tmpl "^3.0.8"
+ simple-dom "1.3.0"
+ simple-html-tokenizer "^0.5.1"
+
ripemd160@^2.0.0, ripemd160@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c"
@@ -15421,6 +15546,29 @@ rndm@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/rndm/-/rndm-1.2.0.tgz#f33fe9cfb52bbfd520aa18323bc65db110a1b76c"
+rollup-pluginutils@^2.0.1:
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.3.1.tgz#760d185ccc237dedc12d7ae48c6bcd127b4892d0"
+ dependencies:
+ estree-walker "^0.5.2"
+ micromatch "^2.3.11"
+
+rollup@^0.57.1:
+ version "0.57.1"
+ resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.57.1.tgz#0bb28be6151d253f67cf4a00fea48fb823c74027"
+ dependencies:
+ "@types/acorn" "^4.0.3"
+ acorn "^5.5.3"
+ acorn-dynamic-import "^3.0.0"
+ date-time "^2.1.0"
+ is-reference "^1.1.0"
+ locate-character "^2.0.5"
+ pretty-ms "^3.1.0"
+ require-relative "^0.8.7"
+ rollup-pluginutils "^2.0.1"
+ signal-exit "^3.0.2"
+ sourcemap-codec "^1.4.1"
+
routes-table@^1.2.1:
version "1.2.5"
resolved "https://registry.yarnpkg.com/routes-table/-/routes-table-1.2.5.tgz#a36dc6da809bd132e783244bbfc0362fb86bcb34"
@@ -15930,6 +16078,14 @@ simple-concat@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.0.tgz#7344cbb8b6e26fb27d66b2fc86f9f6d5997521c6"
+simple-dom@1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/simple-dom/-/simple-dom-1.3.0.tgz#8473e0d34e340544b061410dba3faf4f1b7aa282"
+
+simple-html-tokenizer@^0.5.1:
+ version "0.5.5"
+ resolved "https://registry.yarnpkg.com/simple-html-tokenizer/-/simple-html-tokenizer-0.5.5.tgz#110e63f2fe095e1f21f2f07e8c259a5ab6d6bebb"
+
simple-plist@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-0.2.1.tgz#71766db352326928cf3a807242ba762322636723"
@@ -15948,6 +16104,10 @@ sisteransi@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-0.1.1.tgz#5431447d5f7d1675aac667ccd0b865a4994cb3ce"
+skip-regex@^0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/skip-regex/-/skip-regex-0.3.1.tgz#17919aae2ac4ce3d61d5e77eedd88206c64aa215"
+
slash@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
@@ -16205,6 +16365,10 @@ source-map@~0.2.0:
dependencies:
amdefine ">=0.0.4"
+sourcemap-codec@^1.4.1:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz#c8fd92d91889e902a07aee392bdd2c5863958ba2"
+
space-separated-tokens@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.2.tgz#e95ab9d19ae841e200808cd96bc7bd0adbbb3412"
@@ -16460,6 +16624,16 @@ string-length@^2.0.0:
astral-regex "^1.0.0"
strip-ansi "^4.0.0"
+string-similarity@^1.2.0:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/string-similarity/-/string-similarity-1.2.1.tgz#a1e01012e8221587409816c133c28037ea6be2e6"
+ dependencies:
+ lodash.every "^4.6.0"
+ lodash.flattendeep "^4.4.0"
+ lodash.foreach "^4.5.0"
+ lodash.map "^4.6.0"
+ lodash.maxby "^4.6.0"
+
string-width@^1.0.0, string-width@^1.0.1, string-width@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
@@ -16926,6 +17100,10 @@ time-stamp@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.0.1.tgz#708a89359c1fc50bd5e7b1c8aa750d08c9172232"
+time-zone@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/time-zone/-/time-zone-1.0.0.tgz#99c5bf55958966af6d06d83bdf3800dc82faec5d"
+
timed-out@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f"