├── .nvmrc ├── screenshots ├── gcom.png └── gcon.png ├── generators ├── container │ ├── Loadable.js.hbs │ ├── saga.js.hbs │ ├── selectors.js.hbs │ ├── saga.test.js.hbs │ ├── test.js.hbs │ ├── reducer.js.hbs │ ├── selectors.test.js.hbs │ ├── reducer.test.js.hbs │ ├── index.js.hbs │ ├── existing │ │ └── index.js │ └── new │ │ └── index.js ├── loadable │ ├── loadable.js.hbs │ └── index.js ├── component │ ├── stories.js.hbs │ ├── index.js.hbs │ ├── test.js.hbs │ ├── new │ │ └── index.js │ └── existing │ │ └── index.js ├── webpack │ └── base │ │ └── babel │ │ ├── index.js │ │ └── babel.js.hbs ├── testUtil │ ├── index.js │ └── testUtils.js.hbs └── index.js ├── .prettierignore ├── testing └── test-bundler.js ├── generated-files ├── container │ └── HomeContainer │ │ ├── Loadable.js │ │ ├── saga.js │ │ ├── tests │ │ ├── selectors.test.js │ │ ├── saga.test.js │ │ ├── index.test.js │ │ └── reducer.test.js │ │ ├── selectors.js │ │ ├── reducer.js │ │ └── index.js ├── loadable │ └── loadable.js ├── component │ └── Button │ │ ├── stories │ │ └── Button.stories.js │ │ ├── index.js │ │ └── tests │ │ └── index.test.js └── test-util │ └── testUtils.js ├── .prettierrc ├── .eslintignore ├── .stylelintrc ├── .gitignore ├── .github ├── pull_request_template.md └── workflows │ └── npm-publish.yml ├── .eslintrc.js ├── babel.config.js ├── jest.config.js ├── LICENSE ├── package.json ├── README.md ├── react_floki_github.svg ├── floki.svg └── bin └── react-generate.js /.nvmrc: -------------------------------------------------------------------------------- 1 | lts/dubnium 2 | -------------------------------------------------------------------------------- /screenshots/gcom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wednesday-solutions/react-floki/HEAD/screenshots/gcom.png -------------------------------------------------------------------------------- /screenshots/gcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wednesday-solutions/react-floki/HEAD/screenshots/gcon.png -------------------------------------------------------------------------------- /generators/container/Loadable.js.hbs: -------------------------------------------------------------------------------- 1 | import loadable from '@utils/loadable'; 2 | 3 | export default loadable(() => import('./index')); 4 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | build/ 2 | node_modules/ 3 | internals/generators/ 4 | internals/scripts/ 5 | package-lock.json 6 | yarn.lock 7 | package.json 8 | -------------------------------------------------------------------------------- /testing/test-bundler.js: -------------------------------------------------------------------------------- 1 | // needed for regenerator-runtime 2 | // (ES7 generator support is required by redux-saga) 3 | import '@babel/polyfill'; 4 | -------------------------------------------------------------------------------- /generated-files/container/HomeContainer/Loadable.js: -------------------------------------------------------------------------------- 1 | import loadable from '@utils/loadable'; 2 | 3 | export default loadable(() => import('./index')); 4 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": true, 6 | "singleQuote": true, 7 | "trailingComma": "all" 8 | } 9 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | # Don't check auto-generated stuff into git 2 | coverage 3 | build 4 | node_modules 5 | stats.json 6 | 7 | # Cruft 8 | .DS_Store 9 | npm-debug.log 10 | .idea 11 | generated-files -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "processors": ["stylelint-processor-styled-components"], 3 | "extends": [ 4 | "stylelint-config-recommended", 5 | "stylelint-config-styled-components" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Don't check auto-generated stuff into git 2 | coverage 3 | build 4 | node_modules 5 | stats.json 6 | 7 | # Cruft 8 | .DS_Store 9 | npm-debug.log 10 | .idea 11 | .vscode/** 12 | app/** 13 | -------------------------------------------------------------------------------- /generators/loadable/loadable.js.hbs: -------------------------------------------------------------------------------- 1 | import React, { lazy, Suspense } from 'react' 2 | 3 | const loadable = (importFunc, { fallback = null } = { fallback: null }) => { 4 | const LazyComponent = lazy(importFunc) 5 | 6 | return props => ( 7 | 8 | 9 | 10 | ) 11 | } 12 | 13 | export default loadable 14 | -------------------------------------------------------------------------------- /generated-files/loadable/loadable.js: -------------------------------------------------------------------------------- 1 | import React, { lazy, Suspense } from 'react'; 2 | 3 | const loadable = (importFunc, { fallback = null } = { fallback: null }) => { 4 | const LazyComponent = lazy(importFunc); 5 | 6 | return props => ( 7 | 8 | 9 | 10 | ); 11 | }; 12 | 13 | export default loadable; 14 | -------------------------------------------------------------------------------- /generators/component/stories.js.hbs: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Stories for {{ properCase name }} 4 | * 5 | * @see https://github.com/storybookjs/storybook 6 | * 7 | */ 8 | 9 | import React from 'react'; 10 | import { storiesOf } from '@storybook/react'; 11 | import { {{ properCase name }} } from '../index'; 12 | 13 | 14 | storiesOf('{{properCase name}}').add('simple', () => <{{properCase name}} />); 15 | -------------------------------------------------------------------------------- /generated-files/component/Button/stories/Button.stories.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * Stories for Button 4 | * 5 | * @see https://github.com/storybookjs/storybook 6 | * 7 | */ 8 | 9 | import React from 'react'; 10 | import { storiesOf } from '@storybook/react'; 11 | import { text } from '@storybook/addon-knobs'; 12 | import Button from '../index'; 13 | 14 | storiesOf('Button').add('simple', () =>