How to use the fs-jetpack.write function in fs-jetpack

To help you get started, we’ve selected a few fs-jetpack examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github atillabyte / EEScript / EEScript.Editor / index.html View on Github external
success: function(response) {
                    loadTriggers(response);

                    // save triggers to local backup
                    jetpack.remove("triggers.json");
                    jetpack.write("triggers.json", response);
                },
                error: function() {
github zumwald / oss-attribution-generator / index.js View on Github external
licenseInfo.licenseText || `license: ${licenseInfo.license}${os.EOL}authors: ${licenseInfo.authors}`].join(os.EOL);
        }).value();

        var attribution = attributionSequence.join(`${os.EOL}${os.EOL}******************************${os.EOL}${os.EOL}`);

        var headerPath = path.join(options.outputDir, 'header.txt');
        
        if (jetpack.exists(headerPath)) {
            var template = jetpack.read(headerPath);
            console.log('using template', template);
            attribution = template + os.EOL + os.EOL + attribution;
        }

        jetpack.write(path.join(options.outputDir, 'licenseInfos.json'), JSON.stringify(licenseInfos));

        return jetpack.write(path.join(options.outputDir, 'attribution.txt'), attribution);
    })
    .catch(e => {
github kalohq / recon / packages / recon-cli / src / index.js View on Github external
return _pullStats(engine).then(stats => {
    vorpal.activeCommand.log('Dumping debug information...');
    const data = {stats, store: engine._debug({raw: false})};
    jetpack.write(file, data, {jsonIndent: 0});
    const path = Path.resolve(process.cwd(), file);
    vorpal.activeCommand.log(`Dumped successfully to ${path}`);
  });
}
github azu / postem / src / node / storage / Storage.js View on Github external
set(name, value) {
        this.all[name] = value;
        jetpack.write(this.path, this.all);
    }
github WeebDev / lolisafe / src / start.js View on Github external
function writeFrontendConfig() {
	/*
		Since ream can't execute getInitialData on non-routes we write a config file for it.
	*/
	const template = oneliner`
		module.exports = {
			version: '${process.env.npm_package_version}',
			URL: '${config.filesServeLocation}',
			baseURL: '${config.backendLocation}',
			serviceName: '${config.serviceName}',
			maxFileSize: '${config.uploads.uploadMaxSize}',
			chunkSize: '${config.uploads.chunkSize}',
			maxLinksPerAlbum: '${config.albums.maxLinksPerAlbum}'
		}`;
	jetpack.write(path.join(__dirname, 'site', 'config.js'), template);
	log.success('Frontend config file generated successfully');
}
github azu / postem / src / node / storage / Storage.js View on Github external
delete(name) {
        delete this.all[name];
        jetpack.write(this.path, this.all);
    }
github LeanKit-Labs / electron-starter-kit / spec / configStorage.spec.js View on Github external
before( () => {
			const config = { key2: "val-from-file", key3: "val3" };
			fs.write( otherConfigFile, config );
			store = new ConfigStorage( { key1: "val1", key2: "val2" }, false );
			store.loadFromFile( otherConfigFile );
		} );
github azu / postem / src / node / storage / Storage.js View on Github external
clear() {
        this.all = {};
        jetpack.write(this.path, this.all);
    }
}