2024-05-03 18:53:07 +03:00
|
|
|
# SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
2019-05-14 17:12:05 +03:00
|
|
|
app_name=$(notdir $(CURDIR))
|
|
|
|
|
2023-10-20 09:08:26 +03:00
|
|
|
.NOTPARALLEL:
|
|
|
|
|
2022-01-11 13:07:31 +03:00
|
|
|
all: dev-setup lint build-js-production
|
2019-05-14 17:12:05 +03:00
|
|
|
|
|
|
|
# Dev env management
|
|
|
|
dev-setup: clean clean-dev npm-init
|
|
|
|
|
|
|
|
npm-init:
|
2019-10-25 11:04:29 +03:00
|
|
|
npm ci
|
2019-05-14 17:12:05 +03:00
|
|
|
|
|
|
|
npm-update:
|
|
|
|
npm update
|
|
|
|
|
|
|
|
# Building
|
|
|
|
build-js:
|
|
|
|
npm run dev
|
|
|
|
|
|
|
|
build-js-production:
|
|
|
|
npm run build
|
|
|
|
|
|
|
|
watch-js:
|
|
|
|
npm run watch
|
|
|
|
|
|
|
|
# Testing
|
2020-01-02 00:12:11 +03:00
|
|
|
test: test-js test-cypress
|
|
|
|
|
|
|
|
test-cypress:
|
|
|
|
cd cypress && ./runLocal.sh run
|
|
|
|
|
|
|
|
test-cypress-watch:
|
|
|
|
cd cypress && ./runLocal.sh open
|
|
|
|
|
|
|
|
test-js:
|
2019-05-14 17:12:05 +03:00
|
|
|
npm run test
|
|
|
|
|
2020-01-02 00:12:11 +03:00
|
|
|
test-js-watch:
|
2019-05-14 17:12:05 +03:00
|
|
|
npm run test:watch
|
|
|
|
|
2020-01-02 00:12:11 +03:00
|
|
|
test-js-coverage:
|
2019-05-14 17:12:05 +03:00
|
|
|
npm run test:coverage
|
|
|
|
|
2023-01-13 23:58:29 +03:00
|
|
|
dump-autoloader:
|
|
|
|
cd composer && composer dump
|
|
|
|
|
2019-05-14 17:12:05 +03:00
|
|
|
# Linting
|
|
|
|
lint:
|
|
|
|
npm run lint
|
|
|
|
|
|
|
|
lint-fix:
|
|
|
|
npm run lint:fix
|
|
|
|
|
|
|
|
# Style linting
|
|
|
|
stylelint:
|
|
|
|
npm run stylelint
|
|
|
|
|
|
|
|
stylelint-fix:
|
|
|
|
npm run stylelint:fix
|
|
|
|
|
|
|
|
# Cleaning
|
|
|
|
clean:
|
2019-07-18 16:23:12 +03:00
|
|
|
rm -rf js/*
|
2019-05-14 17:12:05 +03:00
|
|
|
|
|
|
|
clean-dev:
|
|
|
|
rm -rf node_modules
|
|
|
|
|
2019-10-16 11:35:23 +03:00
|
|
|
clean-git:
|
|
|
|
rm -r js/
|
|
|
|
git checkout -- js/
|