This commit is contained in:
2020-01-15 11:40:33 +01:00
commit 4af5d613a6
6 changed files with 678 additions and 0 deletions

15
snippets/snippet/index.js Normal file
View File

@ -0,0 +1,15 @@
const fs = require('fs');
const path = require('path');
exports.run = async (folder, args) => {
const snipFolder = path.join(folder, args[0]);
const template = path.join(__dirname, 'template');
fs.mkdir(snipFolder);
fs.copy(path.join(template, 'index.js'), path.join(snipFolder, 'index.js'));
};
exports.assert = (args) {
assert(args.length == 1);
assert(typeof args[0] == 'string');
assert(/^[a-zA-Z]+$/u.test(args[0]))
}

5
snippets/vue/index.js Normal file
View File

@ -0,0 +1,5 @@
const fs = require('fs');
module.exports = async folder => {
};