/
package.json
151 lines (151 loc) · 14.1 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{
"name": "talkie",
"private": true,
"version": "6.0.0",
"description": "Text-to-speech (TTS) browser extension button.",
"scripts": {
"clean": "rimraf package/ && rimraf dist/ && rimraf web-ext-artifacts/ && rimraf lib/ && rimraf _locales/*/*.json~ _locales/*/messages.json",
"build": "npm run --silent messages:refresh && npm run --silent languages:refresh && npm run --silent build:copy:libs && rollup --config rollup.config.background.js && rollup --config rollup.config.popup.js && rollup --config rollup.config.popup.html.js && rollup --config rollup.config.options.js && rollup --config rollup.config.options.html.js && rollup --config rollup.config.demo.js && rollup --config rollup.config.demo.html.js && rollup --config rollup.config.stay-alive.js && rollup --config rollup.config.extension-translator.js && npm run --silent build:chrome && npm run --silent build:webextension",
"build:copy:libs": "mkdirp lib/ && cp node_modules/webextension-polyfill/dist/browser-polyfill.min.js node_modules/webextension-polyfill/dist/browser-polyfill.min.js.map lib/ && npm run --silent build:copy:libs:react:min && npm run --silent build:copy:libs:react:dev",
"build:copy:libs:react:min": "cat node_modules/react/umd/react.production.min.js node_modules/react-redux/dist/react-redux.min.js node_modules/redux/dist/redux.min.js node_modules/prop-types/prop-types.min.js node_modules/react-dom/umd/react-dom.production.min.js node_modules/redux-thunk/dist/redux-thunk.min.js node_modules/reselect/dist/reselect.js > lib/react-libs.min.js",
"build:copy:libs:react:dev": "cat node_modules/react/umd/react.development.js node_modules/react-redux/dist/react-redux.js node_modules/redux/dist/redux.js node_modules/prop-types/prop-types.js node_modules/react-dom/umd/react-dom.development.js node_modules/redux-thunk/dist/redux-thunk.js node_modules/reselect/dist/reselect.js > lib/react-libs.js",
"build:chrome": "mkdirp package/chrome/ && rsync -a --files-from extension-files.txt . package/chrome/ && npm run --silent build:chrome:patch",
"build:chrome:patch": "npm run --silent build:patch:chrome:manifest -- package/chrome/manifest.json && npm run --silent build:render:html -- package/chrome/",
"build:webextension": "mkdirp package/webextension/ && rsync -a --files-from extension-files.txt . package/webextension/ && npm run --silent build:webextension:patch",
"build:webextension:patch": "npm run --silent build:patch:webextension:manifest -- package/webextension/manifest.json && npm run --silent build:render:html -- package/webextension/",
"build:patch:chrome:manifest": "json -Ie \"this.version_name=this.version_name.replace(/ /, ' Chrome Extension '); delete this.applications;\" -f",
"build:patch:webextension:manifest": "json -Ie \"this.version_name=this.version_name.replace(/ /, ' WebExtension '); delete this.commands['read-clipboard'];\" -f",
"build:render:html": "./render.html.sh",
"rebuild": "npm run --silent clean && npm run --silent build",
"watch": "concurrently --prefix-colors cyan --kill-others --kill-others-on-fail --prefix '{index} {name} {time}' --names 'watch:background,watch:popup,watch:popup:html,watch:options,watch:options:html,watch:demo,watch:demo:html,watch:stay-alive,watch:chrome,watch:webextension' 'npm run --silent watch:background' 'npm run --silent watch:popup' 'npm run --silent watch:popup:html' 'npm run --silent watch:options' 'npm run --silent watch:options:html' 'npm run --silent watch:demo' 'npm run --silent watch:demo:html' 'npm run --silent watch:stay-alive' 'npm run --silent watch:chrome' 'npm run --silent watch:webextension'",
"watch:source": "concurrently --prefix-colors cyan --kill-others --kill-others-on-fail --prefix '{index} {name} {time}' --names 'watch:background,watch:popup,watch:popup:html,watch:options,watch:options:html,watch:demo,watch:demo:html,watch:stay-alive' 'npm run --silent watch:background' 'npm run --silent watch:popup' 'npm run --silent watch:popup:html' 'npm run --silent watch:options' 'npm run --silent watch:options:html' 'npm run --silent watch:demo' 'npm run --silent watch:demo:html' 'npm run --silent watch:stay-alive'",
"watch:tools": "concurrently --prefix-colors cyan --kill-others --kill-others-on-fail --prefix '{index} {name} {time}' --names 'watch:extension-translator' 'npm run --silent watch:extension-translator'",
"watch:background": "rollup --watch --config rollup.config.background.js",
"watch:popup": "rollup --watch --config rollup.config.popup.js",
"watch:popup:html": "rollup --watch --config rollup.config.popup.html.js",
"watch:options": "rollup --watch --config rollup.config.options.js",
"watch:options:html": "rollup --watch --config rollup.config.options.html.js",
"watch:demo": "rollup --watch --config rollup.config.demo.js",
"watch:demo:html": "rollup --watch --config rollup.config.demo.html.js",
"watch:stay-alive": "rollup --watch --config rollup.config.stay-alive.js",
"watch:extension-translator": "rollup --watch --config rollup.config.extension-translator.js",
"watch:chrome": "chokidar --silent 'dist/**/*.js' --command 'npm run --silent build:chrome'",
"watch:webextension": "chokidar --silent 'dist/**/*.js' --command 'npm run --silent build:webextension'",
"run:chrome": "mkdirp package/profiles/chrome/ && google-chrome --no-first-run --enable-logging=stderr --v=0 --enable-extension-activity-logging --error-console --user-data-dir=\"${PWD}/package/profiles/chrome/\" --load-extension=\"${PWD}/package/chrome/\"",
"run:chromium": "mkdirp package/profiles/chromium/ && chromium --no-first-run --enable-logging=stderr --v=0 --enable-extension-activity-logging --error-console --user-data-dir=\"${PWD}/package/profiles/chromium/\" --load-extension=\"${PWD}/package/chrome/\"",
"run:firefox": "web-ext --source-dir=package/webextension/ run --target firefox-desktop --browser-console --start-url 'https://www.wikipedia.org/'",
"run:vivaldi": "web-ext --source-dir=package/chrome/ run --target chromium --chromium-binary vivaldi --browser-console --start-url 'https://www.wikipedia.org/'",
"prepackage": "npm run --silent rebuild && npm run --silent test && npm run --silent lint && npm run --silent messages:count",
"package": "npm run --silent package:chrome && npm run --silent package:webextension && npm run --silent package:source && node --eval \"console.log(require('fs').readdirSync(process.cwd()).filter(n => n.endsWith('.zip')))\"",
"package:chrome": "rimraf web-ext-artifacts/ && web-ext --source-dir=package/chrome/ build && mv -n web-ext-artifacts/talkie*.zip \"talkie-joelpurra.com-$(npm run --silent version:get:head)-chrome.zip\"",
"package:webextension": "rimraf web-ext-artifacts/ && web-ext --source-dir=package/webextension/ build && mv -n web-ext-artifacts/talkie*.zip \"talkie-joelpurra.com-$(npm run --silent version:get:head)-webextension.zip\"",
"package:source": "git archive --format zip -9 --output talkie-joelpurra.com-$(npm run --silent version:get:head)-source.zip HEAD",
"version:get:head": "git describe --always --dirty --long --match 'v*'",
"version:get:release": "git rev-parse --abbrev-ref HEAD | sed -n -e '/release/ s_release/v_v_ p'",
"version:update": "export TALKIE_RELEASE_VERSION=$(npm run --silent version:get:release | sed -e 's/^v//') && git diff-index --quiet HEAD -- && npm run --silent version:update:file -- manifest.json && npm run --silent version:update-name:file -- manifest.json && npm run --silent version:update:file -- package.json && npm run --silent version:update:file -- package-lock.json && git add manifest.json package.json package-lock.json && git commit -m \"v${TALKIE_RELEASE_VERSION}\"",
"version:update:file": "json -Ie \"this.version='${TALKIE_RELEASE_VERSION}'\" -f",
"version:update-name:file": "json -Ie \"this.version_name='v' + this.version + ' (' + new Date().toISOString().substring(0,10) + ')'\" -f",
"test": "npm run --silent lint:fast",
"lint": "npm run --silent lint:full",
"lint:fast": "npm run --silent eslint && npm run --silent lint:copyright",
"lint:slow": "npm run --silent web-ext:lint",
"lint:full": "npm run --silent lint:fast && npm run --silent lint:slow",
"lint:copyright": "grep -L 'This file is part of Talkie' $(find src -type f \\( -iname '*.js' -or -iname '*.jsx' -or -iname '*.html' \\)) | sed 's/^/File is missing copyright notice: /'",
"eslint": "eslint --ext .jsx --ext .js .",
"eslint:fix": "eslint --ext .jsx --ext .js --fix .",
"web-ext:lint": "npm run --silent web-ext:lint:chrome && npm run --silent web-ext:lint:webextension",
"web-ext:lint:chrome": "echo web-ext linting package/chrome/ && web-ext --source-dir=package/chrome/ lint --ignore-files ./resources/style/options.css ./resources/style/demo.css ./resources/style/shared.css",
"web-ext:lint:webextension": "echo web-ext linting package/webextension/ && web-ext --source-dir=package/webextension/ lint --ignore-files ./resources/style/options.css ./resources/style/demo.css ./resources/style/shared.css",
"publish:chromestore": "export WEBSTORE_TOKEN=$(chrome-webstore-manager refresh_token --client_id \"$CHROME_CLIENT_ID\" --client_secret \"$CHROME_CLIENT_SECRET\" --refresh_token \"$CHROME_REFRESH_TOKEN\") && npm run publish:chromestore:update && npm run publish:chromestore:publish",
"publish:chromestore:update": "chrome-webstore-manager update enfbcfmmdpdminapkflljhbfeejjhjjk \"talkie-joelpurra.com-$(npm run --silent version:get:head)-chrome.zip\"",
"publish:chromestore:publish": "chrome-webstore-manager publish enfbcfmmdpdminapkflljhbfeejjhjjk",
"publish:amo": "echo web-ext signing package/webextension/ && web-ext --source-dir=package/webextension/ sign --id '{d83c8fb0-e51b-4d74-9c10-90e9610f16ca}' --channel listed && mv -n web-ext-artifacts/talkie*.xpi \"talkie-joelpurra.com-$(npm run --silent version:get:head)-webextension.xpi\" && echo 'NOTE: Manually upload source code and check upload status on https://addons.mozilla.org/en-US/developers/addons'",
"messages:translate": "npm run --silent messages:download && npm run --silent messages:refresh && npm run --silent messages:count",
"messages:download": "npm run --silent messages:sort && node ./dist/extension-translator.js . en base.json automatic.json && npm run --silent messages:sort",
"messages:refresh": "npm run --silent messages:sort && ./tools/translations/merge.sh && npm run --silent messages:sort && npm run --silent messages:override:refresh",
"messages:sort": "for MESSAGES in $(find ./_locales -name '*.json'); do jq --sort-keys '.' \"$MESSAGES\" > \"${MESSAGES}~\"; mv \"${MESSAGES}~\" \"$MESSAGES\"; done",
"messages:override:refresh": "for MESSAGES in $(find ./_locales \\( -name 'override.json' -or -name 'manual.json' \\)); do jq --slurp --sort-keys '.[0] as $en | .[1] | with_entries(.key as $key | .value |= (.original = $en[$key].message) + if $en[$key].description then { description: $en[$key].description } else {} end + if $en[$key].placeholders then { placeholders: $en[$key].placeholders } else {} end)' \"./_locales/en/messages.json\" \"$MESSAGES\" > \"${MESSAGES}~\"; mv \"${MESSAGES}~\" \"$MESSAGES\"; done",
"messages:count": "for MESSAGES in $(find ./_locales -name 'messages.json'); do jq 'to_entries | .[].key' \"$MESSAGES\"; done | sort | uniq -c",
"languages:refresh": "jq --slurp --sort-keys 'map({ (.extensionLocale.message): { direction: .extensionLocaleBidiDirection.message, sample: .frontend_voicesSampleText.message } }) | add' $(find ./_locales -name 'messages.json') > \"./src/languages/extracted.json~\" && mv \"./src/languages/extracted.json~\" \"./src/languages/extracted.json\" && jq --slurp --sort-keys '{ base: .[0], languages: .[1] } + .[3]' \"./src/languages/base.json\" \"./src/languages/extracted.json\" \"./src/languages/overrides.json\" > \"./src/languages/languages.json~\" && mv \"./src/languages/languages.json~\" \"./src/languages/languages.json\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/joelpurra/talkie.git"
},
"keywords": [
"tts",
"text-to-speech",
"browser",
"extension"
],
"author": {
"name": "Joel Purra",
"email": "code+github@joelpurra.com",
"url": "https://joelpurra.com/"
},
"license": "GPL-3.0",
"bugs": {
"url": "https://joelpurra.com/support/"
},
"homepage": "https://joelpurra.com/projects/talkie/",
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-decorators": "^7.12.12",
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
"@babel/preset-env": "^7.12.11",
"@babel/preset-react": "^7.12.10",
"@google-cloud/translate": "^6.1.0",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.4",
"babel-eslint": "^10.1.0",
"bluebird": "^3.7.2",
"chokidar-cli": "^2.1.0",
"chrome-webstore-manager": "^0.4.2",
"concurrently": "^5.3.0",
"configvention": "^1.1.0",
"ent": "^2.2.0",
"eslint": "^7.17.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-compat": "^3.9.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-no-unsafe-innerhtml": "^1.0.16",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-standard": "^4.1.0",
"json": "^10.0.0",
"jsonfile": "^6.1.0",
"merge-options": "^3.0.4",
"pre-commit": "^1.2.2",
"prop-types": "^15.7.2",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-redux": "^5.1.2",
"redux": "^3.7.2",
"redux-thunk": "^2.3.0",
"renamer": "^2.0.1",
"reselect": "^3.0.1",
"rimraf": "^3.0.2",
"rollup": "^2.36.1",
"rollup-plugin-ejs": "^2.2.0",
"rollup-plugin-filesize": "^9.1.0",
"rollup-plugin-jsx": "^1.0.3",
"rollup-plugin-license": "^2.2.0",
"rollup-plugin-node-globals": "^1.4.0",
"rrssb": "^1.14.0",
"striptags": "^3.1.1",
"styletron-client": "^3.0.4",
"styletron-react": "^3.0.4",
"web-ext": "^5.5.0",
"webextension-polyfill": "^0.6.0"
},
"browserslist": [
"last 5 Chrome versions",
"last 5 Firefox versions"
]
}