https://github.com/arjunu/webstorm-live-templates
https://github.com/arjunu/webstorm-live-templates
css javascript livetemplate webstorm
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/arjunu/webstorm-live-templates
- Owner: arjunu
- Created: 2017-11-05T16:01:01.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-23T17:47:00.000Z (over 7 years ago)
- Last Synced: 2025-01-20T16:42:53.188Z (over 1 year ago)
- Topics: css, javascript, livetemplate, webstorm
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Webstorm Live Templates
## Javascript
### console.log
`log`
```javascript
console.log($END$);
```
### Section comment
`c.sec`
```javascript
// ===============================================================================
// Section
// ===============================================================================
```
## React
### Class
`r.cls`
```javascript
import React, { Component } from 'react';
import classNames from 'classnames';
import styles from './$TM_FILENAME_BASE$.scss';
class $TM_FILENAME_BASE$ extends Component {
render() {
return
$END$;
}
}
$TM_FILENAME_BASE$.propTypes = {
};
$TM_FILENAME_BASE$.defaultProps = {
};
export default $TM_FILENAME_BASE$;
```
$TM_FILENAME_BASE$ = `capitalize(camelCase(fileNameWithoutExtension()))`
### Constructor
`r.cons`
```javascript
constructor(props){
super(props);
}
```
### componentDidMount
`r.cdm`
```javascript
componentDidMount() {
$END$
}
```
### componentWillReceiveProps
`r.cwrp`
```javascript
componentWillReceiveProps(nextProps) {
$END$
}
```
## Imports
```javascript
i.r
import React, { Component } from 'react';
i.cn
import classNames from 'classnames';
i.rdx
import { connect } from 'react-redux';
i.pt
import PropTypes from 'prop-types';
```
## Tests
### Test File Imports
`t.imp`
```javascript
import React from 'react';
import {mount, shallow} from 'enzyme';
import {fromJS} from 'immutable';
```
### Test Suite
`t.desc`
```javascript
describe('$END$', () => {
test('', () => {
});
});
```
### Test Case
`t.test`
```javascript
test('$END$', () => {
});
```
# CSS
### Section comment
`c.sec`
```css
/*------------------------------------*\
#$END$
\*------------------------------------*/
```