the cli to create react components
support css
,scss
,less
- the cli to create react components
- support create multiple components
- support
css
,Scss
,Less
- support stateless function(or you can say pure component)
mkcomponent App
//you will create React component named App
mkcomponent Header,Body,Footer
//you will create React compoennts named Header,Body,Footer
npm i -g mn-component-maker
mkcomponent -l Body -t vue
mkcomponent -s Body
//create React components named Body with Scss
mkcomponent -l Body
//create React components named Body with Less
mkcomponent -p Body
//you will create pure component for stateless function
mmkcomponent -l Body -t vue
- [name].jsx
- [name].css
- index.jsx
- [name].css
- index.vue
import React from 'react';
import styles from './[name].css'
class [name] extends React.Component {
constructor(props) {
super(props);
this.displayName = [name];
}
render() {
return (
<div className={styles.container}>
[name]
</div>
)
}
}
export default [name];
.container {
}
import [name] from './hh'
export default [name]
<template>
<div class="[name]">
[name]
</div>
</template>'
<script>
export default {
name: [name]
data(){
return {
}
}
};
</script>
<style scoped lang='css' src='[name].css'>
</style>
.container {
}