"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/form-data/node_modules/async/support/sync-package-managers.js" (7 Feb 2017, 1553 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/env node
    2 
    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
    6 
    7 var fs = require('fs');
    8 var _ = require('lodash');
    9 
   10 var packageJson = require('../package.json');
   11 
   12 var IGNORES = ['**/.*', 'node_modules', 'bower_components', 'test', 'tests'];
   13 var INCLUDES = ['lib/async.js', 'README.md', 'LICENSE'];
   14 var REPOSITORY_NAME = 'caolan/async';
   15 
   16 packageJson.jam = {
   17   main: packageJson.main,
   18   include: INCLUDES,
   19   categories: ['Utilities']
   20 };
   21 
   22 packageJson.spm = {
   23   main: packageJson.main
   24 };
   25 
   26 packageJson.volo = {
   27   main: packageJson.main,
   28   ignore: IGNORES
   29 };
   30 
   31 var bowerSpecific = {
   32   moduleType: ['amd', 'globals', 'node'],
   33   ignore: IGNORES,
   34   authors: [packageJson.author]
   35 };
   36 
   37 var bowerInclude = ['name', 'description', 'version', 'main', 'keywords',
   38   'license', 'homepage', 'repository', 'devDependencies'];
   39 
   40 var componentSpecific = {
   41   repository: REPOSITORY_NAME,
   42   scripts: [packageJson.main]
   43 };
   44 
   45 var componentInclude = ['name', 'description', 'version', 'keywords',
   46   'license'];
   47 
   48 var bowerJson = _.merge({}, _.pick(packageJson, bowerInclude), bowerSpecific);
   49 var componentJson = _.merge({}, _.pick(packageJson, componentInclude), componentSpecific);
   50 
   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));