Created
August 18, 2016 14:14
-
-
Save velopert/fda936bee7493eb64314f82adfc28095 to your computer and use it in GitHub Desktop.
dfgdfg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values. | |
# | |
# You can create a new snippet in this file by typing "snip" and then hitting | |
# tab. | |
# | |
# An example CoffeeScript snippet to expand log to console.log: | |
# | |
# '.source.coffee': | |
# 'Console log': | |
# 'prefix': 'log' | |
# 'body': 'console.log $1' | |
# | |
# Each scope (e.g. '.source.coffee' above) can only be declared once. | |
# | |
# This file uses CoffeeScript Object Notation (CSON). | |
# If you are unfamiliar with CSON, you can read more about it in the | |
# Atom Flight Manual: | |
# https://atom.io/docs/latest/using-atom-basic-customization#cson | |
'.source.js': | |
'React Component': | |
'prefix': 'rc' | |
'body': ''' | |
import React, { Component, PropTypes } from 'react'; | |
const propTypes = { | |
}; | |
const defaultProps = { | |
}; | |
class ${1:MyComponent} extends React.Component { | |
constructor(props) { | |
super(props); | |
} | |
render() { | |
return( | |
<div>${1:MyComponent}</div> | |
); | |
} | |
} | |
${1:MyComponent}.propTypes = propTypes; | |
${1:MyComponent}.defaultProps = defaultProps; | |
export default ${1:MyComponent}; | |
''' | |
'Import Component': | |
'prefix': 'impc' | |
'body': ''' | |
import ${1:MyComponent} from './${1:MyComponent}'; | |
''' | |
'React PropTypes and DefaultProps': | |
'prefix': 'rpd' | |
'body': ''' | |
${1:MyComponent}.propTypes = { | |
}; | |
${1:MyComponent}.defaultProps = { | |
}; | |
''' | |
'REST API COMMET': | |
'prefix': 'restc' | |
'body': '/* | |
\n\tAPI: ${1:method} ${2:/} | |
\n\tbody: ${3:body} | |
\n\tparams: | |
\n\t\t${4:params} | |
\n\tdescription: ${5:description} | |
\n*/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment