Add material icon component generator for react - #1
Conversation
| @@ -0,0 +1,6 @@ | |||
| # IDE Stuff | |||
| .idea | |||
There was a problem hiding this comment.
I would add more files. Maybe you can adopt the structure from the other packages:
https://github.com/aboutbits/pagination/blob/master/.gitignore
There was a problem hiding this comment.
I have added the required fields
| React Material Icons | ||
| ==================== | ||
|
|
||
| This package includes all [Material Icons](https://material.io/resources/icons/?style=baseline) as reusable react components |
There was a problem hiding this comment.
I would write "react" as "React", because it's the right way to write it.
There was a problem hiding this comment.
All names have been updated
|
|
||
| ## Build & Publish | ||
|
|
||
| To build the package, simply run the following command |
There was a problem hiding this comment.
I would extract the description of the build/clean command into it's own section. And keep the "Build & Publish" section equals to the other packages.
There was a problem hiding this comment.
Build and clean have got an own section.
| "description": "", | ||
| "main": "generator.js", | ||
| "scripts": { | ||
| "build": "node generator.js", |
There was a problem hiding this comment.
Attention, the build command is a reserved command that will be used when you execute "npm version patch/minor/major". That's why I would rename this command to something more explicitly named like "import".
In addition, in this file lots of required dependencies and scripts are missing. They are required for publishing the package. See: https://github.com/aboutbits/pagination/blob/master/package.json
There was a problem hiding this comment.
All necessary fields have been added. Since tsc is not required for this package, the build command executes the bootstrapping command to create the icon components
| await generateComponent(icons.icons); | ||
| await generateIndex(icons.icons); | ||
|
|
||
| })(); No newline at end of file |
There was a problem hiding this comment.
I would add an empty line at the end of the file.
| "postversion": "git push && git push --tags" | ||
| }, | ||
| "keywords": [ | ||
| "material design icons", |
There was a problem hiding this comment.
I would split "material design" and "icons" up into two different strings to optimize the search results.
| "react" | ||
| ], | ||
| "private": false, | ||
| "author": "Aboutbits", |
There was a problem hiding this comment.
The "B" should be written in uppercase "AboutBits".
| @@ -0,0 +1,166 @@ | |||
| const fs = require('fs') | |||
There was a problem hiding this comment.
I would move this file outside of the src directory. I could live at the top of the directory structure. And I would include the generated files in the PR. Because, the generated code is in fact the real package. This file is just a helper file, that facilitates the generation of the files.
| React Material Icons | ||
| ==================== | ||
|
|
||
| This package includes all [Material Icons](https://material.io/resources/icons/?style=baseline) as reusable React components |
There was a problem hiding this comment.
I would finish all sentenses with a dot at the end.
| This package includes all [Material Icons](https://material.io/resources/icons/?style=baseline) as reusable React components | ||
|
|
||
| ## Table of content | ||
| - [Usage](#usage) |
There was a problem hiding this comment.
Please add consistent empty lines before and after titles and paragraphs like in the other packages: https://raw.githubusercontent.com/aboutbits/pagination/master/readme.md
|
|
||
| ## Usage | ||
|
|
||
| In order to use this package you have to install it through npm |
There was a problem hiding this comment.
I would use here the same wording like in the other packages: First, ...
| npm version major | ||
| ``` | ||
|
|
||
| To remove all generated files run the clean script |
There was a problem hiding this comment.
Should the user be able to clean the generated files? Or should they be automatically be deleted as first step of the generation? For example, first delete the src folder and then regenerate the files in there.
The clean task that you mention here, is to delete the dist folder. And the dist folder is just required for publishing.
Add material icon component generator for react
Checklist: