├── .gitignore ├── .jshintrc ├── .meteor ├── .finished-upgraders ├── .gitignore ├── .id ├── packages ├── platforms ├── release └── versions ├── LICENSE ├── README.md ├── client ├── components │ ├── App.jsx │ ├── EmbedCode.jsx │ ├── Generator.jsx │ └── Preview.jsx ├── home.css ├── home.html ├── home.jsx └── stylesheets │ └── semantic_ui │ ├── custom.semantic.json │ └── theme.config.import.less ├── private └── icon.svg ├── public ├── favicon-32x32.png └── images │ └── logo.png └── server ├── cron.js ├── methods.js ├── package_info.js └── routes.js /.gitignore: -------------------------------------------------------------------------------- 1 | **/semantic_ui/definitions 2 | **/semantic_ui/themes 3 | **/semantic_ui/.custom.semantic.json 4 | **/semantic_ui/semantic.less 5 | **/semantic_ui/theme.import.less 6 | **/semantic_ui/site 7 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | {"esnext": true} 2 | -------------------------------------------------------------------------------- /.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | -------------------------------------------------------------------------------- /.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | ndrg72nblyk814hasa 8 | -------------------------------------------------------------------------------- /.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | meteor-base # Packages every Meteor app needs to have 8 | mobile-experience # Packages for a great mobile UX 9 | mongo # The database Meteor supports right now 10 | blaze-html-templates # Compile .html files into Meteor Blaze views 11 | session # Client-side reactive dictionary for your app 12 | jquery # Helpful client-side library 13 | tracker # Meteor's client-side reactive programming library 14 | 15 | standard-minifiers # JS/CSS minifiers run for production mode 16 | es5-shim # ECMAScript 5 compatibility for older browsers. 17 | ecmascript # Enable ECMAScript2015+ syntax in app code 18 | 19 | http 20 | check 21 | react 22 | 23 | momentjs:moment 24 | meteorhacks:ssr 25 | aldeed:collection2 26 | semantic:ui 27 | flemay:less-autoprefixer 28 | -------------------------------------------------------------------------------- /.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.2.0.2 2 | -------------------------------------------------------------------------------- /.meteor/versions: -------------------------------------------------------------------------------- 1 | aldeed:collection2@2.5.0 2 | aldeed:simple-schema@1.3.3 3 | autoupdate@1.2.3 4 | babel-compiler@5.8.24_1 5 | babel-runtime@0.1.4 6 | base64@1.0.4 7 | binary-heap@1.0.4 8 | blaze@2.1.3 9 | blaze-html-templates@1.0.1 10 | blaze-tools@1.0.4 11 | boilerplate-generator@1.0.4 12 | caching-compiler@1.0.0 13 | caching-html-compiler@1.0.2 14 | callback-hook@1.0.4 15 | check@1.0.6 16 | coffeescript@1.0.10 17 | cosmos:browserify@0.8.2 18 | ddp@1.2.2 19 | ddp-client@1.2.1 20 | ddp-common@1.2.1 21 | ddp-server@1.2.1 22 | deps@1.0.9 23 | diff-sequence@1.0.1 24 | ecmascript@0.1.5 25 | ecmascript-collections@0.1.6 26 | ejson@1.0.7 27 | es5-shim@4.1.13 28 | fastclick@1.0.7 29 | flemay:less-autoprefixer@1.2.0 30 | geojson-utils@1.0.4 31 | hot-code-push@1.0.0 32 | html-tools@1.0.5 33 | htmljs@1.0.5 34 | http@1.1.1 35 | id-map@1.0.4 36 | jquery@1.11.4 37 | jsx@0.2.3 38 | launch-screen@1.0.4 39 | livedata@1.0.15 40 | logging@1.0.8 41 | meteor@1.1.9 42 | meteor-base@1.0.1 43 | meteorhacks:ssr@2.1.2 44 | minifiers@1.1.7 45 | minimongo@1.0.10 46 | mobile-experience@1.0.1 47 | mobile-status-bar@1.0.6 48 | momentjs:moment@2.10.6 49 | mongo@1.1.2 50 | mongo-id@1.0.1 51 | npm-mongo@1.4.39_1 52 | observe-sequence@1.0.7 53 | ordered-dict@1.0.4 54 | promise@0.5.0 55 | random@1.0.4 56 | react@0.14.1_1 57 | react-meteor-data@0.2.3 58 | react-runtime@0.14.1_1 59 | react-runtime-dev@0.14.1 60 | react-runtime-prod@0.14.1 61 | reactive-dict@1.1.2 62 | reactive-var@1.0.6 63 | reload@1.1.4 64 | retry@1.0.4 65 | routepolicy@1.0.6 66 | semantic:ui@2.1.6 67 | semantic:ui-data@2.1.6 68 | session@1.1.1 69 | spacebars@1.0.7 70 | spacebars-compiler@1.0.7 71 | standard-minifiers@1.0.1 72 | templating@1.1.4 73 | templating-tools@1.0.0 74 | tracker@1.0.9 75 | ui@1.0.8 76 | underscore@1.0.4 77 | url@1.0.5 78 | webapp@1.2.2 79 | webapp-hashing@1.0.5 80 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Matthew Wood, Sung Won Cho, Tomas Trescak 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Meteor Icon 2 | 3 | A simple Atmosphere badge to display the information about your package anywhere. 4 | 5 | Winner of [2015 Meteor Global Distributed Hackathon] 6 | (http://info.meteor.com/blog/meteor-global-distributed-hackathon-winners) for 7 | the Best Submission Using Less Than 100 Lines of JavaScript. 8 | 9 | 10 | ## How to use 11 | 12 | 1. Go to [icon.meteor.com](http://icon.meteor.com/) and type in your package name. 13 | 2. Grab the markdown code and embed into GitHub or anywhere you want! 14 | 15 | ```md 16 | [![Meteor Icon](http://icon.meteor.com/package/tomi:upload-jquery)] 17 | (https://atmospherejs.com/tomi/upload-jquery) 18 | ``` 19 | 20 | 21 | ## Why? 22 | 23 | Meteor Icon builds better package ecosystem for Meteor by making it quicker 24 | and easier to communicate package information. 25 | 26 | Inspired by [nodei.co](https://nodei.co/), Meteor Icon cleanly displays 27 | information including the install command, latest version, last published date, 28 | popularity measures. 29 | 30 | 31 | ## Options 32 | 33 | * Default 34 | 35 | [![Meteor Icon](http://icon.meteor.com/package/tomi:upload-jquery#)] 36 | (https://atmospherejs.com/tomi/upload-jquery) 37 | 38 | *http://icon.meteor.com/package/tomi:upload-jquery* 39 | 40 | * Graph and scores 41 | 42 | Draw on graph and scores by appending passing a query parameter graph with true 43 | 44 | [![Meteor Icon](http://icon.meteor.com/package/tomi:upload-jquery?graph=true)] 45 | (https://atmospherejs.com/tomi/upload-jquery) 46 | 47 | *http://icon.meteor.com/package/tomi:upload-jquery?graph=true* 48 | 49 | 50 | ## Video Demo 51 | 52 | [![Demo](http://img.youtube.com/vi/NQm33Wg1HHg/0.jpg)] 53 | (https://www.youtube.com/watch?v=NQm33Wg1HHg "Demo") 54 | 55 | 56 | ## Collaborators 57 | 58 | From [Meteor Sydney](http://www.meetup.com/Meteor-Sydney/): 59 | 60 | * [sungwoncho](https://github.com/sungwoncho/) 61 | * [tomitrescak](https://github.com/tomitrescak) 62 | * [woody1990](https://github.com/woody1990) 63 | 64 | 65 | ## Roadmap 66 | 67 | - [x] Caching by comparing timestamp 68 | - [x] Support for MDG packages 69 | 70 | 71 | ## Contributing 72 | 73 | Feel free to open an issue with a feature request or a bug. 74 | 75 | 76 | ## License 77 | 78 | MIT 79 | -------------------------------------------------------------------------------- /client/components/App.jsx: -------------------------------------------------------------------------------- 1 | App = React.createClass({ 2 | getInitialState() { 3 | return { 4 | packageOnDisplay: 'tomi:upload-jquery' 5 | }; 6 | }, 7 | 8 | handleGenerate(packageName) { 9 | this.setState({packageOnDisplay: packageName}); 10 | }, 11 | 12 | render() { 13 | return ( 14 |
15 |
16 |
17 | 18 |

19 | Meteor Icon 20 |
21 | A smarter way to communicate with package users 22 |
23 |

24 | 25 |

26 | You can get one for your package today. 27 |

28 | 29 | 30 | 31 | 32 |
33 |
34 | 35 | 40 |
41 | ); 42 | } 43 | }); 44 | -------------------------------------------------------------------------------- /client/components/EmbedCode.jsx: -------------------------------------------------------------------------------- 1 | EmbedCode = React.createClass({ 2 | componentDidUpdate() { 3 | Meteor.call('validatePackageName', this.props.packageOnDisplay, (err, res) => { 4 | if (err) { 5 | console.log('Error while validating package name', err); 6 | return; 7 | } 8 | 9 | if (! res) { 10 | this.refs.embedCode.value = 'There is no package by that name.'; 11 | } 12 | }); 13 | }, 14 | 15 | getEmbedCode() { 16 | var packageName = this.props.packageOnDisplay; 17 | var iconPath = Meteor.absoluteUrl(`package/${packageName}`); 18 | 19 | var base = `[![Meteor Icon](${iconPath})](https://atmospherejs.com/`; 20 | if (packageName.split(':')[1]) { 21 | return base.concat(`${packageName.replace(/\:/, '/')})`); 22 | } else { 23 | return base.concat(`meteor/${packageName.split(':')[0]})`); 24 | } 25 | }, 26 | 27 | selectCode() { 28 | this.refs.embedCode.select(); 29 | }, 30 | 31 | render() { 32 | return ( 33 |