activity-stream/yamscripts.yml

67 строки
2.4 KiB
YAML
Исходник Обычный вид История

2016-02-01 21:20:30 +03:00
# This file compiles to package.json scripts.
2016-02-02 23:06:31 +03:00
# When you add or modify anything, you *MUST* run:
# npm run yamscripts
# to compile your changes.
2016-02-01 21:20:30 +03:00
scripts:
2016-02-02 23:06:31 +03:00
# once: Build/serve the assets and run the add-on
2016-02-24 02:11:33 +03:00
once: =>bundle && =>firefox
clean: rimraf data/content/* && mkdirp data/content
changelog: conventional-changelog -i CHANGELOG.md -s
copyTestImages: cpx "node_modules/tippy-top-sites/images/**/*" data/content/favicons/images
copyTopSitesJson: cpx "node_modules/tippy-top-sites/top_sites.json" data/content/favicons
2016-02-02 23:06:31 +03:00
# bundle: Bundle assets for production
bundle:
pre: =>clean && =>copyTestImages && =>copyTopSitesJson
static: cpx "content-src/static/**/*" data/content
webpack: NODE_ENV=production webpack
webpackAddon: webpack --config webpack.addon.config.js
css: node-sass content-src/main.scss -o data/content
html: node ./bin/generate-html.js > data/content/activity-streams.html
post: du -hs ./data/content/*
2016-02-02 23:06:31 +03:00
# start: Start watching/compiling assets,
start:
_parallel: true
pre: =>clean && =>copyTestImages && =>copyTopSitesJson
static: =>bundle:static -- -w
2016-02-01 21:20:30 +03:00
webpack: webpack -w
webpackAddon: =>bundle:webpackAddon -- -w
2016-02-02 23:06:31 +03:00
css: =>bundle:css && =>bundle:css -- -w
html: =>bundle:html -- --baseUrl http://localhost:1963/ --csp off
2016-02-01 21:20:30 +03:00
server: live-server data/content --port=1963 --no-browser
2016-02-02 23:06:31 +03:00
# firefox: Launch addon with jpm run
firefox: =>bundle:webpackAddon && jpm run -b nightly --prefs ./dev-prefs.json
2016-02-05 01:09:01 +03:00
# test: Run all tests once
test:
pre: =>bundle && =>copyTestImages && =>copyTopSitesJson
2016-02-05 01:09:01 +03:00
# test:lint: Run eslint
lint: eslint --ext=.js,.jsx,.json . && sass-lint -v -q
checkbinary: echo "JPM_FIREFOX_BINARY: ${JPM_FIREFOX_BINARY}"
2016-02-05 01:09:01 +03:00
# test:jpm: Run jpm tests
jpm: jpm test -b ${JPM_FIREFOX_BINARY:-"nightly"} --prefs ./test-prefs.json -v
2016-02-05 01:09:01 +03:00
# test:karma: Run content tests only
karma: NODE_ENV=test karma start
post: cat logs/reports/coverage/text-summary.txt
2016-02-01 21:20:30 +03:00
2016-02-05 01:09:01 +03:00
# tdd: Run content tests continuously
tdd: =>test:karma -- --no-single-run --browsers Chrome
2016-02-01 21:20:30 +03:00
# package: Build add-on
package: =>bundle && jpm xpi && mv @activity-streams-$npm_package_version.xpi dist/activity-streams-$npm_package_version.xpi
2016-02-01 21:20:30 +03:00
2016-02-05 01:09:01 +03:00
# This is for ci
travis: =>test
2016-02-01 21:20:30 +03:00
2016-02-05 01:09:01 +03:00
# This is just to make sure we don't make commits with failing tests
# or uncompiled yamscripts.yml. Run automatically with husky.
prepush: =>test:lint && =>yamscripts