When loading this module through node or Browserify'srequire() a "module not found" error is thrown.
This is due to the package.json file missing a "main" entry pointing to the main application script.
By adding this Node and Browserify users can easily use require('@orange-games/phaser-input'), allowing it to be nicely packaged inside their bundled script file.
Do note that using the script in this way still requires one to expose Phaser to the global scope. This is caused by the plugin relying on globals.
When loading this module through node or Browserify's
require()
a "module not found" error is thrown. This is due to the package.json file missing a "main" entry pointing to the main application script.By adding this Node and Browserify users can easily use
require('@orange-games/phaser-input')
, allowing it to be nicely packaged inside their bundled script file.Do note that using the script in this way still requires one to expose Phaser to the global scope. This is caused by the plugin relying on globals.