/*
* name: ${NAME}
* description: #[[$END$]]#
* createTime: ${DATE}
* author: ${USER}
*/
#if(${NAME} == 'index')
class ${DIR_PATH} extends Component {
#else
class ${NAME} extends Component {
#end
constructor(props) {
super(props);
this.state = {};
}
componentDidMount() {
}
componentWillUnmount() {
}
render() {
return (
<>
#[[$END$]]#
</>
)
}
}
DIR_PATH
只能获取相对于项目根目录的路径,怎么通过正则截取DIR_PATH
的值,返回当前文件所在文件夹的名称呢