From be576c2d1ba02a9747bc7c4dccfbd7f87bc0b43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Villulles?= Date: Wed, 17 Jun 2020 22:37:32 +0100 Subject: [PATCH 1/2] Added flow as template --- lib/cli.js | 4 +- lib/prompt-library-params.js | 2 +- package-lock.json | 2 +- template/flow/.editorconfig | 9 ++ template/flow/.eslintignore | 5 ++ template/flow/.eslintrc | 91 +++++++++++++++++++++ template/flow/.gitignore | 20 +++++ template/flow/.prettierrc | 10 +++ template/flow/.travis.yml | 4 + template/flow/README.md | 30 +++++++ template/flow/example/README.md | 5 ++ template/flow/example/package.json | 30 +++++++ template/flow/example/public/favicon.ico | Bin 0 -> 3870 bytes template/flow/example/public/index.html | 48 +++++++++++ template/flow/example/public/manifest.json | 15 ++++ template/flow/example/src/App.js | 10 +++ template/flow/example/src/App.test.js | 9 ++ template/flow/example/src/index.css | 14 ++++ template/flow/example/src/index.js | 7 ++ template/flow/package.json | 55 +++++++++++++ template/flow/src/.eslintrc | 5 ++ template/flow/src/index.js | 9 ++ template/flow/src/index.test.js | 7 ++ template/flow/src/styles.module.css | 9 ++ 24 files changed, 396 insertions(+), 4 deletions(-) create mode 100644 template/flow/.editorconfig create mode 100644 template/flow/.eslintignore create mode 100644 template/flow/.eslintrc create mode 100644 template/flow/.gitignore create mode 100644 template/flow/.prettierrc create mode 100644 template/flow/.travis.yml create mode 100644 template/flow/README.md create mode 100644 template/flow/example/README.md create mode 100644 template/flow/example/package.json create mode 100644 template/flow/example/public/favicon.ico create mode 100644 template/flow/example/public/index.html create mode 100644 template/flow/example/public/manifest.json create mode 100644 template/flow/example/src/App.js create mode 100644 template/flow/example/src/App.test.js create mode 100644 template/flow/example/src/index.css create mode 100644 template/flow/example/src/index.js create mode 100644 template/flow/package.json create mode 100644 template/flow/src/.eslintrc create mode 100644 template/flow/src/index.js create mode 100644 template/flow/src/index.test.js create mode 100644 template/flow/src/styles.module.css diff --git a/lib/cli.js b/lib/cli.js index cf5510f..fb4bc0d 100755 --- a/lib/cli.js +++ b/lib/cli.js @@ -29,9 +29,9 @@ module.exports = async () => { defaults.manager ) .option( - '-t, --template ', + '-t, --template ', 'package template to use', - /^(default|typescript|custom)$/, + /^(default|typescript|flow|custom)$/, defaults.template ) .option('-p, --template-path ', 'custom package template path') diff --git a/lib/prompt-library-params.js b/lib/prompt-library-params.js index ab0e0d2..8505c0d 100644 --- a/lib/prompt-library-params.js +++ b/lib/prompt-library-params.js @@ -73,7 +73,7 @@ module.exports = async (opts) => { type: 'list', name: 'template', message: 'Template', - choices: ['default', 'typescript', 'custom'], + choices: ['default', 'typescript','flow', 'custom'], default: opts.template }, { diff --git a/package-lock.json b/package-lock.json index 2ef128c..c1cdcd5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "create-react-library", - "version": "3.0.8", + "version": "3.1.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/template/flow/.editorconfig b/template/flow/.editorconfig new file mode 100644 index 0000000..9d08a1a --- /dev/null +++ b/template/flow/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/template/flow/.eslintignore b/template/flow/.eslintignore new file mode 100644 index 0000000..a804767 --- /dev/null +++ b/template/flow/.eslintignore @@ -0,0 +1,5 @@ +build/ +dist/ +node_modules/ +.snapshots/ +*.min.js \ No newline at end of file diff --git a/template/flow/.eslintrc b/template/flow/.eslintrc new file mode 100644 index 0000000..d810f78 --- /dev/null +++ b/template/flow/.eslintrc @@ -0,0 +1,91 @@ +{ + "parser": "babel-eslint", + "extends": [ + "standard", + "standard-react", + "plugin:prettier/recommended", + "prettier/standard", + "prettier/react", + "flowtype" + ], + "env": { + "node": true + }, + "parserOptions": { + "ecmaVersion": 2020, + "ecmaFeatures": { + "legacyDecorators": true, + "jsx": true + } + }, + "settings": { + "react": { + "version": "16" + } + }, + "rules": { + "space-before-function-paren": 0, + "react/prop-types": 0, + "react/jsx-handler-names": 0, + "react/jsx-fragments": 0, + "react/no-unused-prop-types": 0, + "import/export": 0, + "flowtype/boolean-style": [ + 2, + "boolean" + ], + "flowtype/define-flow-type": 1, + "flowtype/delimiter-dangle": [ + 2, + "never" + ], + "flowtype/generic-spacing": [ + 2, + "never" + ], + "flowtype/no-mixed": 2, + "flowtype/no-primitive-constructor-types": 2, + "flowtype/no-types-missing-file-annotation": 2, + "flowtype/no-weak-types": 2, + "flowtype/object-type-delimiter": [ + 2, + "comma" + ], + "flowtype/require-parameter-type": 2, + "flowtype/require-readonly-react-props": 0, + "flowtype/require-return-type": [ + 2, + "always", + { + "annotateUndefined": "never" + } + ], + "flowtype/require-valid-file-annotation": 2, + "flowtype/semi": [ + 2, + "always" + ], + "flowtype/space-after-type-colon": [ + 2, + "always" + ], + "flowtype/space-before-generic-bracket": [ + 2, + "never" + ], + "flowtype/space-before-type-colon": [ + 2, + "never" + ], + "flowtype/type-id-match": [ + 2, + "^([A-Z][a-z0-9]+)+Type$" + ], + "flowtype/union-intersection-spacing": [ + 2, + "always" + ], + "flowtype/use-flow-type": 1, + "flowtype/valid-syntax": 1 + } +} diff --git a/template/flow/.gitignore b/template/flow/.gitignore new file mode 100644 index 0000000..11a6b34 --- /dev/null +++ b/template/flow/.gitignore @@ -0,0 +1,20 @@ +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# dependencies +node_modules + +# builds +build +dist + +# misc +.DS_Store +.env +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/template/flow/.prettierrc b/template/flow/.prettierrc new file mode 100644 index 0000000..a9646d4 --- /dev/null +++ b/template/flow/.prettierrc @@ -0,0 +1,10 @@ +{ + "singleQuote": true, + "jsxSingleQuote": true, + "semi": false, + "tabWidth": 2, + "bracketSpacing": true, + "jsxBracketSameLine": false, + "arrowParens": "always", + "trailingComma": "none" +} diff --git a/template/flow/.travis.yml b/template/flow/.travis.yml new file mode 100644 index 0000000..c66a67b --- /dev/null +++ b/template/flow/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 12 + - 10 diff --git a/template/flow/README.md b/template/flow/README.md new file mode 100644 index 0000000..3f41932 --- /dev/null +++ b/template/flow/README.md @@ -0,0 +1,30 @@ +# {{name}} + +> {{description}} + +[![NPM](https://img.shields.io/npm/v/{{name}}.svg)](https://www.npmjs.com/package/{{name}}) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) + +## Install + +```bash +npm install --save {{name}} +``` + +## Usage + +```jsx +import React, { Component } from 'react' + +import MyComponent from '{{name}}' +import '{{name}}/dist/index.css' + +class Example extends Component { + render() { + return + } +} +``` + +## License + +{{license}} © [{{author}}](https://github.com/{{author}}) diff --git a/template/flow/example/README.md b/template/flow/example/README.md new file mode 100644 index 0000000..5e14127 --- /dev/null +++ b/template/flow/example/README.md @@ -0,0 +1,5 @@ +This example was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). + +It is linked to the {{name}} package in the parent directory for development purposes. + +You can run `{{manager}} install` and then `{{manager}} start` to test your package. diff --git a/template/flow/example/package.json b/template/flow/example/package.json new file mode 100644 index 0000000..989a78e --- /dev/null +++ b/template/flow/example/package.json @@ -0,0 +1,30 @@ +{ + "name": "{{name}}-example", + "homepage": ".", + "version": "0.0.0", + "private": true, + "scripts": { + "start": "node ../node_modules/react-scripts/bin/react-scripts.js start", + "build": "node ../node_modules/react-scripts/bin/react-scripts.js build", + "test": "node ../node_modules/react-scripts/bin/react-scripts.js test", + "eject": "node ../node_modules/react-scripts/bin/react-scripts.js eject" + }, + "dependencies": { + "react": "{{#if yarn}}link:..{{else}}file:..{{/if}}/node_modules/react", + "react-dom": "{{#if yarn}}link:..{{else}}file:..{{/if}}/node_modules/react-dom", + "react-scripts": "{{#if yarn}}link:..{{else}}file:..{{/if}}/node_modules/react-scripts", + "{{name}}": "{{#if yarn}}link:..{{else}}file:..{{/if}}" + }, + "devDependencies": { + "@babel/plugin-syntax-object-rest-spread": "^7.8.3" + }, + "eslintConfig": { + "extends": "react-app" + }, + "browserslist": [ + ">0.2%", + "not dead", + "not ie <= 11", + "not op_mini all" + ] +} diff --git a/template/flow/example/public/favicon.ico b/template/flow/example/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a11777cc471a4344702741ab1c8a588998b1311a GIT binary patch literal 3870 zcma);c{J4h9>;%nil|2-o+rCuEF-(I%-F}ijC~o(k~HKAkr0)!FCj~d>`RtpD?8b; zXOC1OD!V*IsqUwzbMF1)-gEDD=A573Z-&G7^LoAC9|WO7Xc0Cx1g^Zu0u_SjAPB3vGa^W|sj)80f#V0@M_CAZTIO(t--xg= z!sii`1giyH7EKL_+Wi0ab<)&E_0KD!3Rp2^HNB*K2@PHCs4PWSA32*-^7d{9nH2_E zmC{C*N*)(vEF1_aMamw2A{ZH5aIDqiabnFdJ|y0%aS|64E$`s2ccV~3lR!u<){eS` z#^Mx6o(iP1Ix%4dv`t@!&Za-K@mTm#vadc{0aWDV*_%EiGK7qMC_(`exc>-$Gb9~W!w_^{*pYRm~G zBN{nA;cm^w$VWg1O^^<6vY`1XCD|s_zv*g*5&V#wv&s#h$xlUilPe4U@I&UXZbL z0)%9Uj&@yd03n;!7do+bfixH^FeZ-Ema}s;DQX2gY+7g0s(9;`8GyvPY1*vxiF&|w z>!vA~GA<~JUqH}d;DfBSi^IT*#lrzXl$fNpq0_T1tA+`A$1?(gLb?e#0>UELvljtQ zK+*74m0jn&)5yk8mLBv;=@}c{t0ztT<v;Avck$S6D`Z)^c0(jiwKhQsn|LDRY&w(Fmi91I7H6S;b0XM{e zXp0~(T@k_r-!jkLwd1_Vre^v$G4|kh4}=Gi?$AaJ)3I+^m|Zyj#*?Kp@w(lQdJZf4 z#|IJW5z+S^e9@(6hW6N~{pj8|NO*>1)E=%?nNUAkmv~OY&ZV;m-%?pQ_11)hAr0oAwILrlsGawpxx4D43J&K=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|5a~UuoN=q&6N}EJPV_GD`&M*v8Y`^2j zKII*d_@Fi$+i*YEW+Hbzn{iQk~yP z>7N{S4)r*!NwQ`(qcN#8SRQsNK6>{)X12nbF`*7#ecO7I)Q$uZsV+xS4E7aUn+U(K baj7?x%VD!5Cxk2YbYLNVeiXvvpMCWYo=by@ literal 0 HcmV?d00001 diff --git a/template/flow/example/public/index.html b/template/flow/example/public/index.html new file mode 100644 index 0000000..6645a62 --- /dev/null +++ b/template/flow/example/public/index.html @@ -0,0 +1,48 @@ + + + + + + + + + + + + + {{name}} + + + + + +
+ + + + diff --git a/template/flow/example/public/manifest.json b/template/flow/example/public/manifest.json new file mode 100644 index 0000000..26684fe --- /dev/null +++ b/template/flow/example/public/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "{{name}}", + "name": "{{name}}", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/template/flow/example/src/App.js b/template/flow/example/src/App.js new file mode 100644 index 0000000..5c55c53 --- /dev/null +++ b/template/flow/example/src/App.js @@ -0,0 +1,10 @@ +import React from 'react' + +import { ExampleComponent } from '{{name}}' +import '{{name}}/dist/index.css' + +const App = () => { + return +} + +export default App diff --git a/template/flow/example/src/App.test.js b/template/flow/example/src/App.test.js new file mode 100644 index 0000000..4bf1935 --- /dev/null +++ b/template/flow/example/src/App.test.js @@ -0,0 +1,9 @@ +import React from 'react' +import ReactDOM from 'react-dom' +import App from './App' + +it('renders without crashing', () => { + const div = document.createElement('div') + ReactDOM.render(, div) + ReactDOM.unmountComponentAtNode(div) +}) diff --git a/template/flow/example/src/index.css b/template/flow/example/src/index.css new file mode 100644 index 0000000..e2bd8f3 --- /dev/null +++ b/template/flow/example/src/index.css @@ -0,0 +1,14 @@ +body { + margin: 0; + padding: 0; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', + 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +code { + font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', + monospace; +} diff --git a/template/flow/example/src/index.js b/template/flow/example/src/index.js new file mode 100644 index 0000000..90b6253 --- /dev/null +++ b/template/flow/example/src/index.js @@ -0,0 +1,7 @@ +import './index.css' + +import React from 'react' +import ReactDOM from 'react-dom' +import App from './App' + +ReactDOM.render(, document.getElementById('root')) diff --git a/template/flow/package.json b/template/flow/package.json new file mode 100644 index 0000000..c2a8c5d --- /dev/null +++ b/template/flow/package.json @@ -0,0 +1,55 @@ +{ + "name": "{{name}}", + "version": "1.0.0", + "description": "{{description}}", + "author": "{{author}}", + "license": "{{license}}", + "repository": "{{repo}}", + "main": "dist/index.js", + "module": "dist/index.modern.js", + "source": "src/index.js", + "engines": { + "node": ">=10" + }, + "scripts": { + "build": "microbundle-crl --no-compress --format modern,cjs", + "start": "microbundle-crl watch --no-compress --format modern,cjs", + "prepare": "run-s build", + "test": "run-s test:unit test:lint test:build", + "test:build": "run-s build", + "test:lint": "eslint .", + "test:unit": "cross-env CI=1 react-scripts test --env=jsdom", + "test:watch": "react-scripts test --env=jsdom", + "predeploy": "cd example && {{manager}} install && {{manager}} run build", + "deploy": "gh-pages -d example/build" + }, + "peerDependencies": { + "react": "^16.0.0" + }, + "devDependencies": { + "microbundle-crl": "^0.13.10", + "babel-eslint": "^10.0.3", + "cross-env": "^7.0.2", + "eslint": "^6.8.0", + "eslint-config-prettier": "^6.7.0", + "eslint-config-standard": "^14.1.0", + "eslint-config-standard-react": "^9.2.0", + "eslint-plugin-import": "^2.18.2", + "eslint-plugin-node": "^11.0.0", + "eslint-plugin-prettier": "^3.1.1", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-react": "^7.17.0", + "eslint-plugin-standard": "^4.0.1", + "gh-pages": "^2.2.0", + "npm-run-all": "^4.1.5", + "prettier": "^2.0.4", + "react": "^16.13.1", + "react-dom": "^16.13.1", + "react-scripts": "^3.4.1", + "@babel/preset-flow": "^7.10.1", + "eslint-plugin-flowtype": "^5.1.3" + }, + "files": [ + "dist" + ] +} diff --git a/template/flow/src/.eslintrc b/template/flow/src/.eslintrc new file mode 100644 index 0000000..55f121d --- /dev/null +++ b/template/flow/src/.eslintrc @@ -0,0 +1,5 @@ +{ + "env": { + "jest": true + } +} diff --git a/template/flow/src/index.js b/template/flow/src/index.js new file mode 100644 index 0000000..54a80d7 --- /dev/null +++ b/template/flow/src/index.js @@ -0,0 +1,9 @@ +// @flow + +import React from 'react' +import type { Element } from 'react' +import styles from './styles.module.css' + +export const ExampleComponent = ({ text }): Element => { + return
Example Component: {text}
+} diff --git a/template/flow/src/index.test.js b/template/flow/src/index.test.js new file mode 100644 index 0000000..a0f0449 --- /dev/null +++ b/template/flow/src/index.test.js @@ -0,0 +1,7 @@ +import { ExampleComponent } from '.' + +describe('ExampleComponent', () => { + it('is truthy', () => { + expect(ExampleComponent).toBeTruthy() + }) +}) diff --git a/template/flow/src/styles.module.css b/template/flow/src/styles.module.css new file mode 100644 index 0000000..41006b5 --- /dev/null +++ b/template/flow/src/styles.module.css @@ -0,0 +1,9 @@ +/* add css module styles here (optional) */ + +.test { + margin: 2em; + padding: 0.5em; + border: 2px solid #000; + font-size: 2em; + text-align: center; +} From cbe54de3ddc9f84a6177484215da825fbf4316ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Villulles?= Date: Thu, 18 Jun 2020 11:43:13 +0100 Subject: [PATCH 2/2] Fix travis build fail --- lib/prompt-library-params.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/prompt-library-params.js b/lib/prompt-library-params.js index 8505c0d..9b4381b 100644 --- a/lib/prompt-library-params.js +++ b/lib/prompt-library-params.js @@ -73,7 +73,7 @@ module.exports = async (opts) => { type: 'list', name: 'template', message: 'Template', - choices: ['default', 'typescript','flow', 'custom'], + choices: ['default', 'typescript', 'flow', 'custom'], default: opts.template }, {