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

index.jsをモジュール化してspawnを使わず実行可能にする #8

Closed
hideki-a opened this issue Feb 16, 2021 · 0 comments
Closed
Assignees

Comments

@hideki-a
Copy link
Owner

hideki-a commented Feb 16, 2021

index.js → lib/index.js

引数を整備する

async function runner() {
}

module.exports = runner;

bin/axe-runner.js

const runner = require('../lib/index');

program
    .arguments('<urlFile>')
    .option('-c, --config <value>', 'Path to configuration file.')
    .action((urlFile, options) => {
        runner();
        process.stdout.write = csvFile.write.bind(csvFile);
        // Promiseを使う方が良い気がしている
        process.stdout.on('end', () => {
            process.exit(0);
        });
    });

index.js

引数を処理してrunnerを実行、もしくは廃止を検討。
廃止の場合はpackage.jsonmainを書き換え。

Hint

Check

  • 200URLのテストが通過することを確認すること
  • Basic認証を通過することを確認すること
@hideki-a hideki-a self-assigned this Feb 16, 2021
hideki-a added a commit that referenced this issue Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant