Bug 1596441 - Added a script to watch for changes when running/working directly in mozilla-central. r=k88hudson

FROM WITHIN /browser/components/newtab:
`npm run watchmc` will now run bundle:webpack and bundle:css in order to watch for changes when working directly on mozilla-central. Works the same as `startmc`, without the need to copy/export changes first.

to run directly from mozilla-central: `npm run watchmc --prefix browser/components/newtab`.

Differential Revision: https://phabricator.services.mozilla.com/D53066

--HG--
extra : moz-landing-system : lando
This commit is contained in:
emcminn 2019-11-21 20:44:50 +00:00
Родитель b7028022dc
Коммит cea5b52b59
2 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -123,8 +123,10 @@
"startmc:copy": "cpx \"{{,.}*,!(node_modules)/**/{,.}*}\" $npm_package_config_mc_dir/browser/components/newtab/ -w",
"startmc:copyFluent": "npm run buildmc:fluentExport -- -w",
"startmc:copyPingCentre": "npm run buildmc:copyPingCentre -- -w",
"startmc:webpack": "npm run bundle:webpack -- --env.development -w",
"startmc:css": "npm run bundle:css && npm run bundle:css -- --source-map-embed --source-map-contents -w",
"startmc:watch": "npm run watchmc",
"watchmc": "npm-run-all --parallel watchmc:*",
"watchmc:webpack": "npm run bundle:webpack -- --env.development -w",
"watchmc:css": "npm run bundle:css && npm run bundle:css -- --source-map-embed --source-map-contents -w",
"importmc": "npm-run-all importmc:*",
"importmc:src": "rsync --exclude-from .mcignore -a $npm_package_config_mc_dir/browser/components/newtab/ .",
"importmc:ftl": "rsync -a $npm_package_config_mc_dir/browser/locales/$npm_package_config_default_locale/browser/newtab/ $npm_package_config_locales_dir",

Просмотреть файл

@ -46,6 +46,11 @@ scripts:
copy: cpx "{{,.}*,!(node_modules)/**/{,.}*}" $npm_package_config_mc_dir/browser/components/newtab/ -w
copyFluent: =>buildmc:fluentExport -- -w
copyPingCentre: =>buildmc:copyPingCentre -- -w
watch: =>watchmc
# watchmc: same as startmc, without the copy behavior which is not needed when working directly from mozilla-central
watchmc:
_parallel: true
webpack: =>bundle:webpack -- --env.development -w
css: =>bundle:css && =>bundle:css -- --source-map-embed --source-map-contents -w