81 строка
3.5 KiB
YAML
81 строка
3.5 KiB
YAML
# This file compiles to package.json scripts.
|
|
# When you add or modify anything, you *MUST* run:
|
|
# npm run yamscripts
|
|
# to compile your changes.
|
|
|
|
scripts:
|
|
# Run the activity-stream mochitests
|
|
mochitest: (cd $npm_package_config_mc_dir && ./mach mochitest browser/extensions/activity-stream/test/functional/mochitest )
|
|
|
|
# Run the activity-stream mochitests with the browser toolbox debugger.
|
|
# Often handy in combination with adding a "debugger" statement in your
|
|
# mochitest somewhere.
|
|
mochitest-debug: (cd $npm_package_config_mc_dir && ./mach mochitest --jsdebugger browser/extensions/activity-stream/test/functional/mochitest )
|
|
|
|
cleanmc: rimraf $npm_package_config_mc_dir/browser/extensions/activity-stream
|
|
|
|
# buildmc: Export the bootstraped add-on to mozilla central
|
|
buildmc:
|
|
pre: =>cleanmc
|
|
locales: pontoon-to-json --src locales --dest system-addon/data
|
|
webpack: webpack --config webpack.system-addon.config.js --display-optimization-bailout
|
|
css: node-sass --source-map true --source-map-contents system-addon/content-src/styles -o system-addon/css
|
|
html: rimraf system-addon/prerendered && webpack --config webpack.prerender.config.js && node ./bin/render-activity-stream-html.js
|
|
# Copy over all of the system-addon directory
|
|
copy: cpx "system-addon/**/{,.}*" $npm_package_config_mc_dir/browser/extensions/activity-stream
|
|
version: node ./bin/update-version.js $npm_package_config_mc_dir/browser/extensions/activity-stream
|
|
copyPingCentre: cpx "system-addon/ping-centre/PingCentre.jsm" $npm_package_config_mc_dir/browser/modules
|
|
rmextra: rimraf "$npm_package_config_mc_dir/browser/extensions/activity-stream/{{,test/unit/}{content-src,ping-centre},data/locales.json}"
|
|
|
|
# packagemc: Build stand-alone system add-on xpi
|
|
packagemc:
|
|
pre: =>cleanmc
|
|
build: =>buildmc:webpack && =>buildmc:css && =>buildmc:locales
|
|
copy: cpx "system-addon/**" dist/system-addon
|
|
version: node ./bin/update-version.js dist/system-addon
|
|
process: node ./bin/process-system-addon-for-package.js dist/system-addon
|
|
xpi: (cd dist/system-addon && zip -r ../activity-stream-system-addon.xpi * )
|
|
|
|
# startmc: Start developing the bootstrapped add-on
|
|
startmc:
|
|
_parallel: true
|
|
pre: =>prebuildmc
|
|
copy: =>buildmc:copy -- -w
|
|
copyPingCentre: =>buildmc:copyPingCentre -- -w
|
|
webpack: =>buildmc:webpack -- -w
|
|
css: =>buildmc:css && =>buildmc:css -- -w
|
|
|
|
# importmc: Import changes from mc to github repo
|
|
importmc: cpx "$npm_package_config_mc_dir/browser/extensions/activity-stream/**/*" system-addon/
|
|
|
|
testmc:
|
|
lint: =>lint
|
|
build: =>buildmc:webpack && =>buildmc:locales
|
|
unit: karma start karma.mc.config.js || (cat logs/coverage/system-addon/text.txt && exit 2)
|
|
post: cat logs/coverage/system-addon/text-summary.txt
|
|
|
|
tddmc: karma start karma.mc.config.js --tdd
|
|
|
|
debugcoverage: open logs/coverage/system-addon/report-html/index.html
|
|
|
|
# lint: Run eslint and sass-lint
|
|
lint:
|
|
eslint: esw --ext=.js,.jsm,.json,.jsx .
|
|
sasslint: sass-lint -v -q
|
|
|
|
# strings-export: Copy newest en-US strings to strings repository
|
|
strings-export: node ./bin/strings-export.js ../activity-stream-l10n
|
|
|
|
# strings-import: Update strings repository and replace local strings
|
|
strings-import: node ./bin/strings-import.js ../activity-stream-l10n
|
|
|
|
# test: Run all tests once
|
|
test: =>testmc
|
|
|
|
# tdd: Run content tests continuously
|
|
tdd: =>tddmc
|
|
|
|
# This is just to make sure we don't make commits with failing tests
|
|
# or uncompiled yamscripts.yml. Run automatically with husky.
|
|
prepush: =>lint && =>yamscripts
|