98eec6ce3d
* Adding resolutions to specific packages with security vulnerabilities * Remove * Adding whitespace * Revert * Removing unused file * Wdio to v8 * Remove dep * Fixing packages * Change files * Remove unnecessary code in tsconfig * Change files * Remove unnecessary code in tsconfig * Remove unnecessary code * Fixing tsconfig * Fixing ts * Adding tsconfig changes * Adding necessary dep |
||
---|---|---|
.. | ||
component-templates | ||
README.md | ||
consts.js | ||
gulpfile.js | ||
package-no-publish.json |
README.md
Component generator
It's used to automate process of component creation.
Setup
- Run in your command prompt
npm i -g gulp-cli
.- May need to run this with
sudo
if you are on a mac
- May need to run this with
- Rename package-no-publish.json to package.json (The package was published, though it's private. This is temporary fix).
- Run
yarn
fromfluentui-react-native
folder.
Build your component
- Go to
fluentui-react-native\apps\component-generator
. - Run
gulp add --new component-name
. This should be run from apps/component-generator, not the root.component-name
should be all lowercase.
- Change your newly generated component.
- Check dependencies in componentName's package.json (may be out of date), and remove
"private": true
from the package.json - Add to the package.json after "typings":
"onPublish": {
"main": "lib-commonjs/index.js",
"module": "lib/index.js"
},
- Delete package-lock.json in root dir (see todo item 9 below)
- Delete dependencies: {"gulp": "^4.0.2", "gulp-rename": "^2.0.0”} in root dir’s package.json
- Add "@fluentui-react-native/componentName”: "0.1.0", to apps/fluent-tester/package.json (make sure the version matches the version in ComponentName/package.json)
TODO:
- Write unit tests
- Add platform as an option. Will need to update templates.
- Framework method can be also as an option.
- Validate name of component. Add warning if it's incorrect.
- Change component-description
- Add tasks for bundle and run.
- Add warning if component exists and message "Do you want to replace it?". Currently it replaces the component.
- Improve replacement functionality.
- Support compressible-based components
- Add option to add component to the
experimental
folder instead of thecomponents
folder - Think about not using gulp. There's good alternative: yeoman