├── screenshot.png ├── .gitignore ├── README.md ├── package.json ├── LICENSE └── index.js /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/manosim/alfred-react-native/HEAD/screenshot.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | 36 | # Optional REPL history 37 | .node_repl_history 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # alfred-react-native 2 | > Alfred 3 workflow to access the React Native Documentation 3 | 4 | ![screenshot.png](screenshot.png) 5 | 6 | 7 | ## Download 8 | 9 | Get the workflow from [GitHub](https://github.com/ekonstantinidis/alfred-react-native/releases/latest) or [Packal](http://www.packal.org/workflow/react-native). 10 | 11 | Requires **Node.js 4+** and the **Alfred Powerpack**. 12 | 13 | 14 | ## Usage 15 | 16 | In Alfred, type rn, Enter, and your query, to search for documentation of components. 17 | Select a component and press Enter to go to its GitHub repo. 18 | 19 | 20 | ## Thanks 21 | 22 | Thanks to [sindresorhus](https://github.com/sindresorhus) for making [alfy](https://github.com/sindresorhus/alfy). It works great - made this workflow in 15 minutes. 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "alfred-react-native", 3 | "version": "0.0.2", 4 | "description": "Access the React Native Documentation from Alfred", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/ekonstantinidis/alfred-react-native.git" 12 | }, 13 | "keywords": [ 14 | "alfred", 15 | "workflow" 16 | ], 17 | "author": "Emmanouil Konstantinidis", 18 | "license": "MIT", 19 | "bugs": { 20 | "url": "https://github.com/ekonstantinidis/alfred-react-native/issues" 21 | }, 22 | "homepage": "https://github.com/ekonstantinidis/alfred-react-native#readme", 23 | "dependencies": { 24 | "alfy": "^0.2.1" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Emmanouil Konstantinidis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const alfy = require('alfy'); 2 | 3 | const rn_website = 'https://facebook.github.io/react-native/docs/'; 4 | const toc = [ 5 | { 6 | title: 'ActivityIndicator', 7 | url: 'activityindicator' 8 | }, 9 | { 10 | title: 'Button', 11 | url: 'button' 12 | }, 13 | { 14 | title: 'DatePickerIOS', 15 | url: 'datepickerios' 16 | }, 17 | { 18 | title: 'DrawerLayoutAndroid', 19 | url: 'drawerlayoutandroid' 20 | }, 21 | { 22 | title: 'FlatList', 23 | url: 'flatlist' 24 | }, 25 | { 26 | title: 'Image', 27 | url: 'image' 28 | }, 29 | { 30 | title: 'InputAccessoryView', 31 | url: 'inputaccessoryview' 32 | }, 33 | { 34 | title: 'KeyboardAvoidingView', 35 | url: 'keyboardavoidingview' 36 | }, 37 | { 38 | title: 'ListView', 39 | url: 'listview' 40 | }, 41 | { 42 | title: 'MapView', 43 | url: 'mapview' 44 | }, 45 | { 46 | title: 'MaskedViewIOS', 47 | url: 'maskedviewios' 48 | }, 49 | { 50 | title: 'Modal', 51 | url: 'modal' 52 | }, 53 | { 54 | title: 'Navigator', 55 | url: 'navigator' 56 | }, 57 | { 58 | title: 'NavigatorIOS', 59 | url: 'navigatorios' 60 | }, 61 | { 62 | title: 'PickerIOS', 63 | url: 'pickerios' 64 | }, 65 | { 66 | title: 'Picker', 67 | url: 'picker' 68 | }, 69 | { 70 | title: 'ProgressBarAndroid', 71 | url: 'progressbarandroid' 72 | }, 73 | { 74 | title: 'ProgressViewIOS', 75 | url: 'progressviewios' 76 | }, 77 | { 78 | title: 'RefreshControl', 79 | url: 'refreshcontrol' 80 | }, 81 | { 82 | title: 'SectionList', 83 | url: 'sectionlist' 84 | }, 85 | { 86 | title: 'ScrollView', 87 | url: 'scrollview' 88 | }, 89 | { 90 | title: 'SegmentedControlIOS', 91 | url: 'segmentedcontrolios' 92 | }, 93 | { 94 | title: 'Slider', 95 | url: 'slider' 96 | }, 97 | { 98 | title: 'StatusBar', 99 | url: 'statusbar' 100 | }, 101 | { 102 | title: 'Switch', 103 | url: 'switch' 104 | }, 105 | { 106 | title: 'TabBarIOS', 107 | url: 'tabbarios' 108 | }, 109 | { 110 | title: 'TabBarIOS.Item', 111 | url: 'tabbarios-item' 112 | }, 113 | { 114 | title: 'Text', 115 | url: 'text' 116 | }, 117 | { 118 | title: 'TextInput', 119 | url: 'textinput' 120 | }, 121 | { 122 | title: 'ToolbarAndroid', 123 | url: 'toolbarandroid' 124 | }, 125 | { 126 | title: 'TouchableHighlight', 127 | url: 'touchablehighlight' 128 | }, 129 | { 130 | title: 'TouchableNativeFeedback', 131 | url: 'touchablenativefeedback' 132 | }, 133 | { 134 | title: 'TouchableOpacity', 135 | url: 'touchableopacity' 136 | }, 137 | { 138 | title: 'TouchableWithoutFeedback', 139 | url: 'touchablewithoutfeedback' 140 | }, 141 | { 142 | title: 'View', 143 | url: 'view' 144 | }, 145 | { 146 | title: 'ViewPagerAndroid', 147 | url: 'viewpagerandroid' 148 | }, 149 | { 150 | title: 'VirtualizedList', 151 | url: 'virtualizedlist' 152 | }, 153 | { 154 | title: 'WebView', 155 | url: 'webview' 156 | } 157 | ]; 158 | 159 | const output = alfy 160 | .inputMatches(toc, 'title') 161 | .map(doc => { 162 | return { 163 | title: doc.title, 164 | arg: rn_website + doc.url + '.html', 165 | subtitle: rn_website + doc.url + '.html' 166 | }; 167 | }); 168 | 169 | alfy.output(output); 170 | --------------------------------------------------------------------------------