How to use the bower.json function in bower

To help you get started, we’ve selected a few bower 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 walmartlabs / circus / lib / plugins / bower-copy-plugin.js View on Github external
compiler.inputFileSystem.readFile(file, function(err, data) {
        if (err) {
          /* istanbul ignore else */
          if (err.code === 'ENOENT') {
            return callback();
          } else {
            return callback(err);
          }
        }

        compilation.assets['bower.json'] = new RawSource(data);
        Utils.bootstrapAsset(compilation, 'bower.json');

        callback();
      });
    });
github bower / bower / test / helpers.js View on Github external
this.meta = function(tag) {
            if (tag) {
                return files[tag]['bower.json'];
            } else {
                return files['bower.json'];
            }
        };
github bower / bower / test / helpers.js View on Github external
this.meta = function(tag) {
            if (tag) {
                return files[tag]['bower.json'];
            } else {
                return files['bower.json'];
            }
        };
github one-more / sprute / build / runtime / require.js View on Github external
function loadAsDirectory(dir) {
    "use strict";

    if(fileSystem.isFile(dir['package.json'])) {
        const pJ = JSON.parse(dir['package.json'].contents);
        return loadFromPackageFile(pJ, dir)
    }
    if(fileSystem.isFile(dir['bower.json'])) {
        const pJ = JSON.parse(dir['bower.json'].contents);
        return loadFromPackageFile(pJ, dir)
    }
    if(fileSystem.isFile(dir['index.js'])) {
        return dir['index.js']
    }
    if(fileSystem.isFile(dir['index.json'])) {
        return dir['index.json']
    }
}
github one-more / sprute / build / runtime / require.js View on Github external
function loadAsDirectory(dir) {
    "use strict";

    if(fileSystem.isFile(dir['package.json'])) {
        const pJ = JSON.parse(dir['package.json'].contents);
        return loadFromPackageFile(pJ, dir)
    }
    if(fileSystem.isFile(dir['bower.json'])) {
        const pJ = JSON.parse(dir['bower.json'].contents);
        return loadFromPackageFile(pJ, dir)
    }
    if(fileSystem.isFile(dir['index.js'])) {
        return dir['index.js']
    }
    if(fileSystem.isFile(dir['index.json'])) {
        return dir['index.json']
    }
}
github depscloud / depscloud / extractor / src / extractors / BowerJsonExtractor.ts View on Github external
public async extract(_: string, files: { [p: string]: ExtractorFile }): Promise {
        const {
            name,
            version,
            repository,
            dependencies,
            devDependencies,
            bundledDependencies,
        } = files["bower.json"].json();

        const { organization, module } = parseName(name);

        let allDependencies = extract((dependencies || {}), "");
        allDependencies = allDependencies.concat(extract((devDependencies || {}), "dev"));
        allDependencies = allDependencies.concat(extract((bundledDependencies || {}), "bundled"));

        let sourceUrl = repository;
        if (typeof repository === "object") {
            sourceUrl = repository.url;
        }

        return {
            language: Languages.JAVASCRIPT,
            system: "bower",
            sourceUrl,