react-native-component
Advanced tools
+21
| MIT License | ||
| Copyright (c) 2018 Kevin Quincke | ||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
+55
| # react-native-component | ||
| [](https://GitHub.com/kevquincke/react-native-component/issues/) | ||
| [](https://github.com/kevquincke/react-native-component) | ||
| [](https://lbesson.mit-license.org/) | ||
| Generate skeletons for react native components | ||
| **Note:** this package assumes you use components | ||
| with the following structure: | ||
| ``` | ||
| |- ComponentName | ||
| |--- index.js | ||
| |--- styles.js | ||
| ``` | ||
| ## Installation | ||
| ``` | ||
| yarn global add react-native-component | ||
| or | ||
| npm install -g react-native-component | ||
| ``` | ||
| ## Usage | ||
| To create a component in the current directory | ||
| `` | ||
| react-native-component -n <ComponentName> | ||
| `` | ||
| To create a component in a specified path | ||
| `` | ||
| react-native-component -n <ComponentName> -p <CustomPath> | ||
| `` | ||
| To specify that the component should be stateless | ||
| `` | ||
| react-native-component -n <ComponentName> -s | ||
| `` | ||
| ## Example | ||
| 1. Creating a Login component | ||
| `` | ||
| react-native-component -n Login | ||
| `` | ||
| 2. Creating a stateless Button | ||
| component in a specific path | ||
| `` | ||
| react-native-component -n Button -p components/Common | ||
| `` | ||
+1
-1
| { | ||
| "name": "react-native-component", | ||
| "version": "0.1.0", | ||
| "version": "0.1.1", | ||
| "description": "Generate skeletons for react native components", | ||
@@ -5,0 +5,0 @@ "main": "./lib/fileHandler.js", |
Sorry, the diff of this file is not supported yet
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project version="4"> | ||
| <component name="JavaScriptLibraryMappings"> | ||
| <includedPredefinedLibrary name="Node.js Core" /> | ||
| </component> | ||
| </project> |
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project version="4"> | ||
| <component name="JavaScriptSettings"> | ||
| <option name="languageLevel" value="ES6" /> | ||
| </component> | ||
| </project> |
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project version="4"> | ||
| <component name="ProjectModuleManager"> | ||
| <modules> | ||
| <module fileurl="file://$PROJECT_DIR$/../react-native-component/.idea/react-native-component.iml" filepath="$PROJECT_DIR$/../react-native-component/.idea/react-native-component.iml" /> | ||
| </modules> | ||
| </component> | ||
| </project> |
Sorry, the diff of this file is not supported yet
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <project version="4"> | ||
| <component name="ChangeListManager"> | ||
| <list default="true" id="9f8684af-fcb5-449d-9718-0b1f47d5f9ef" name="Default Changelist" comment="" /> | ||
| <ignored path="$PROJECT_DIR$/.tmp/" /> | ||
| <ignored path="$PROJECT_DIR$/temp/" /> | ||
| <ignored path="$PROJECT_DIR$/tmp/" /> | ||
| <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> | ||
| <option name="SHOW_DIALOG" value="false" /> | ||
| <option name="HIGHLIGHT_CONFLICTS" value="true" /> | ||
| <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> | ||
| <option name="LAST_RESOLUTION" value="IGNORE" /> | ||
| </component> | ||
| <component name="FUSProjectUsageTrigger"> | ||
| <session id="-603475572"> | ||
| <usages-collector id="statistics.lifecycle.project"> | ||
| <counts> | ||
| <entry key="project.open.time.2" value="1" /> | ||
| <entry key="project.opened" value="1" /> | ||
| </counts> | ||
| </usages-collector> | ||
| <usages-collector id="statistics.file.extensions.open"> | ||
| <counts> | ||
| <entry key="js" value="22" /> | ||
| <entry key="json" value="2" /> | ||
| </counts> | ||
| </usages-collector> | ||
| <usages-collector id="statistics.file.types.open"> | ||
| <counts> | ||
| <entry key="JSON" value="2" /> | ||
| <entry key="JavaScript" value="22" /> | ||
| </counts> | ||
| </usages-collector> | ||
| <usages-collector id="statistics.file.extensions.edit"> | ||
| <counts> | ||
| <entry key="js" value="4205" /> | ||
| <entry key="json" value="277" /> | ||
| </counts> | ||
| </usages-collector> | ||
| <usages-collector id="statistics.file.types.edit"> | ||
| <counts> | ||
| <entry key="JSON" value="277" /> | ||
| <entry key="JavaScript" value="4205" /> | ||
| </counts> | ||
| </usages-collector> | ||
| </session> | ||
| </component> | ||
| <component name="FileEditorManager"> | ||
| <leaf> | ||
| <file pinned="false" current-in-tab="false"> | ||
| <entry file="file://$PROJECT_DIR$/../react-native-component/bin/index.js"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state relative-caret-position="413"> | ||
| <caret line="28" column="14" selection-start-line="28" selection-start-column="14" selection-end-line="28" selection-end-column="14" /> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| </file> | ||
| <file pinned="false" current-in-tab="false"> | ||
| <entry file="file://$PROJECT_DIR$/../react-native-component/lib/utils.js"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state relative-caret-position="338"> | ||
| <caret line="45" column="9" selection-start-line="45" selection-start-column="9" selection-end-line="45" selection-end-column="9" /> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| </file> | ||
| <file pinned="false" current-in-tab="true"> | ||
| <entry file="file://$PROJECT_DIR$/../react-native-component/package.json"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state relative-caret-position="45"> | ||
| <caret line="3" column="26" selection-start-line="3" selection-start-column="26" selection-end-line="3" selection-end-column="26" /> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| </file> | ||
| </leaf> | ||
| </component> | ||
| <component name="FileTemplateManagerImpl"> | ||
| <option name="RECENT_TEMPLATES"> | ||
| <list> | ||
| <option value="JavaScript File" /> | ||
| </list> | ||
| </option> | ||
| </component> | ||
| <component name="IdeDocumentHistory"> | ||
| <option name="CHANGED_PATHS"> | ||
| <list> | ||
| <option value="$PROJECT_DIR$/lib/greet.js" /> | ||
| <option value="$PROJECT_DIR$/lib/Component.js" /> | ||
| <option value="$PROJECT_DIR$/lib/GenericComponent/styles.js" /> | ||
| <option value="$PROJECT_DIR$/lib/GenericStatelessComponent/styles.js" /> | ||
| <option value="$PROJECT_DIR$/lib/GenericStatelessComponent/index.js" /> | ||
| <option value="$PROJECT_DIR$/lib/GenericComponent/index.js" /> | ||
| <option value="$PROJECT_DIR$/lib/fileHandler.js" /> | ||
| <option value="$PROJECT_DIR$/lib/utils.js" /> | ||
| <option value="$PROJECT_DIR$/bin/index.js" /> | ||
| <option value="$PROJECT_DIR$/package.json" /> | ||
| <option value="$PROJECT_DIR$/../react-native-component/package.json" /> | ||
| </list> | ||
| </option> | ||
| </component> | ||
| <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" /> | ||
| <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER"> | ||
| <package-json value="$PROJECT_DIR$/../react-native-component/package.json" /> | ||
| </component> | ||
| <component name="JsFlowSettings"> | ||
| <service-enabled>true</service-enabled> | ||
| <exe-path /> | ||
| <other-services-enabled>true</other-services-enabled> | ||
| <auto-save>true</auto-save> | ||
| </component> | ||
| <component name="JsGulpfileManager"> | ||
| <detection-done>true</detection-done> | ||
| <sorting>DEFINITION_ORDER</sorting> | ||
| </component> | ||
| <component name="NodeModulesDirectoryManager"> | ||
| <handled-path value="$PROJECT_DIR$/../react-native-component/node_modules" /> | ||
| </component> | ||
| <component name="NodePackageJsonFileManager"> | ||
| <packageJsonPaths> | ||
| <path value="$PROJECT_DIR$/../react-native-component/package.json" /> | ||
| </packageJsonPaths> | ||
| </component> | ||
| <component name="ProjectFrameBounds" fullScreen="true"> | ||
| <option name="width" value="1280" /> | ||
| <option name="height" value="800" /> | ||
| </component> | ||
| <component name="ProjectView"> | ||
| <navigator proportions="" version="1"> | ||
| <foldersAlwaysOnTop value="true" /> | ||
| </navigator> | ||
| <panes> | ||
| <pane id="ProjectPane"> | ||
| <subPane> | ||
| <expand> | ||
| <path> | ||
| <item name="react-native-component" type="b2602c69:ProjectViewProjectNode" /> | ||
| <item name="react-native-component" type="462c0819:PsiDirectoryNode" /> | ||
| </path> | ||
| </expand> | ||
| <select /> | ||
| </subPane> | ||
| </pane> | ||
| <pane id="Scope" /> | ||
| </panes> | ||
| </component> | ||
| <component name="PropertiesComponent"> | ||
| <property name="WebServerToolWindowFactoryState" value="false" /> | ||
| <property name="javascript.nodejs.core.library.configured.version" value="8.12.0" /> | ||
| <property name="jsx.switch.disabled" value="true" /> | ||
| <property name="last_opened_file_path" value="$PROJECT_DIR$" /> | ||
| <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> | ||
| <property name="nodejs_npm_path_reset_for_default_project" value="true" /> | ||
| <property name="nodejs_package_manager_path" value="npm" /> | ||
| <property name="settings.editor.selected.configurable" value="settings.nodejs" /> | ||
| </component> | ||
| <component name="RecentsManager"> | ||
| <key name="MoveFile.RECENT_KEYS"> | ||
| <recent name="$PROJECT_DIR$/lib/Styles" /> | ||
| </key> | ||
| <key name="CopyFile.RECENT_KEYS"> | ||
| <recent name="$PROJECT_DIR$/lib" /> | ||
| </key> | ||
| </component> | ||
| <component name="RunDashboard"> | ||
| <option name="ruleStates"> | ||
| <list> | ||
| <RuleState> | ||
| <option name="name" value="ConfigurationTypeDashboardGroupingRule" /> | ||
| </RuleState> | ||
| <RuleState> | ||
| <option name="name" value="StatusDashboardGroupingRule" /> | ||
| </RuleState> | ||
| </list> | ||
| </option> | ||
| </component> | ||
| <component name="SvnConfiguration"> | ||
| <configuration /> | ||
| </component> | ||
| <component name="TaskManager"> | ||
| <task active="true" id="Default" summary="Default task"> | ||
| <changelist id="9f8684af-fcb5-449d-9718-0b1f47d5f9ef" name="Default Changelist" comment="" /> | ||
| <created>1542149740906</created> | ||
| <option name="number" value="Default" /> | ||
| <option name="presentableId" value="Default" /> | ||
| <updated>1542149740906</updated> | ||
| <workItem from="1542149742682" duration="7793000" /> | ||
| </task> | ||
| <servers /> | ||
| </component> | ||
| <component name="TimeTrackingManager"> | ||
| <option name="totallyTimeSpent" value="7793000" /> | ||
| </component> | ||
| <component name="ToolWindowManager"> | ||
| <frame x="0" y="0" width="1280" height="800" extended-state="0" /> | ||
| <editor active="true" /> | ||
| <layout> | ||
| <window_info id="npm" side_tool="true" /> | ||
| <window_info id="Favorites" side_tool="true" /> | ||
| <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.2494043" /> | ||
| <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> | ||
| <window_info anchor="bottom" id="Docker" show_stripe_button="false" /> | ||
| <window_info anchor="bottom" id="Version Control" show_stripe_button="false" /> | ||
| <window_info active="true" anchor="bottom" id="Terminal" visible="true" weight="0.32876712" /> | ||
| <window_info anchor="bottom" id="Event Log" side_tool="true" /> | ||
| <window_info anchor="bottom" id="Message" order="0" /> | ||
| <window_info anchor="bottom" id="Find" order="1" weight="0.32876712" /> | ||
| <window_info anchor="bottom" id="Run" order="2" /> | ||
| <window_info anchor="bottom" id="Debug" order="3" weight="0.4" /> | ||
| <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> | ||
| <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> | ||
| <window_info anchor="bottom" id="TODO" order="6" /> | ||
| <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> | ||
| <window_info anchor="right" id="Ant Build" order="1" weight="0.25" /> | ||
| <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" /> | ||
| </layout> | ||
| </component> | ||
| <component name="TypeScriptGeneratedFilesManager"> | ||
| <option name="version" value="1" /> | ||
| </component> | ||
| <component name="VcsContentAnnotationSettings"> | ||
| <option name="myLimit" value="2678400000" /> | ||
| </component> | ||
| <component name="editorHistoryManager"> | ||
| <entry file="file://$PROJECT_DIR$/lib/greet.js"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state relative-caret-position="75"> | ||
| <caret line="5" lean-forward="true" selection-start-line="5" selection-end-line="5" /> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/lib/Component.js"> | ||
| <provider selected="true" editor-type-id="text-editor" /> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/lib/GenericStatelessComponent/styles.js"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state relative-caret-position="45"> | ||
| <caret line="3" column="24" lean-forward="true" selection-start-line="3" selection-start-column="24" selection-end-line="3" selection-end-column="24" /> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/index.js"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state relative-caret-position="150"> | ||
| <caret line="10" lean-forward="true" selection-start-line="10" selection-end-line="10" /> | ||
| <folding> | ||
| <element signature="e#0#26#0" expanded="true" /> | ||
| </folding> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/lib/GenericStatelessComponent/indexTmp.js"> | ||
| <provider selected="true" editor-type-id="text-editor" /> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/LoginScreen/index.js"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state> | ||
| <folding> | ||
| <element signature="e#0#26#0" expanded="true" /> | ||
| </folding> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/LoginScreen/styles.js"> | ||
| <provider selected="true" editor-type-id="text-editor" /> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/components/Common/LoginScreen/index.js"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state> | ||
| <folding> | ||
| <element signature="e#0#26#0" expanded="true" /> | ||
| </folding> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/../react-native-component/lib/GenericStatelessComponent/index.js"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state relative-caret-position="165"> | ||
| <caret line="11" column="30" selection-start-line="11" selection-start-column="30" selection-end-line="11" selection-end-column="30" /> | ||
| <folding> | ||
| <element signature="e#0#26#0" expanded="true" /> | ||
| </folding> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/components/Common/LoginScreen/styles.js"> | ||
| <provider selected="true" editor-type-id="text-editor" /> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/../react-native-component/lib/GenericComponent/index.js"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state relative-caret-position="120"> | ||
| <caret line="8" column="37" lean-forward="true" selection-start-line="8" selection-start-column="37" selection-end-line="8" selection-end-column="37" /> | ||
| <folding> | ||
| <element signature="e#0#26#0" expanded="true" /> | ||
| </folding> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/../react-native-component/lib/fileHandler.js"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state relative-caret-position="420"> | ||
| <caret line="28" column="49" lean-forward="true" selection-start-line="28" selection-start-column="49" selection-end-line="28" selection-end-column="49" /> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/Hola/index.js"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state> | ||
| <folding> | ||
| <element signature="e#0#41#0" expanded="true" /> | ||
| </folding> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/Hola/styles.js"> | ||
| <provider selected="true" editor-type-id="text-editor" /> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/components/Hola/index.js"> | ||
| <provider selected="true" editor-type-id="text-editor" /> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/../react-native-component/lib/utils.js"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state relative-caret-position="338"> | ||
| <caret line="45" column="9" selection-start-line="45" selection-start-column="9" selection-end-line="45" selection-end-column="9" /> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/../react-native-component/bin/index.js"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state relative-caret-position="413"> | ||
| <caret line="28" column="14" selection-start-line="28" selection-start-column="14" selection-end-line="28" selection-end-column="14" /> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| <entry file="file://$PROJECT_DIR$/../react-native-component/package.json"> | ||
| <provider selected="true" editor-type-id="text-editor"> | ||
| <state relative-caret-position="45"> | ||
| <caret line="3" column="26" selection-start-line="3" selection-start-column="26" selection-end-line="3" selection-end-column="26" /> | ||
| </state> | ||
| </provider> | ||
| </entry> | ||
| </component> | ||
| </project> |
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1
-50%56
Infinity%6925
-67.12%9
-30.77%