diff --git a/lib/copyDirs.js b/lib/copyDirs.js new file mode 100644 index 0000000..41a678d --- /dev/null +++ b/lib/copyDirs.js @@ -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) + }) + } + }) + } + } +} \ No newline at end of file diff --git a/toruf/objects/projects.json b/toruf/objects/projects.json index c3cccf9..3d0fb45 100644 --- a/toruf/objects/projects.json +++ b/toruf/objects/projects.json @@ -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", @@ -46,7 +55,7 @@ "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":"", @@ -54,9 +63,9 @@ "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",