Skip to content

Commit 3d65b88

Browse files
authored
Move tools/scripts/** to scripts (#1669)
1 parent 427d375 commit 3d65b88

20 files changed

+108
-55
lines changed

.husky/pre-commit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
# but not on CI:
33
# https://typicode.github.io/husky/#/?id=with-env-variables
44
if [ "$CI" != "true" ]; then
5-
. ./tools/scripts/check-node-version
5+
. ./scripts/check-node-version
66
fi
77

88
# keep docs up to date
9-
node tools/scripts/maintain-readme/index.mjs
9+
node scripts/maintain-readme/index.mjs
1010
git add README.md
1111

1212
# keep makefile up to date
13-
node tools/scripts/maintain-makefile/index.mjs
13+
node scripts/maintain-makefile/index.mjs
1414
git add Makefile
1515

1616
corepack pnpm lint-staged

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export SHELL := /usr/bin/env bash
77
# lists available `make` targets
88
.PHONY: ls
99
ls:
10-
@node tools/scripts/list-make-targets.mjs
10+
@node scripts/list-make-targets.mjs
1111

1212

1313
###################################### DEV #####################################
@@ -56,7 +56,7 @@ lint: env
5656
$(call log,"Linting projects")
5757
@corepack pnpm -r lint
5858
@corepack pnpm lint:packages
59-
@node ./tools/scripts/check-packages-for-tslib.mjs
59+
@node ./scripts/check-packages-for-tslib.mjs
6060

6161
# check repo for formatting errors
6262
.PHONY: formatting\:check
@@ -135,7 +135,7 @@ env: check-node-version install
135135
.PHONY: check-node-version # PRIVATE
136136
check-node-version:
137137
$(call log,"Checking Node")
138-
@./tools/scripts/check-node-version
138+
@./scripts/check-node-version
139139

140140
# Install dependencies. If deps are up to date this is almost instant, so we can
141141
# run before every other target with very little DX cost.
@@ -149,7 +149,7 @@ install: check-node-version
149149

150150
# This is a set of all possible project-specific tasks.
151151
#
152-
# IT IS AUTOGENERATED BY tools/scripts/maintain-makefile/index.mjs
152+
# IT IS AUTOGENERATED BY scripts/maintain-makefile/index.mjs
153153
#
154154
# It enables running the relevant npm-scripts wrapped in the
155155
# standardised Makefile prerequisites.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
The following packages live in `libs/@guardian/*` and are published to NPM:
1313

1414
<!-- START PUBLISHED_PACKAGES -->
15-
<!-- THIS CONTENT IS AUTOGENERATED BY tools/scripts/maintain-readme/index.mjs -->
15+
<!-- THIS CONTENT IS AUTOGENERATED BY scripts/maintain-readme/index.mjs -->
1616

1717
- [@guardian/ab-core](libs/@guardian/ab-core)
1818
- [@guardian/ab-react](libs/@guardian/ab-react)
@@ -48,7 +48,7 @@ _You'll be prompted to install any missing requirements if they are needed..._
4848
Tasks that apply to all projects are defined in the [`Makefile`](./Makefile):
4949

5050
<!-- START TASKS -->
51-
<!-- THIS CONTENT IS AUTOGENERATED BY tools/scripts/maintain-readme/index.mjs -->
51+
<!-- THIS CONTENT IS AUTOGENERATED BY scripts/maintain-readme/index.mjs -->
5252

5353
- `make build` _builds all projects_
5454
- `make build-storybook` _builds all storybooks_

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"private": "true",
55
"type": "module",
66
"scripts": {
7-
"build": "./tools/scripts/use-make-instead",
7+
"build": "./scripts/use-make-instead",
88
"lint:packages": "syncpack lint",
99
"prepare": "husky",
10-
"test": "./tools/scripts/use-make-instead"
10+
"test": "./scripts/use-make-instead"
1111
},
1212
"devDependencies": {
1313
"@changesets/cli": "2.27.1",
@@ -19,21 +19,18 @@
1919
"@types/node": "20.14.10",
2020
"@typescript-eslint/eslint-plugin": "8.1.0",
2121
"@typescript-eslint/parser": "8.1.0",
22-
"colorette": "2.0.20",
2322
"eslint": "8.57.0",
2423
"eslint-plugin-eslint-comments": "3.2.0",
2524
"eslint-plugin-import": "2.29.1",
2625
"eslint-plugin-react": "7.35.0",
2726
"eslint-plugin-react-hooks": "4.6.2",
2827
"eslint-plugin-storybook": "0.8.0",
29-
"fast-glob": "3.3.2",
3028
"husky": "9.1.4",
3129
"lint-staged": "15.2.0",
3230
"prettier": "3.3.3",
3331
"sort-package-json": "2.10.0",
3432
"syncpack": "12.4.0",
3533
"typescript": "5.5.2",
36-
"update-section": "0.3.3",
3734
"wireit": "0.14.4"
3835
},
3936
"packageManager": "[email protected]",

pnpm-lock.yaml

Lines changed: 14 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ packages:
33
- 'libs/**'
44
- '!**/libs/@guardian/source/*/**'
55
- '!**/libs/@guardian/source-development-kitchen/*/**'
6-
- 'tools/**'
6+
- 'scripts/**'
77
- 'configs/**'
88
- 'coverage'

scripts/@types/update-section.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
declare module 'update-section' {
2+
function updateSection(
3+
content: string,
4+
section: string,
5+
matchesStart: (line: string) => boolean,
6+
matchesEnd: (line: string) => boolean,
7+
top?: boolean,
8+
): string;
9+
10+
export default updateSection;
11+
}
File renamed without changes.

0 commit comments

Comments
 (0)