Skip to content

Commit

Permalink
Build: migrate most grunt tasks off of grunt
Browse files Browse the repository at this point in the history
Updated tasks include:

- lint
- npmcopy
- build, minify, and process for distribution.
- new custom build command using yargs
- compare size of minified/gzip built files
- pretest scripts, including qunit-fixture, babel transpilation, and npmcopy
- node smoke tests
- promises aplus tests
- new watch task using `rollup.watch` directly

Also:

- upgraded husky and added the new lint command
- updated lint config to use new "flat" config format. See https://eslint.org/docs/latest/use/configure/configuration-files-new
- Temporarily disabled one lint rule until flat config is supported by eslint-plugin-import. See import-js/eslint-plugin-import#2556
- committed package-lock.json
- updated all test scripts to use the new build
- added an express test server that uses middleware-mockserver (this can be used to run tests without karma)
- build-all-variants is now build:all

Close jquerygh-5318
  • Loading branch information
timmywil authored Sep 18, 2023
1 parent f75daab commit 2bdecf8
Show file tree
Hide file tree
Showing 62 changed files with 9,973 additions and 1,655 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[package.json]
[*.{json,yml}]
indent_style = space
indent_size = 2

22 changes: 0 additions & 22 deletions .eslintignore

This file was deleted.

27 changes: 0 additions & 27 deletions .eslintrc-browser.json

This file was deleted.

20 changes: 0 additions & 20 deletions .eslintrc-node.json

This file was deleted.

5 changes: 0 additions & 5 deletions .eslintrc.json

This file was deleted.

18 changes: 14 additions & 4 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,25 @@ jobs:
run: |
export FIREFOX_SOURCE_URL='https://download.mozilla.org/?product=firefox-esr-latest&lang=en-US&os=linux64'
wget --no-verbose $FIREFOX_SOURCE_URL -O - | tar -jx -C ${HOME}
if: "contains(matrix.NAME, 'Firefox ESR')"
if: contains(matrix.NAME, 'Firefox ESR')

- name: Install dependencies
run: |
npm install
run: npm install

- name: Install Playwright dependencies
run: npx playwright-webkit install-deps
if: "matrix.NPM_SCRIPT == 'test:browser' && contains(matrix.BROWSERS, 'WebkitHeadless')"
if: matrix.NPM_SCRIPT == 'test:browser' && contains(matrix.BROWSERS, 'WebkitHeadless')

- name: Build jQuery for Lint
run: npm run build:all
if: matrix.NPM_SCRIPT == 'test:browserless'

- name: Lint code
run: npm run lint
if: matrix.NODE_VERSION == '18.x'

- name: Prepare tests
run: npm run pretest

- name: Run tests
env:
Expand Down
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@
.bower.json
.sizecache.json
yarn.lock
package-lock.json
.eslintcache

npm-debug.log*

# Ignore everything in `dist` folder except for the ESLint config
# Ignore everything in `dist` folder except for
# the ESLint config & package.json files
/dist/*
!/dist/.eslintrc.json
!/dist/package.json

# Ignore everything in the `dist-module` folder except for the ESLint config,
# package.json & Node module wrapper files
/dist-module/*
!/dist-module/.eslintrc.json
!/dist-module/package.json
!/dist-module/jquery.node-module-wrapper.js
!/dist-module/jquery.node-module-wrapper.slim.js
Expand Down
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx commitplease .git/COMMIT_EDITMSG
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint
npm run qunit-fixture
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.eslintignore
.eslintrc.json
eslint.config.js

/.editorconfig
/.gitattributes
Expand Down
Loading

0 comments on commit 2bdecf8

Please sign in to comment.