Skip to content

Commit bb2de0a

Browse files
committed
Build: Migrate from jQuery Release & Grunt to release-it & npm scripts
1 parent a5bc26b commit bb2de0a

26 files changed

+4344
-1840
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ charset = utf-8
1010
trim_trailing_whitespace = true
1111
insert_final_newline = true
1212

13-
[*.yml]
13+
[*.{json,yml}]
1414
indent_style = space
1515
indent_size = 2

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
* text=auto
33

44
# JS files must always use LF for tools to work
5+
# JS files may have mjs or cjs extensions now as well
56
*.js eol=lf
7+
*.cjs eol=lf
8+
*.mjs eol=lf

.github/workflows/node.js.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,8 @@ jobs:
3131
- name: Install npm dependencies
3232
run: npm ci
3333

34-
- name: Build
35-
run: npm run build
36-
3734
- name: Test
38-
run: |
39-
npm run test:browser
35+
run: npm run test:browser
4036

4137
edge:
4238
runs-on: windows-latest
@@ -55,12 +51,8 @@ jobs:
5551
- name: Install dependencies
5652
run: npm ci
5753

58-
- name: Build
59-
run: npm run build
60-
6154
- name: Test
62-
run: |
63-
npm run test:edge
55+
run: npm run test:edge
6456

6557
safari:
6658
runs-on: macos-latest
@@ -79,9 +71,5 @@ jobs:
7971
- name: Install dependencies
8072
run: npm ci
8173

82-
- name: Build
83-
run: npm run build
84-
8574
- name: Test
86-
run: |
87-
npm run test:safari
75+
run: npm run test:safari

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.sizecache.json
1+
.eslintcache
22
/dist
33
/external
44
/node_modules

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx commitplease .git/COMMIT_EDITMSG

.release-it.cjs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
"use strict";
2+
3+
module.exports = {
4+
preReleaseBase: 1,
5+
hooks: {
6+
"before:init": "./build/release/pre-release.sh",
7+
"after:version:bump":
8+
"sed -i '' -e 's|main/AUTHORS.txt|${version}/AUTHORS.txt|' package.json",
9+
"after:bump": "cross-env VERSION=${version} npm run build",
10+
"before:git:release": "git add -f dist/",
11+
"after:release": "./build/release/post-release.sh ${version}"
12+
},
13+
git: {
14+
commitMessage: "Release: ${version}",
15+
getLatestTagFromAllRefs: true,
16+
pushRepo: "git@github.com:jquery/jquery-color.git",
17+
requireBranch: "main",
18+
requireCleanWorkingDir: true,
19+
commit: true,
20+
tag: true,
21+
tagName: "${version}",
22+
tagAnnotation: "Release: ${version}"
23+
},
24+
github: {
25+
pushRepo: "git@github.com:jquery/jquery-color.git",
26+
release: true,
27+
tokenRef: "JQUERY_GITHUB_TOKEN"
28+
},
29+
npm: {
30+
publish: true
31+
}
32+
};

AUTHORS.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
Authors ordered by first contribution
1+
Authors ordered by first contribution.
22

33
John Resig <jeresig@gmail.com>
44
Scott González <scott.gonzalez@gmail.com>
55
Corey Frang <gnarf@gnarf.net>
66
Eddie Monge <eddie@eddiemonge.com>
77
Timo Tijhof <krinklemail@gmail.com>
8+
Richard D. Worth <rdworth@gmail.com>
89
Jörn Zaefferer <joern.zaefferer@gmail.com>
910
Mike Sherov <mike.sherov@gmail.com>
1011
Brendan Byrd <github@resonatorsoft.org>
@@ -22,3 +23,4 @@ Leonardo Balter <leonardo.balter@gmail.com>
2223
Rob Garrison <wowmotty@gmail.com>
2324
Ryan Jacobson <rejacobson@gmail.com>
2425
Timmy Willison <timmywil@users.noreply.github.com>
26+
Sedat Kapanoğlu <sedat@kapanoglu.com>

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ Welcome! Thanks for your interest in contributing to the jQuery Color plugin. Yo
22

33
You may also want to take a look at our [commit & pull request guide](https://contribute.jquery.org/commits-and-pull-requests/) and [style guides](https://contribute.jquery.org/style-guide/) for instructions on how to maintain your fork and submit your code. Before we can merge any pull request, we'll also need you to sign our [contributor license agreement](https://contribute.jquery.org/cla).
44

5-
You can find us on [IRC](https://irc.jquery.org), specifically in #jquery-dev should you have any questions. If you've never contributed to open source before, we've put together [a short guide with tips, tricks, and ideas on getting started](https://contribute.jquery.org/open-source/).
5+
You can find us in the [#jquery/dev](https://matrix.to/#/#jquery_dev:gitter.im) Matrix channel on gitter.im. If you've never contributed to open source before, we've put together [a short guide with tips, tricks, and ideas on getting started](https://contribute.jquery.org/open-source/).

Gruntfile.js

Lines changed: 0 additions & 171 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ div {
5454
border: 1px solid green;
5555
}
5656
</style>
57-
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
58-
<script src="jquery.color.min.js"></script>
57+
<script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
58+
<script src="https://code.jquery.com/color/jquery.color-3.0.0.min.js"></script>
5959
</head>
6060
<body>
6161
<button id="go">Simple</button>

0 commit comments

Comments
 (0)