You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dotenv-tool/update-versions.js

15 lines
526 B
JavaScript

const fs = require('fs');
const path = require('path');
const version = require("./package.json").version
fs.writeFileSync(`${__dirname}${path.sep}dist${path.sep}cjs${path.sep}package.json`, JSON.stringify({
version: version,
type: 'commonjs'
}, null, ' '));
fs.writeFileSync(`${__dirname}${path.sep}dist${path.sep}mjs${path.sep}package.json`, JSON.stringify({
version: version,
type: 'module'
}, null, ' '));
fs.chmodSync(`${__dirname}${path.sep}dist${path.sep}cjs${path.sep}src${path.sep}bin.js`, 0o755)