| id | development |
|---|---|
| title | Development |
git clone git@github.com:qlik-oss/after-work.js.gitEnsure you have yarn installed globally:
npm i -g yarnGo into the cloned folder:
yarnRun all tests with:
npm testThis will run all after-work.js tests with after-work.js itself.
For easy debugging using vscode just add a .vscode/launch.json.
launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "NodeRunner",
"program": "${workspaceRoot}/commands/aw/src/index.js",
"args": [
"-c",
"aw.config.js",
"--glob",
"${file}"
]
},
{
"type": "node",
"request": "launch",
"name": "ChromeRunner",
"program": "${workspaceRoot}/commands/aw/src/index.js",
"args": [
"chrome",
"-c",
"aw.config.js",
"--glob",
"${file}"
]
},
{
"type": "chrome",
"request": "launch",
"name": "ChromeHeadless",
"port": 9222,
"url": "http://localhost:9676/examples/index.html",
"webRoot": "${workspaceFolder}",
"runtimeArgs": [
"--headless",
"--disable-gpu"
]
}
],
"compounds": [
{
"name": "ChromeDebug",
"configurations": [
"ChromeHeadless",
"ChromeRunner"
]
}
]
}
Add a breakpoint in any *.{js,ts} and hit F5 and off you go...
To debug in Chrome just pass:
npx aw chrome -c aw.config.js --chrome.devtools=trueThis will ensure to auto open devtools in your Chrome instance and waiting for it to attach.
Add a debugger statement in any file and it will break right into it 🚀.
after-work.js is designed to be run directly without installing it. Just go into the project you want to test and point to your local entry point:
../after-work.js/commands/aw/src/index.jsThis will run after-work.js with your local changes 💥.