Skip to content

Commit

Permalink
Merge a52e340 into d8bbc9b
Browse files Browse the repository at this point in the history
  • Loading branch information
omerman committed Aug 21, 2018
2 parents d8bbc9b + a52e340 commit 0a4fb0d
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tools/build.js
Expand Up @@ -9,7 +9,8 @@

'use strict';

// const fs = require('fs');
const fs = require('fs');
const path = require('path');
const del = require('del');
const rollup = require('rollup');
const babel = require('rollup-plugin-babel');
Expand Down Expand Up @@ -41,16 +42,15 @@ promise = promise.then(() => del(['dist/*']));
})));
});

// Copy package.json (modified), LICENSE.txt and README
// promise = promise.then(() => {
// delete pkg.private;
// delete pkg.devDependencies;
// delete pkg.scripts;
// delete pkg.eslintConfig;
// delete pkg.babel;
// fs.writeFileSync('dist/package.json', JSON.stringify(pkg, null, ' '), 'utf-8');
// fs.writeFileSync('dist/LICENSE.txt', fs.readFileSync('LICENSE.txt', 'utf-8'), 'utf-8');
// fs.writeFileSync('dist/README.md', fs.readFileSync('README.md', 'utf-8'), 'utf-8');
// });
//
// promise.catch(err => console.error(err.stack)); // eslint-disable-line no-console
// Copy typings file to dist
promise = promise.then(() => {
const typingsFile = fs.readFileSync(
path.resolve(__dirname, '..', 'src', 'index.d.ts'),
{ encoding: 'utf-8' },
);
fs.writeFileSync(
path.resolve(__dirname, '..', 'dist', 'index.d.ts'),
typingsFile,
'utf-8',
);
});

0 comments on commit 0a4fb0d

Please sign in to comment.