Skip to content

Instantly share code, notes, and snippets.

@mryhryki
Last active January 30, 2023 09:04
Show Gist options
  • Save mryhryki/84526e5c1161d84bf786aadd2c7fcd64 to your computer and use it in GitHub Desktop.
Save mryhryki/84526e5c1161d84bf786aadd2c7fcd64 to your computer and use it in GitHub Desktop.

example-nutjs

Setup

$ npm install

Execute

$ npm start

Development

# Watch mode
$ npm run dev

# Lint
$ npm run lint
$ npm run lint:watch
package-lock.json
node_modules/**
.editorconfig
.eslintrc.yaml
.prettierrc.json
data/**
const { mouse, left, right, up, down } = require("@nut-tree/nut-js");
(async () => {
// Simple Movement: https://nutjs.dev/tutorials/first_steps
await mouse.move(left(500));
await mouse.move(up(500));
await mouse.move(right(500));
await mouse.move(down(500));
})();
{
"name": "nodejs-script",
"author": "mryhryki",
"private": true,
"license": "MIT",
"engines": {
"node": "18.x",
"npm": "9.x"
},
"scripts": {
"start": "node index.js",
"dev": "nodemon --watch ./ --ext js index.js",
"lint": "mryhryki-lint",
"lint:fix": "mryhryki-lint-fix"
},
"dependencies": {
"@mryhryki/lint": "^0.0.12",
"@nut-tree/nut-js": "^3.0.0"
},
"nodemonConfig": {
"delay": 1000
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment