3 // This should probably be its own module but complaints about bower/etc.
4 // support keep coming up and I'd rather just enable the workflow here for now
5 // and figure out where this should live later. -- @beaugunderson
7 var fs = require('fs');
8 var _ = require('lodash');
10 var packageJson = require('../package.json');
12 var IGNORES = ['**/.*', 'node_modules', 'bower_components', 'test', 'tests'];
13 var INCLUDES = ['lib/async.js', 'README.md', 'LICENSE'];
14 var REPOSITORY_NAME = 'caolan/async';
17 main: packageJson.main,
19 categories: ['Utilities']
23 main: packageJson.main
27 main: packageJson.main,
32 moduleType: ['amd', 'globals', 'node'],
34 authors: [packageJson.author]
37 var bowerInclude = ['name', 'description', 'version', 'main', 'keywords',
38 'license', 'homepage', 'repository', 'devDependencies'];
40 var componentSpecific = {
41 repository: REPOSITORY_NAME,
42 scripts: [packageJson.main]
45 var componentInclude = ['name', 'description', 'version', 'keywords',
48 var bowerJson = _.merge({}, _.pick(packageJson, bowerInclude), bowerSpecific);
49 var componentJson = _.merge({}, _.pick(packageJson, componentInclude), componentSpecific);
51 fs.writeFileSync('./bower.json', JSON.stringify(bowerJson, null, 2));
52 fs.writeFileSync('./component.json', JSON.stringify(componentJson, null, 2));
53 fs.writeFileSync('./package.json', JSON.stringify(packageJson, null, 2));