Reputation: 932
How do I convert my file name company-controller.js
To this:
class CompanyController extends BaseController {
constructor() {
super(Company);
}
}
Upvotes: 0
Views: 243
Reputation: 28663
You have to transform the variable TM_FILENAME_BASE
"ctrl": {
"scope": "javascript",
"prefix": "base",
"body": [
"class ${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/} extends BaseController {",
"\tconstructor() {",
"\t\tsuper(${TM_FILENAME_BASE/(.*)-\\w+/${1:/pascalcase}/});",
"\t}",
"}"
],
"description": "Extend BaseController"
}
Upvotes: 2