Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build command arguments added #65

Merged
merged 8 commits into from
May 31, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
path parsed
  • Loading branch information
volovyks committed May 30, 2022
commit ece7ba90f8c0a16c0a8273b14638da6295910243
8 changes: 3 additions & 5 deletions cli/cli.js
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ import { babel } from '@rollup/plugin-babel';
import { rollup } from 'rollup';

import { exec as exec_ } from 'child_process';
import { path } from 'node:path';
import { promisify } from 'util';

const exec = promisify(exec_);
@@ -38,11 +39,8 @@ async function build(argv) {
const ARCH = await executeCommand('uname -m', true);

const SOURCE_FILE_WITH_PATH = argv.source;
// TODO: parce path
// const TARGET_DIR = getBuildDir(argv.target);
// const TARGET_FILE_NAME = getTargetFileName(argv.target);
const TARGET_DIR = 'build';
const TARGET_FILE_NAME = 'contract';
const TARGET_DIR = path.dirname(argv.target);
const TARGET_FILE_NAME = path.basename(argv.target);

const ROLLUP_TARGET = `${TARGET_DIR}${TARGET_FILE_NAME}.js`;
const QJS_TARGET = `${TARGET_DIR}/${TARGET_FILE_NAME}.h`;