jonathanpenn/ui-screen-shooter

Support custom js file location

Closed this issue · 3 comments

New use case:

  1. Open my app at ~/Developer/impostor
  2. Clone ui-screen-shooter to ~/Developer/impostor/ui-screen-shooter
  3. Create script at ~/Developer/impostor/make_screenshots.js
  4. cd ~/Developer/impostor && ui-screen-shooter/ui-screen-shooter.sh ~/Desktop ./make_screenshots.js
    Or even better, ~/Desktop and ./*.js should be the default

If #27 and #28 are complete then the bin directory is gone. Otherwise we need something like: DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

Ah, I see where you're going with this. I like the idea. I'm not a fan of making ~/Desktop or ./*.js the default, though. I like the idea of passing in the js file. Maybe make shoot_the_screens.js the default unless a file is passed in? I don't think it should just blindly read in any js file with a shell glob because that would also try to run the library javascript files as automation scripts. I think it's best to just have a single script that should be run.

Agreed. OK parameters and defaults should be:

    1. Output: "$HOME/Desktop/screenshots" (current default)
    1. Script: ./shoot_the_screens.js (relative to where user invokes ui-screen-shooter.sh)

Later we can add #26

    1. Package: default '' (= clean/build the package using this tool)

Makes sense to me! Thanks for thinking through this.