-
Notifications
You must be signed in to change notification settings - Fork 21
/
package.json
42 lines (42 loc) · 1.98 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
"name": "mShots.NodeJS",
"author": "David Newman <[email protected]>",
"description": "WordPress mShots System",
"version": "0.1.0",
"main": "./lib/mshots.js",
"repository": {
"type": "git",
"url": "git+https://github.com/automattic/mshots.git"
},
"engines": {
"node": ">= 12.0"
},
"scripts": {
"test": "npm run test:php && npm run test:js",
"test:php": "phpunit -c tests/phpunit.xml tests",
"test:js": "jest",
"start": "npm run start:docker && npm run start:mshots && echo mshots service successfully in the mshots docker container. && echo Port 8000 is mapped to localhost, e.g. http://localhost:8000/mshots/v1/example.com",
"start:docker": "docker-compose up -d",
"stop:docker": "docker-compose down",
"start:mshots": "docker-compose exec mshots ./mshots_ctl.sh start",
"stop": "docker-compose exec mshots sh -c 'test -f /var/run/mshots.pid && kill `cat /var/run/mshots.pid` && echo Master Process killed && rm -f /var/run/mshots.pid || echo already stopped'; npm run stop:docker",
"restart": "npm run stop; npm run start",
"status": "docker-compose exec mshots bash -c 'echo mShots Master process: `set -o pipefail; ps ax | grep Master | grep -v grep | awk \"{print \\\\$1}\" || echo not running` ; echo Workers: `ps ax | grep Worker | grep -v grep | wc -l`'",
"build": "docker-compose build",
"config:core": "rm .env; cp docker-compose-core.yml docker-compose.yml ; npm run build",
"config:dev": "echo \"UID=$(id -u)\nGID=$(id -g)\" > .env; docker-compose -f docker-compose-core.yml -f docker-compose-dev-override.yml config > docker-compose.yml; npm run build",
"docker:install-chromium-binary": "docker-compose run mshots bash -c 'cd node_modules/puppeteer; node install.js'",
"prepare": "npm run config:dev; npm run build; npm run docker:install-chromium-binary"
},
"dependencies": {
"ip": "^1.1.5",
"log4js": ">=6.4.0",
"puppeteer": "^15.4"
},
"devDependencies": {
"express": "^4.17.1",
"jest": "^25.3.0",
"sharp": "^0.30.5",
"tmp": "^0.1.0"
}
}