mock-json-package
Version:
39 lines (28 loc) • 928 B
JavaScript
import { writeOut } from './fileWriter.js'
import _ from 'lodash'
import { getProjectsToScan } from './fileScanner.js'
let projects = getProjectsToScan()
console.log("Printing File Path");
console.log(projects);
projects.map((p) => {
const directoryPath = p;
const repoOutputDirectory = "test-output"
const projectName = "test-output"
const name = "mock-package"
// JSON object
const outputJSON = {
"name": "John",
"age": 22,
"hobby": {
"reading" : true,
"gaming" : false,
"sport" : "football"
},
"class" : ["JavaScript", "HTML", "CSS"]
}
const repo_output_path = directoryPath + "/" + repoOutputDirectory;
const tool_output_path = process.cwd() + "/" + projectName;
writeOut(tool_output_path, name, outputJSON)
writeOut(repo_output_path, name, outputJSON)
console.log("Mission Accomplished");
})