How to use the vow.resolve function in vow

To help you get started, we’ve selected a few vow 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 jscs-dev / node-jscs / test / scripts / integration.js View on Github external
var spawn = require('child_process').spawn;
var chalk = require('chalk');
var vow = require('vow');
var vowFs = require('vow-fs');

var SOURCES = ['lib', 'test/specs'];
var MOCHA = 'node_modules/.bin/mocha';

/**
 * Applying passed presets to JSCS sources and tests, then executing tests.
 * So we can make sure nothing breaks during these reformatting actions.
 */
var presets = process.env.TEST_PRESET && vow.resolve(process.env.TEST_PRESET.split(','));

/**
 * Or applying every available preset if nothing passed and do the same.
 */
presets = presets || vowFs.listDir('./presets')
    .then(function(presetFilenames) {
        var presets = presetFilenames.map(function(presetFilename) {
            return presetFilename.replace('.json', '');
        });

        // List of rules that are not used in any of the default presets
        presets.unshift('./test/scripts/forgotten-rules.json');

        return presets;
    });
github bem-archive / bem-site-engine / src / data / providers / provider-file.js View on Github external
this.save = function (options) {
        logger.debug(util.format('save data to file %s', options.path), module);
        var promise = options.archive ?
            gzip(options.data) : vow.resolve(options.data);
        return promise.then(function (data) {
            return vowFs.write(options.path, data, 'utf8');
        });
    };
github bem-archive / bem-site-engine / src / blocks / server.blocks / provider / _type / provider_type_file.node.js View on Github external
save:  function (options) {
            logger.debug('save data to file file %s', options.path ? options.path : 'unknown file');
            var promise = options.archive ? util.zip(options.data) : vow.resolve(options.data);
            return promise.then(function (data) {
                return vowFs.write(options.path, data, 'utf8');
            });
        },
github bem-archive / bem-site-engine / src / data / common.js View on Github external
makeForTesting: function (version, env) {
        var promise = version ? vow.resolve() : makeSnapshot();
        return promise.then(function (snapshot) {
            return version ? vow.resolve() : uploadSnapshot(snapshot);
        })
        .then(function () {
            return setSnapshotActive(providers.getProviderYaDisk(), env, version);
        });
    },
    makeForProduction: function (version, env) {
github bem-archive / bem-site-engine / src / data / common.js View on Github external
makeForDevelopment: function (version) {
        var promise = version ? vow.resolve() : makeSnapshot();
        return promise.then(function () {
            return setSnapshotActive(providers.getProviderFile(), '', version);
        });
    },
    makeForTesting: function (version, env) {

vow

DOM Promise and Promises/A+ implementation for Node.js and browsers

MIT
Latest version published 5 years ago

Package Health Score

53 / 100
Full package analysis

Popular vow functions