Skip to content

Commit

Permalink
feat: new showcase package
Browse files Browse the repository at this point in the history
Showcase builds example versions of the UI repos
  • Loading branch information
ifiokjr committed Jun 11, 2019
1 parent cf5477c commit 18255c9
Show file tree
Hide file tree
Showing 27 changed files with 5,255 additions and 52,472 deletions.
1 change: 1 addition & 0 deletions @remirror/showcase/.babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('../../support/babel/base.babel');
7 changes: 7 additions & 0 deletions @remirror/showcase/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const config = require('../../support/jest/jest.config');

module.exports = {
...config,
name: '@remirror/showcase',
displayName: 'showcase',
};
71 changes: 71 additions & 0 deletions @remirror/showcase/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"name": "@remirror/showcase",
"description": "ui for a what you see is what you get (wysiwyg) editing experience",
"license": "MIT",
"author": "Ifiok Jr. <ifiokotung@gmail.com>",
"homepage": "https://github.com/ifiokjr/remirror/tree/master/@remirror/showcase",
"repository": {
"type": "git",
"url": "https://github.com/ifiokjr/remirror.git",
"directory": "@remirror/showcase"
},
"version": "0.0.1-alpha.11",
"main": "lib/index.js",
"module": "lib/dist/showcase.esm.js",
"files": [
"lib",
"src"
],
"scripts": {
"build": "run-p build:*",
"build:babel": "babel src --out-dir lib --extensions \".ts,.tsx\" -s",
"build:declaration": "tsc -p ./tsconfig.prod.json --emitDeclarationOnly --declarationMap",
"dev": "run-p watch:*",
"dev:babel": "babel src --out-dir lib --extensions \".ts,.tsx\" -s --watch",
"dev:declaration": "tsc -p ./tsconfig.prod.json --emitDeclarationOnly --declarationMap --watch",
"lint": "tslint --project tsconfig.json --config ../../tslint.json",
"test": "jest",
"test:live": "cross-env TEST_ENV=live jest",
"typecheck": "tsc -p ./tsconfig.json --noEmit",
"watch:babel": "babel src --out-dir lib --extensions \".ts,.tsx\" -w",
"watch:declaration": "tsc -p ./tsconfig.prod.json --emitDeclarationOnly --declarationMap --watch"
},
"types": "lib/index.d.ts",
"dependencies": {
"@remirror/ui-twitter": "0.0.1-alpha.11",
"@remirror/ui-wysiwyg": "0.0.1-alpha.11",
"emoji-mart": "2.11.1",
"match-sorter": "3.1.0",
"@babel/runtime": "^7.4.5",
"@emotion/core": "^10",
"@emotion/styled": "^10.0.12",
"@fortawesome/fontawesome-svg-core": "^1.2.19",
"@fortawesome/free-solid-svg-icons": "^5.9.0",
"@fortawesome/react-fontawesome": "^0.1.4",
"@remirror/core": "0.0.1-alpha.11",
"@remirror/core-extensions": "0.0.1-alpha.11",
"@remirror/extension-emoji": "0.0.1-alpha.11",
"@remirror/react": "0.0.1-alpha.11",
"@remirror/react-utils": "0.0.1-alpha.11",
"deepmerge": "^3.2.0",
"emotion-theming": "^10",
"keycode": "^2.2.0"
},
"peerDependencies": {
"@types/react": "^16.8.0",
"@types/react-dom": "^16.8.0",
"react": "^16.8.0",
"react-dom": "^16.8.0"
},
"publishConfig": {
"access": "public"
},
"cjs": "lib/dist/showcase.cjs.js",
"umd": "lib/dist/showcase.umd.js",
"umd:min": "lib/dist/showcase.umd.min.js",
"umdGlobals": {
"react": "React",
"@remirror/core": "RemirrorCore",
"react-dom": "ReactDOM"
}
}
29 changes: 29 additions & 0 deletions @remirror/showcase/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div align="center">
<br />
<div align="center">
<img width="300" src="https://cdn.jsdelivr.net/gh/ifiokjr/remirror/support/assets/logo-icon.svg" alt="remirror" />
<h1 align="center">showcase</h1>
</div>
<br />
<br />
<br />
<br />
</div>

[![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/@remirror/showcase.svg?style=for-the-badge)](https://bundlephobia.com/result?p=@remirror/showcase) [![npm](https://img.shields.io/npm/dm/@remirror/showcase.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/@remirror/showcase) [![Dependencies (path)](https://img.shields.io/david/ifiokjr/remirror.svg?logo=npm&path=@remirror%2Fshowcase&style=for-the-badge)](https://github.com/ifiokjr/remirror/blob/master/@remirror/showcase/package.json) [![NPM](https://img.shields.io/npm/l/@remirror/showcase.svg?style=for-the-badge)](https://github.com/ifiokjr/remirror/blob/master/LICENSE) [![GitHub issues by-label](https://img.shields.io/github/issues/ifiokjr/remirror/@remirror/showcase.svg?label=Open%20Issues&logo=github&style=for-the-badge)](https://github.com/ifiokjr/remirror/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%40remirror%2Fshowcase) [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/ifiokjr/remirror/@remirror/showcase.svg?label=Open%20Pull%20Requests&logo=github&style=for-the-badge)](https://github.com/ifiokjr/remirror/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+sort%3Aupdated-desc+label%3A%40remirror%2Fshowcase)

A collection of demonstrations for quick usage of the codebase. Every UI package has an associated demonstration showcasing how it can be used.

## Installation

```bash
yarn add @remirror/showcase
```

The recommendation is to import from the direct files.

```tsx
import { UITwitterDemo, UITwitterDemoProps } from '@remirror/showcase/lib/ui-twitter';

const MyEditor = () => <UITwitterDemo />;
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import { storiesOf } from '@storybook/react';
import { ExampleTwitterUI } from '../ui-twitter';
import { ExampleTwitterUI } from '../twitter';

storiesOf('Twitter UI', module).add('Basic', () => <ExampleTwitterUI />);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import { storiesOf } from '@storybook/react';
import { ExampleWysiwygUI } from '../ui-wysiwyg';
import { ExampleWysiwygUI, initialContent } from '../wysiwyg';

storiesOf('Wysiwyg', module).add('Basic', () => <ExampleWysiwygUI />);
storiesOf('Wysiwyg', module).add('Basic', () => <ExampleWysiwygUI initialContent={initialContent} />);

0 comments on commit 18255c9

Please sign in to comment.