Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

module: new switch -x; support multiple #! args #7007

Closed
wants to merge 22 commits into from

Commits on Jan 30, 2014

  1. module: new switch; support multiple #! args

    Interpreters invoked via #! only see one
    argument on some environments (Linux, Cygwin)
    
    This pull request enables a script to pass multiple
    arguments,such as v8 options, to node using a technique
    developed for other scripting languages (perl and
    ruby).
    
    Detailed justification and analysis in the attached
    file doc/Minux-X-Switch-Proposal.md
    
    This pull request *DOES NOT* make any changes to
    the public API of modules, which is a locked
    subsystem.
    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    81ff92f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f48d166 View commit details
    Browse the repository at this point in the history
  3. module: strip leading lines when -x switch set

    Factor the code that removes '#!' into a function,
    Module._removePrologue.
    
    Module._removePrologue removes only the first #! line unless
    BOTH a) this is the main module (module.id === '.')
     AND b) the '-x' switch was passed on the command line.
    
    In case both a) and b) are true, Module._removePrologue
    removes lines until it finds a line which begins with "#!"
    and contains the substring "node".
    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    50c715a View commit details
    Browse the repository at this point in the history
  4. command-line: add support for -x switch

    Detect '-x' switch on command line and set global
    strip_until_shebang_node and property
    process._stripUntilShebangNode
    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    c70963a View commit details
    Browse the repository at this point in the history
  5. PrintHelp: add documentation of -x switch

    Add documentation of -x switch:
    
    "-x  ignore text before #!node line"
    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    e556eeb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    44d4674 View commit details
    Browse the repository at this point in the history
  7. indent code example further

    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    adee60b View commit details
    Browse the repository at this point in the history
  8. add section, fix EOL

    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    6f26d0d View commit details
    Browse the repository at this point in the history
  9. module: stop stripping lines when #!node seen

    Explicit 'true' return value omitted when refactoring.
    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    cc4a40a View commit details
    Browse the repository at this point in the history
  10. node: -x switch; no optional <dir> arg

    Remove incorrect documentation referring to optional <dir>
    arg to proposed -x switch.
    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    365113b View commit details
    Browse the repository at this point in the history
  11. fix indentation

    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    0486637 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    7b322ad View commit details
    Browse the repository at this point in the history
  13. module: strip leading lines when -x switch set

    Factor the code that removes '#!' into a function,
    Module._removePrologue.
    
    Module._removePrologue removes only the first #! line unless
    BOTH a) this is the main module (module.id === '.')
     AND b) the '-x' switch was passed on the command line.
    
    In case both a) and b) are true, Module._removePrologue
    removes lines until it finds a line which begins with "#!"
    and contains the substring "node".
    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    a8e2660 View commit details
    Browse the repository at this point in the history
  14. command-line: add support for -x switch

    Detect '-x' switch on command line and set global
    strip_until_shebang_node and property
    process._stripUntilShebangNode
    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    e4aac3c View commit details
    Browse the repository at this point in the history
  15. PrintHelp: add documentation of -x switch

    Add documentation of -x switch:
    
    "-x  ignore text before #!node line"
    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    8614f7c View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    04fc386 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    e6dee25 View commit details
    Browse the repository at this point in the history
  18. doc: add section, fix EOL

    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    6e6542a View commit details
    Browse the repository at this point in the history
  19. module: stop stripping lines when #!node seen

    Explicit 'true' return value omitted when refactoring.
    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    ac85dad View commit details
    Browse the repository at this point in the history
  20. node: -x switch; no optional <dir> arg

    Remove incorrect documentation referring to optional <dir>
    arg to proposed -x switch.
    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    3478c0f View commit details
    Browse the repository at this point in the history
  21. doc: fix indentation

    smikes committed Jan 30, 2014
    Configuration menu
    Copy the full SHA
    5eaf313 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    2c0f17d View commit details
    Browse the repository at this point in the history