This repository has been archived by the owner on Feb 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 113
/
yamscripts.yml
87 lines (70 loc) · 3.44 KB
/
yamscripts.yml
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
# 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/components/newtab/test/browser --headless)
# 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/components/newtab/test/browser)
# bundle: Build all assets for activity stream
bundle:
webpack: webpack --config webpack.system-addon.config.js
css: node-sass content-src/styles -o css
html: rimraf prerendered && node ./bin/render-activity-stream-html.js
# buildmc: Export code to mozilla central
buildmc:
pre: rimraf $npm_package_config_mc_dir/browser/components/newtab/
bundle: => bundle
copy: rsync --exclude-from .mcignore -a . $npm_package_config_mc_dir/browser/components/newtab/
copyPingCentre: cpx "ping-centre/PingCentre.jsm" $npm_package_config_mc_dir/browser/modules
# builduplift: Build and export to mozilla central for uplifts without exporting strings to browser/locales
builduplift:
pre: =>prebuildmc
bundle: => bundle
copy: =>buildmc:copy
# buildlibrary: Export about:library code to mozilla-central - intentionally not included in buildmc for now
buildlibrary:
webpack: webpack --config webpack.aboutlibrary.config.js
css: node-sass --source-map true --source-map-contents content-src/aboutlibrary -o aboutlibrary/content
copy: cpx "aboutlibrary/**/{,.}*" $npm_package_config_mc_dir/browser/components/library
# startmc: Automatically rebuild/export to mozilla central when files are changed. NOTE: Includes sourcemaps, do not use for profiling/perf testing.
startmc:
_parallel: true
pre: =>buildmc
# This copies only the system addon sub-folder; changing anything outside of it will need a full rebuild.
copy: cpx "{{,.}*,!(node_modules)/**/{,.}*}" $npm_package_config_mc_dir/browser/components/newtab/ -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
# importmc: Import changes from mc to github repo
importmc:
src: rsync --exclude-from .mcignore -a $npm_package_config_mc_dir/browser/components/newtab/ .
testmc:
lint: =>lint
build: =>bundle:webpack
unit: karma start karma.mc.config.js
tddmc: karma start karma.mc.config.js --tdd
debugcoverage: open logs/coverage/index.html
# lint: Run eslint and sass-lint
lint:
eslint-check: eslint --cache --print-config AboutNewTabService.jsm | eslint-config-prettier-check
eslint: eslint --cache --ext=.js,.jsm,.jsx .
sasslint: sass-lint -v -q
# test: Run all tests once
test: =>testmc
# tdd: Run content tests continuously
tdd: =>tddmc
# Utility scripts for use when vendoring in Node packages
vendor:
react: node ./bin/vendor-react.js
fix:
# Note that since we're currently running eslint-plugin-prettier,
# running fix:eslint will also reformat changed JS files using prettier.
eslint: =>lint:eslint -- --fix