Skip to content

Support xs file.js instead of xs -s file.js #2

Description

@mathiasbynens

All other JS engines provided by jsvu support running scripts by simply passing a file name with no flags:

v8 file.js
chakra file.js
spidermonkey file.js
jsc file.js

However, xs needs the -s flag:

xs -s file.js

...because "without -e, -m or -s, strings are paths to test262 cases or directories".

Since the common case for external users seems to be running scripts, and not tests, can this be reconsidered? Specifically, I'd suggest the following changes:

  • xs file.js defaults to an implicit -s, and runs file.js as a script
  • xs file.mjs defaults to an implicit -m, and runs file.mjs as a module (matching V8, JSC, and Node.js)
  • a new flag is added to cover the Test262 cases/directories use case

WDYT?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions