61 строка
1.8 KiB
YAML
61 строка
1.8 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:
|
|
|
|
# once: Build/serve the assets and run the add-on
|
|
once: =>bundle && =>firefox
|
|
|
|
clean: rm -rf data/content/*
|
|
|
|
changelog: conventional-changelog -i CHANGELOG.md -s
|
|
|
|
# bundle: Bundle assets for production
|
|
bundle:
|
|
pre: =>clean
|
|
static: cpx "content-src/static/**/*" data/content
|
|
webpack: webpack
|
|
css: node-sass content-src/main.scss -o data/content
|
|
html: node ./bin/generate-html.js > data/content/activity-streams.html
|
|
|
|
# start: Start watching/compiling assets,
|
|
start:
|
|
_parallel: true
|
|
pre: =>clean
|
|
static: =>bundle:static -- -w
|
|
webpack: webpack -w
|
|
css: =>bundle:css && =>bundle:css -- -w
|
|
html: =>bundle:html -- --baseUrl http://localhost:1963/
|
|
server: live-server data/content --port=1963 --no-browser
|
|
|
|
# firefox: Launch addon with jpm run
|
|
firefox: jpm run -b beta
|
|
|
|
# test: Run all tests once
|
|
test:
|
|
# test:lint: Run eslint
|
|
lint: eslint . && jscs . && sass-lint -v -q
|
|
# test:jpm: Run jpm tests
|
|
jpm: jpm test -b beta
|
|
# test:karma: Run content tests only
|
|
karma: karma start --browsers FirefoxNightly
|
|
|
|
# tdd: Run content tests continuously
|
|
tdd: karma start --no-single-run
|
|
|
|
# package: Build add-on
|
|
package: =>bundle && jpm xpi && mv @activity-streams-$npm_package_version.xpi dist/activity-streams-$npm_package_version.xpi
|
|
|
|
# This is for ci
|
|
travis:
|
|
eslint: =>test:lint
|
|
jpm: jpm test -b $JPM_FIREFOX_BINARY -v
|
|
karma: karma start --reporters mocha,coverage,coveralls
|
|
|
|
# This is just to make sure we don't make commits with failing tests
|
|
# or uncompiled yamscripts.yml. Run automatically with husky.
|
|
precommit: =>test:lint && =>yamscripts
|
|
# prepush: =>test
|