MantaSails is a Sails snippet tool for vscode. It is efficient and fun to make use of. It enables a faster workflow for devs using Sails. It has been tested and I am sure it would help become more productive.
Tip: After selecting what snippet to use, use the tab key to navigate inputs.
- Open the Extensions sidebar in VS Code.
View → Extensions
- Search for
MantaSails
, choose "MantaSails" - Click Install to install it
MantaSails is released under the MIT License
Prefix | Code |
---|---|
mxf or fhelper | generate a function |
si or sinput | generate an input template |
ei or einput | generate an exit template |
gr or getroute | generate a get route template |
pr or postroute | generate a post route template |
pur or putroute | generate a put route template |
par or patchroute | generate a patch route template |
battr or booleanattribute | generate a boolean attribute template |
sattr or stringattribute | generate a string attribute template |
sattre or emailattribute | generate a email attribute template |
sattrp or passwordattribute | generate a password attribute template |
nattr or numberattribute | generate a number attribute template |
rb or rbody | generate a template to unpack request |
atc or addtocollection | generate a template for .addToCollection |
arc or archive | generate a template for .archive |
aarc or accessarchive | generate a template for .Archive.findOne |
avg or average | generate a template for .average |
cnt or count | generate a template for .count |
co or createobj | generate a template for .create |
cof or createobjfetch | generate a template for fetch .create |
cb or createbulk | generate a template for .createEach |
cbf or createbulkfetch | generate a template for fetch .createEach |
drs or deleterecords | generate a template multiple .destroy |
dsr or deletespecificrecords | generate a template for specific .destroy |
drr or deleterangerecords | generate a template for range .destroy |
dr or deleterecord | generate a template for .destroy |
fo or findOne | generate a template for .findOne |
f or find | generate a template for .find |
fop or findproj | generate a template for projective .find |
foc or findorcreate | generate a template for .findOrCreate |
foce or findorcreateexec | generate a template for .findOrCreate |
rc or removecollection | generate a template for .removeFromCollection |
rsc or replacecollection | generate a template for .replaceCollection |
sr or streamrecords | generate a template for .stream |
sumr or sumrecords | generate a template for .sum |
urs or updaterecords | generate a template for multiple .update |
ursf or updaterecordsfetch | generate a template for fetch .update |
ur or updaterecord | generate a template for .updateOne |
vr or validaterecord | generate a template for .validate |
pmtm or parentmtm | generate a template for many-to-many (parent) |
cmtm or childmtm | generate a template for many-to-many (child) |
ow or oneway | generate a template for one-way association |
potm or parentotm | generate a template for one-to-many (parent) |
cotm or childotm | generate a template for one-to-many (child) |
poto or parentoto | generate a template for one-to-one (parent) |
coto or childoto | generate a template for one-to-one (child) |
st or sort | generate a template for .sort |
sk or skip | generate a template for .skip |
sir or inertiarender | generate a template for sails.inertia.render |
sil or inertialocation | generate a template for sails.inertia.location |
sih or inertiashare | generate a template for sails.inertia.share |
fs or flushshare | generate a template for .flushShared |
- Fork
- Update
snippets.json
following the standard - Make PullRequest
- Be happy and go for a beer or coffee.
Created by Lennox Charles. Go follow on Twitter!
Got some feedback? Send a DM on Twitter
Enjoy!