Create and manipulate a temporary project.
Might be useful to test node tools that interact with the file system.
npm install cista
const cista = require('cista');
const fileTree = {
'src/app.js': ';',
'package.json': '{}'
};
const project = cista(fileTree);
Path to the temporary project.
Retrieve and modify files in the temporary directory.
The list of files in the temporary project.
Read, change or write the content of a single file.
const {files} = cista(fileTree);
console.log(files['src/app.js']); // Outputs `;`
project.files['src/app.js'] = 'break;';
console.log(files['src/app.js']); // Outputs `break;`
Delete the temporary project from file system.