mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-12-04 19:57:33 +01:00
[TASK] Move npm tools and config to default places (#445)
- Move npm tools and config to default places - Remove now unnecessary config file parameter from npm scripts - editorconfig and eslint config contradict, adapt editorconfig - switch JS indent linting to TYPO3 coding standard of 2 spaces - adapt composer scripts for new npm location
This commit is contained in:
parent
71a08a1c20
commit
518bae014e
13 changed files with 27 additions and 38 deletions
10
.gitattributes
vendored
10
.gitattributes
vendored
|
@ -1,21 +1,21 @@
|
||||||
/.Build/ export-ignore
|
/.Build/ export-ignore
|
||||||
/.ddev/ export-ignore
|
/.ddev/ export-ignore
|
||||||
/.editorconfig export-ignore
|
/.editorconfig export-ignore
|
||||||
|
/.eslintignore export-ignore
|
||||||
|
/.eslintrc.json export-ignore
|
||||||
/.gitattributes export-ignore
|
/.gitattributes export-ignore
|
||||||
/.github/ export-ignore
|
/.github/ export-ignore
|
||||||
/.gitignore export-ignore
|
/.gitignore export-ignore
|
||||||
/.gitlab/ export-ignore
|
/.gitlab/ export-ignore
|
||||||
/.php-cs-fixer.php export-ignore
|
/.php-cs-fixer.php export-ignore
|
||||||
/.phpstorm.meta.php export-ignore
|
/.phpstorm.meta.php export-ignore
|
||||||
/Resources/Private/.eslintignore export-ignore
|
/.prettierrc.js export-ignore
|
||||||
/Resources/Private/.eslintrc.json export-ignore
|
|
||||||
/Resources/Private/.prettierrc.js export-ignore
|
|
||||||
/Resources/Private/package.json export-ignore
|
|
||||||
/Resources/Private/stylelint.config.js export-ignore
|
|
||||||
/Tests/ export-ignore
|
/Tests/ export-ignore
|
||||||
/codeception.yml export-ignore
|
/codeception.yml export-ignore
|
||||||
|
/package.json export-ignore
|
||||||
/phive.xml export-ignore
|
/phive.xml export-ignore
|
||||||
/phpcs.xml export-ignore
|
/phpcs.xml export-ignore
|
||||||
/phpstan-baseline.neon export-ignore
|
/phpstan-baseline.neon export-ignore
|
||||||
/phpstan.neon export-ignore
|
/phpstan.neon export-ignore
|
||||||
|
/stylelint.config.js export-ignore
|
||||||
/tools/ export-ignore binary
|
/tools/ export-ignore binary
|
||||||
|
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -84,10 +84,8 @@ jobs:
|
||||||
- name: "Checkout"
|
- name: "Checkout"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: "Install modules"
|
- name: "Install modules"
|
||||||
working-directory: ./Resources/Private
|
|
||||||
run: yarn
|
run: yarn
|
||||||
- name: "Run command"
|
- name: "Run command"
|
||||||
working-directory: ./Resources/Private
|
|
||||||
run: "yarn lint:${{ matrix.command }}"
|
run: "yarn lint:${{ matrix.command }}"
|
||||||
xliff-lint:
|
xliff-lint:
|
||||||
name: "Xliff linter"
|
name: "Xliff linter"
|
||||||
|
|
2
.github/workflows/predefined.yml
vendored
2
.github/workflows/predefined.yml
vendored
|
@ -137,10 +137,8 @@ jobs:
|
||||||
- name: "Checkout"
|
- name: "Checkout"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: "Install modules"
|
- name: "Install modules"
|
||||||
working-directory: ./Resources/Private
|
|
||||||
run: yarn
|
run: yarn
|
||||||
- name: "Run command"
|
- name: "Run command"
|
||||||
working-directory: ./Resources/Private
|
|
||||||
run: "yarn lint:${{ matrix.command }}"
|
run: "yarn lint:${{ matrix.command }}"
|
||||||
xliff-lint:
|
xliff-lint:
|
||||||
name: "Xliff linter"
|
name: "Xliff linter"
|
||||||
|
|
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -3,12 +3,12 @@
|
||||||
/.php-cs-fixer.cache
|
/.php-cs-fixer.cache
|
||||||
/.phpunit.result.cache
|
/.phpunit.result.cache
|
||||||
/Documentation-GENERATED-temp/
|
/Documentation-GENERATED-temp/
|
||||||
/Resources/Private/node_modules/
|
|
||||||
/Resources/Private/package-lock.json
|
|
||||||
/Resources/Private/yarn-error.log
|
|
||||||
/Resources/Private/yarn.lock
|
|
||||||
/build
|
/build
|
||||||
/clover.xml
|
/clover.xml
|
||||||
/composer.lock
|
/composer.lock
|
||||||
/nbproject
|
/nbproject
|
||||||
|
/node_modules/
|
||||||
|
/package-lock.json
|
||||||
/var
|
/var
|
||||||
|
/yarn-error.log
|
||||||
|
/yarn.lock
|
||||||
|
|
|
@ -7,6 +7,4 @@
|
||||||
- Resources/Private/node_modules/
|
- Resources/Private/node_modules/
|
||||||
- Resources/Private/.yarn
|
- Resources/Private/.yarn
|
||||||
before_script:
|
before_script:
|
||||||
- npm install -g eslint
|
|
||||||
- cd ./Resources/Private
|
|
||||||
- yarn install --cache-folder .yarn
|
- yarn install --cache-folder .yarn
|
||||||
|
|
|
@ -2,6 +2,5 @@ module.exports = {
|
||||||
semi: true,
|
semi: true,
|
||||||
trailingComma: "all",
|
trailingComma: "all",
|
||||||
singleQuote: true,
|
singleQuote: true,
|
||||||
printWidth: 120,
|
printWidth: 120
|
||||||
tabWidth: 4
|
|
||||||
};
|
};
|
|
@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
|
||||||
- Use Coveralls for the code coverage (#425)
|
- Use Coveralls for the code coverage (#425)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- Move npm tools and config to default locations (#444)
|
||||||
- Use the TYPO3 Code of Conduct (#430)
|
- Use the TYPO3 Code of Conduct (#430)
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
|
@ -10,7 +10,7 @@ TYPO3.tea.makeSortable = function (table) {
|
||||||
while (--i >= 0)
|
while (--i >= 0)
|
||||||
(function (i) {
|
(function (i) {
|
||||||
var dir = 1;
|
var dir = 1;
|
||||||
th[i].addEventListener("click", function () {
|
th[i].addEventListener('click', function () {
|
||||||
TYPO3.tea.sortTable(table, i, (dir = 1 - dir));
|
TYPO3.tea.sortTable(table, i, (dir = 1 - dir));
|
||||||
});
|
});
|
||||||
})(i);
|
})(i);
|
||||||
|
@ -22,18 +22,13 @@ TYPO3.tea.sortTable = function (table, col, reverse) {
|
||||||
i;
|
i;
|
||||||
reverse = -(+reverse || -1);
|
reverse = -(+reverse || -1);
|
||||||
tr = tr.sort(function (a, b) {
|
tr = tr.sort(function (a, b) {
|
||||||
return (
|
return reverse * a.cells[col].textContent.trim().localeCompare(b.cells[col].textContent.trim());
|
||||||
reverse *
|
|
||||||
a.cells[col].textContent
|
|
||||||
.trim()
|
|
||||||
.localeCompare(b.cells[col].textContent.trim())
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
for (i = 0; i < tr.length; ++i) tb.appendChild(tr[i]);
|
for (i = 0; i < tr.length; ++i) tb.appendChild(tr[i]);
|
||||||
};
|
};
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
var t = document.querySelectorAll(".tx-tea table"),
|
var t = document.querySelectorAll('.tx-tea table'),
|
||||||
i = t.length;
|
i = t.length;
|
||||||
while (--i >= 0) {
|
while (--i >= 0) {
|
||||||
TYPO3.tea.makeSortable(t[i]);
|
TYPO3.tea.makeSortable(t[i]);
|
||||||
|
|
|
@ -122,7 +122,7 @@
|
||||||
"ci:dynamic": [
|
"ci:dynamic": [
|
||||||
"@ci:tests"
|
"@ci:tests"
|
||||||
],
|
],
|
||||||
"ci:json:lint": "find . ! -path '*.Build/*' ! -path '*Resources/Private/node_modules/*' -name '*.json' | xargs -r php .Build/vendor/bin/jsonlint -q",
|
"ci:json:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' -name '*.json' | xargs -r php .Build/vendor/bin/jsonlint -q",
|
||||||
"ci:php": [
|
"ci:php": [
|
||||||
"@ci:php:copypaste",
|
"@ci:php:copypaste",
|
||||||
"@ci:php:cs-fixer",
|
"@ci:php:cs-fixer",
|
||||||
|
@ -153,7 +153,7 @@
|
||||||
"ci:tests:functional": "find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo \"Running functional test suite {}\"; .Build/vendor/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml {}';",
|
"ci:tests:functional": "find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo \"Running functional test suite {}\"; .Build/vendor/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml {}';",
|
||||||
"ci:tests:unit": ".Build/vendor/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml Tests/Unit",
|
"ci:tests:unit": ".Build/vendor/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml Tests/Unit",
|
||||||
"ci:ts:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript",
|
"ci:ts:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript",
|
||||||
"ci:yaml:lint": "find . ! -path '*.Build/*' ! -path '*Resources/Private/node_modules/*' -name '*.yml' | xargs -r php ./.Build/vendor/bin/yaml-lint",
|
"ci:yaml:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' -name '*.yml' | xargs -r php ./.Build/vendor/bin/yaml-lint",
|
||||||
"coverage:create-directories": "mkdir -p build/logs .Build/coverage",
|
"coverage:create-directories": "mkdir -p build/logs .Build/coverage",
|
||||||
"docs:generate": [
|
"docs:generate": [
|
||||||
"docker run --rm t3docs/render-documentation show-shell-commands > tempfile.sh; echo 'dockrun_t3rd makehtml' >> tempfile.sh; bash tempfile.sh; rm tempfile.sh"
|
"docker run --rm t3docs/render-documentation show-shell-commands > tempfile.sh; echo 'dockrun_t3rd makehtml' >> tempfile.sh; bash tempfile.sh; rm tempfile.sh"
|
||||||
|
@ -180,11 +180,11 @@
|
||||||
"rm .editorconfig",
|
"rm .editorconfig",
|
||||||
"rm .gitattributes",
|
"rm .gitattributes",
|
||||||
"rm .php-cs-fixer.php",
|
"rm .php-cs-fixer.php",
|
||||||
"rm Resources/Private/.eslintignore",
|
"rm .eslintignore",
|
||||||
"rm Resources/Private/.eslintrc.json",
|
"rm .eslintrc.json",
|
||||||
"rm Resources/Private/.prettierrc.js",
|
"rm .prettierrc.js",
|
||||||
"rm Resources/Private/package.json",
|
"rm package.json",
|
||||||
"rm Resources/Private/stylelint.config.js",
|
"rm stylelint.config.js",
|
||||||
"rm codeception.yml",
|
"rm codeception.yml",
|
||||||
"rm phive.xml",
|
"rm phive.xml",
|
||||||
"rm phpstan-baseline.neon",
|
"rm phpstan-baseline.neon",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "tea",
|
"name": "tea",
|
||||||
"description": "",
|
"description": "npm helper tools used for the extension",
|
||||||
"repository": {
|
"repository": {
|
||||||
"url": "https://github.com/TYPO3-Documentation/tea.git"
|
"url": "https://github.com/TYPO3-Documentation/tea.git"
|
||||||
},
|
},
|
||||||
|
@ -9,10 +9,10 @@
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint:js": "eslint --config .eslintrc.json '../Public/**/*.js'",
|
"lint:js": "eslint 'Resources/Public/**/*.js'",
|
||||||
"lint:js:fix": "eslint --config .eslintrc.json '../Public/**/*.js' --quiet --fix",
|
"lint:js:fix": "eslint 'Resources/Public/**/*.js' --quiet --fix",
|
||||||
"lint:style": "stylelint --config stylelint.config.js ../Public/**/*.css",
|
"lint:style": "stylelint Resources/Public/**/*.css",
|
||||||
"lint:style:fix": "stylelint --config stylelint.config.js ../Public/**/*.css --fix"
|
"lint:style:fix": "stylelint Resources/Public/**/*.css --fix"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^6.8.0",
|
"eslint": "^6.8.0",
|
Loading…
Reference in a new issue