How to use the buttercup.Workspace 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
load: function(datasourcePath, password) {
            var workspace = new Buttercup.Workspace(),
                datasource = new Buttercup.FileDatasource(datasourcePath);

            return datasource.load(password).then(function(archive) {
                workspace
                    .setArchive(archive)
                    .setDatasource(datasource)
                    .setPassword(password);

                return workspace;
            });
        },