TaskerJavaScriptHelpers icon indicating copy to clipboard operation
TaskerJavaScriptHelpers copied to clipboard

Tutorial Errors

Open Sirbeastian opened this issue 3 years ago • 0 comments

Noticed that the Pokemon tutorial appears to be broken in a couple of places

  1. Sandbox Tutorial

After finishing, running command node sandbox/sandbox.tasker.pokemonInfoHelper.js' gives error "FIle you are testing does not exist: [...]/TaskerJavaScriptHelpers-master/src/pokemonInfoHelper.js"

Found the issue - the Sandbox file doesn't include lines to rename the file. Should require 'path' at the start and replace the final line with

const currentScriptFilename = path.basename(__filename);
const scriptFilenameToTest = currentScriptFilename.replace('sandbox.', '');
taskerSandbox(scriptFilenameToTest, taskerLocalVariables);
  1. Exporting Script Tutorial

This step just doesn't work. Running npm run taskerfy gives error message:

[...]/TaskerJavaScriptHelpers-master/src/tasker.pokemonInfoHelper.js
  25:35  error    'pokemon_json' is not defined                  no-undef
  26:34  error    'use_shiny_image' is not defined               no-undef
  64:58  warning  Newline required at end of file but not found  eol-last

Can't find what's causing it to not import the local variables, but I'm basically a novice so it might be something obvious. Tried to check how the example one for Sparkle Laundry does it but can't figure it out.

Sirbeastian avatar May 06 '22 05:05 Sirbeastian