react / wstein / node_modules / jest-cli / node_modules / istanbul / node_modules / async / support / sync-package-managers.js
80684 views#!/usr/bin/env node12// This should probably be its own module but complaints about bower/etc.3// support keep coming up and I'd rather just enable the workflow here for now4// and figure out where this should live later. -- @beaugunderson56var fs = require('fs');7var _ = require('lodash');89var packageJson = require('../package.json');1011var IGNORES = ['**/.*', 'node_modules', 'bower_components', 'test', 'tests'];12var INCLUDES = ['lib/async.js', 'README.md', 'LICENSE'];13var REPOSITORY_NAME = 'caolan/async';1415packageJson.jam = {16main: packageJson.main,17include: INCLUDES,18categories: ['Utilities']19};2021packageJson.spm = {22main: packageJson.main23};2425packageJson.volo = {26main: packageJson.main,27ignore: IGNORES28};2930var bowerSpecific = {31moduleType: ['amd', 'globals', 'node'],32ignore: IGNORES,33authors: [packageJson.author]34};3536var bowerInclude = ['name', 'description', 'version', 'main', 'keywords',37'license', 'homepage', 'repository', 'devDependencies'];3839var componentSpecific = {40repository: REPOSITORY_NAME,41scripts: [packageJson.main]42};4344var componentInclude = ['name', 'description', 'version', 'keywords',45'license'];4647var bowerJson = _.merge({}, _.pick(packageJson, bowerInclude), bowerSpecific);48var componentJson = _.merge({}, _.pick(packageJson, componentInclude), componentSpecific);4950fs.writeFileSync('./bower.json', JSON.stringify(bowerJson, null, 2));51fs.writeFileSync('./component.json', JSON.stringify(componentJson, null, 2));52fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, 2));535455