UNPKG

create-tezos-smart-contract

Version:

Node.js toolset to write, test and deploy Tezos smart contracts

26 lines (25 loc) 1.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.postInstallSetup = exports.addPostInstallCommand = void 0; const console_1 = require("../../console"); const bundle_1 = require("../../modules/bundle"); const make_jest_config_1 = require("../init/contract-bundle/make-jest-config"); const addPostInstallCommand = (program, debugHook) => { program .command('postinstall', { hidden: true }) .action(() => { (0, exports.postInstallSetup)(); }) .hook('preAction', debugHook); }; exports.addPostInstallCommand = addPostInstallCommand; // Full start-sandbox command controller const postInstallSetup = async () => { (0, console_1.em)(`Finishing toolchain setup...\n`); // Read configfile const contractsBundle = new bundle_1.ContractsBundle((0, console_1.getCWD)()); // Create Jest config with local commands so we don't loose config over missing npx files await contractsBundle.writeTextFile('jest.config.js', (0, make_jest_config_1.makeJestConfig)()); (0, console_1.em)('Done.'); }; exports.postInstallSetup = postInstallSetup;