【发布时间】:2015-12-27 17:40:54
【问题描述】:
我想知道是否可以在 Atom 编辑器中创建或调用用于 sn-ps 的函数。如果可能的话,我该怎么做?也许使用 lodash 或类似的东西?
我想使用大写()、小写()、文件路径()之类的东西。
我的问题是我想在下面生成类似这样的内容:
import Hello from 'components/atoms/hello/Hello';
我的 sn-p 会是这样的:
import $1 from 'components/atoms/downcase($1)/$1';
或者:
import camelCase($1) from 'components/atoms/$1/camelCase($1)';
【问题讨论】: