Last active
August 29, 2016 12:16
-
-
Save burtyish/38c8399dfda1585f1558 to your computer and use it in GitHub Desktop.
WebStorm template for new ES6 React component file. Converts hyphen-separated filenames to PascalCase class name.
This file contains 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
#set( $lowerCaseName = "$NAME" ) | |
#set( $newName = "" ) | |
#foreach( $part in $NAME.split("-") ) | |
#set( $newName = "$newName$part.substring(0,1).toUpperCase()$part.substring(1)") | |
#end | |
import React from 'react'; | |
const $newName = React.createClass({ | |
propTypes: { | |
}, | |
render() { | |
return <div></div> | |
} | |
}); | |
export default $newName; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment