Sha256: 94ea63451ece3539daf9606e3c2c33946f7b93f5089b9345ed31657c8011962a

Contents?: true

Size: 653 Bytes

Versions: 1

Compression:

Stored size: 653 Bytes

Contents

#!/usr/bin/env node --use_strict

const fs = require('fs');
const path = require('path');

const pkg = Object.assign({}, require('./package.json'));
delete pkg.scripts;
Object.assign(pkg, {
  main: 'index.js',
});

fs.writeFileSync('dist/package.json', JSON.stringify(pkg, null, 2));
fs.writeFileSync('dist/LICENSE.txt', fs.readFileSync('./LICENSE.txt').toString());
fs.writeFileSync('dist/README.md', fs.readFileSync('./README.md').toString());

fs.mkdirSync('dist/bin');
Object.keys(pkg.bin).forEach(key => {
  const binaryPath = pkg.bin[key];
  fs.writeFileSync(
    path.join('dist', binaryPath),
    fs.readFileSync(binaryPath).toString()
  );
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hauler-0.2.0 make-package.js