How to use the buttercup.Archive function in buttercup

To help you get started, we’ve selected a few buttercup 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 buttercup / buttercup-desktop / src / main / workspace.js View on Github external
save: function(datasourcePath, password) {
            var archive = Buttercup.Archive.createWithDefaults(),
                datasource = new Buttercup.FileDatasource(datasourcePath);

            return datasource.save(archive, password);
        }
    };
github himynameisdave / git-labelmaker / bin / modules / set-token.js View on Github external
const writeToken = (password, token) => new Promise((res, rej) => {
    const datasource = new Buttercup.FileDatasource(bcupPath);
    if (!datasource) return rej('No datasource');
    const archive = Buttercup.Archive.createWithDefaults();
    const group = archive.createGroup('git-labelmaker');
    group.setAttribute('token', token);
    datasource.save(archive, password);
    return res(token);
});