forked from xf00f/web3x
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.js
More file actions
28 lines (23 loc) · 1.22 KB
/
package.js
File metadata and controls
28 lines (23 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
This file is part of web3x.
web3x is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
web3x is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with web3x. If not, see <http://www.gnu.org/licenses/>.
*/
const package = require('./package.json');
const { writeFileSync, copyFileSync, chmodSync } = require('fs');
const { copySync } = require('fs-extra');
const { jest, scripts, devDependencies, ...pkg } = package;
writeFileSync('./dest/package.json', JSON.stringify(pkg, null, ' '));
writeFileSync('./dest-es/package.json', JSON.stringify({ ...pkg, name: `${pkg.name}-es` }, null, ' '));
copyFileSync('README.md', './dest/README.md');
copyFileSync('README.md', './dest-es/README.md');
chmodSync('./dest/codegen/index.js', '755');
copySync('./dest/codegen', './dest-es/codegen');