ellevest-cli
v1.0.3
Published
A CLI to automate frontend tasks
Downloads
1
Maintainers
Readme
Ellevest-CLI
ellevest-cli
is a cli that automates frontend tasks.
Installation
NPM: npm i --global ellevest-cli
Yarn: yarn add global ellevest-cli
Commands:
ellevest component --name [componentName]
component
Example: Running ellevest component --name ElleButton
will create the following directory & files
├── ElleButton
│ ├── __tests__
│ │ ├── ElleButton.tests.js
│ ├── index.js
│ ├── ElleButton.jsx
│ ├── ElleButton.module.scss
These files will have the following content:
'./__tests__/ElleButton.tests.js'
import React from 'react'
import ElleButton from '../ElleButton'
import { shallow } from 'enzyme'
describe('ElleButton', () => {
it('should render correctly', () => {
const wrapper = shallow(<ElleButton />)
expect(wrapper).toMatchSnapshot()
})
})
'./index.js'
import { ElleButton } from './ElleButton/ElleButton'
export default ElleButton
'./ElleButton.jsx'
import React from 'react'
import PropTypes from 'prop-types'
import styles from './ElleButton.module.scss'
const ElleButton = () => {
return (
/* code here */
)
}
ElleButton.propTypes = {
/* PropTypes here */
}
'./ElleButton.module.scss'
.ElleButton {
}