yamscripts.yml (2423B)
1 # This file compiles to package.json scripts. 2 # When you add or modify anything, you *MUST* run: 3 # npm run yamscripts 4 # to compile your changes. 5 6 scripts: 7 # bundle: Build all assets for activity stream 8 bundle: 9 webpack: webpack-cli --config webpack.system-addon.config.js 10 css: sass content-src/styles:css --no-source-map 11 html: rimraf prerendered && node ./bin/render-activity-stream-html.js 12 13 # buildmc: Used to do stuff when this code was in GitHub, now just an 14 # alias in case it's baked into anyone's brain. 15 buildmc: 16 bundle: => bundle 17 18 # watchmc: Automatically rebuild when files are changed. NOTE: Includes sourcemaps, do not use for profiling/perf testing. 19 watchmc: 20 _parallel: true 21 webpack: =>bundle:webpack -- --env development -w 22 css: =>bundle:css -- --source-map --embed-sources --embed-source-map --load-path=content-src -w 23 24 testmc: 25 lint: =>lint 26 build: =>bundle:webpack 27 unit: karma start karma.mc.config.js 28 29 tddmc: karma start karma.mc.config.js --tdd 30 31 debugcoverage: open logs/coverage/lcov-report/index.html 32 33 # lint: Run various linters with mach or local dev dependencies 34 lint: 35 codespell: (cd $npm_package_config_mc_root && ./mach lint -l codespell $npm_package_config_newtab_path) 36 eslint: (cd $npm_package_config_mc_root && ./mach lint -l eslint $npm_package_config_newtab_path) 37 l10n: (cd $npm_package_config_mc_root && ./mach lint -l l10n --warnings soft browser/locales/en-US/browser/newtab) 38 license: (cd $npm_package_config_mc_root && ./mach lint -l license $npm_package_config_newtab_path) 39 stylelint: (cd $npm_package_config_mc_root && ./mach lint -l stylelint $npm_package_config_newtab_path) 40 41 # test: Run all tests once 42 test: =>testmc 43 44 # tdd: Run content tests continuously 45 tdd: =>tddmc 46 47 # Utility scripts for use when vendoring in Node packages 48 vendor: node ./bin/vendor.js 49 50 # script for the `source-test-node-newtab-unit-tests` task on taskcluster. 51 # this is what appears as `newtab` in treeherder results after pushing to try. 52 # so this npm script allows us to run the same tests locally that patches will 53 # be run against in CI. 54 try: node ./bin/try-runner.js 55 56 fix: 57 # Note that since we're currently running eslint-plugin-prettier, 58 # running fix:eslint will also reformat changed JS files using prettier. 59 eslint: =>lint:eslint -- --fix 60 stylelint: =>lint:stylelint -- --fix