What was previously done using gulp
tasks can now be easily done using the script translate-adapter
from the package @iobroker/adapter-dev.
Simply follow these steps to switch from gulp
to @iobroker/adapter-dev
:
- Remove the
gulpfile.js
in the root directory - Remove/modify the file
lib/tools.js
orsrc/lib/tools.ts
- remove it if you don't import/require it anywhere in your adapter,
- otherwise remove the functions
translateText()
,translateYandex()
andtranslateGoogle()
as well as theaxios
import/require
- Remove the following dev-dependencies from your
package.json
:gulp
@types/gulp
(if available)axios
(except if you are using it in other development tasks or in production)
- Add the dev-dependency
@iobroker/adapter-dev
- Add the following to the
"scripts"
section of yourpackage.json
:
"translate": "translate-adapter",
Now you can use the translate
script instead of gulp
:
Old (gulp) | New (adapter-dev) |
---|---|
gulp translate |
npm run translate translate |
gulp adminWords2languages |
npm run translate to-json |
gulp adminLanguages2words |
npm run translate to-words |
gulp translateAndUpdateWordsJS |
npm run translate all |
For further information, check the official documentation.