Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions lib/copyDirs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
function recurseFolder(currentDirPath, destination, callback) {
fs.readdirSync(currentDirPath).forEach(function (name) {
var filePath = `${currentDirPath}/${name}`;
let newDest = `${destination}/${name}`
var stat = fs.statSync(filePath);
if (stat.isFile()) callback(filePath, newDest);
else if (stat.isDirectory()) {
createDir(newDest, function(err, data){
if(err) optionError(err, callback)
else recurseFolder(filePath, newDest, callback);
})
}
});
}

function copyModules(destination, callback){
//console.log('Copying modules...')
let npmPacks = ['uuid', 'axios', 'follow-redirects', 'debug', 'ms']
for(let i=0; i<=npmPacks.length; i++){
if(!npmPacks[i]){
callback(null, 'finished copying modules')
}
else{
let pack = npmPacks[i];
let origin = `./node_modules/${pack}`
if(fs.existsSync('./node_modules/super-easy-forms')){
origin = `./node_modules/${pack}`;
}
let dest = `${destination}/${pack}`
createDir(dest, function(err, data){
if(err) optionError(err, callback)
else{
recurseFolder(origin, dest, function(filePath, newDest) {
fs.copyFileSync(filePath, newDest)
})
}
})
}
}
}
17 changes: 13 additions & 4 deletions toruf/objects/projects.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
"website":"https://bootlib.com",
"installation":"https://supereasyforms.com/#getting_started"
},
"torus_cms": {
"title":"Torus CMS",
"description":"A complete command line interface for super easy forms. Allows you to deploy both the frontend and backend of your forms with a single command.",
"language":"",
"license":"",
"github":"gkpty/super-easy-forms-cli",
"website":"https://supereasyforms.com/#sef_cli",
"installation":"https://www.npmjs.com/package/super-easy-forms-cli"
},
"super_easy_forms": {
"title":"Super Easy Forms",
"description":"An open source serverless form generator",
Expand Down Expand Up @@ -46,17 +55,17 @@
"installation":"https://www.npmjs.com/package/super-easy-forms-cli"
},
"easy_md_to_html": {
"title":"Easy MD to HTML",
"title":"Easy Markdown to HTML",
"description":"A markdown to html converter with no external dependencies.",
"language":"",
"license":"",
"github":"gkpty/super-easy-forms-cli",
"website":"https://supereasyforms.com/#sef_cli",
"installation":"https://www.npmjs.com/package/super-easy-forms-cli"
},
"torus_cms": {
"title":"Torus CMS",
"description":"A complete command line interface for super easy forms. Allows you to deploy both the frontend and backend of your forms with a single command.",
"easy_object_to_csv": {
"title":"Easy Object to CSV",
"description":"A markdown to html converter with no external dependencies.",
"language":"",
"license":"",
"github":"gkpty/super-easy-forms-cli",
Expand Down