Skip to content

Build: replace grunt tasks with npm scripts #512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

7 changes: 5 additions & 2 deletions .github/workflows/browserstack-3.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- main
# Once a week every Tuesday
schedule:
- cron: "12 2 * * 2"

jobs:
test:
Expand Down Expand Up @@ -70,8 +73,8 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build
run: npm run build
- name: Pretest script
run: npm run pretest

- name: Test
run: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/browserstack-git.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- main
# Once a week every Tuesday
schedule:
- cron: "42 1 * * 2"

jobs:
test:
Expand Down Expand Up @@ -55,8 +58,8 @@ jobs:
- name: Install dependencies
run: npm install

- name: Build
run: npm run build
- name: Pretest script
run: npm run pretest

- name: Test
run: |
Expand Down
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ CDN
/*.html
.DS_Store
.sizecache.json
.eslintcache

# Ignore everything in dist folder except for eslint config
/dist/*
!/dist/.eslintrc.json

/dist
/external
/node_modules

Expand Down
15 changes: 9 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,8 @@ See: [jQuery Core Style Guide](http://docs.jquery.com/JQuery_Core_Style_Guidelin

To test the plugin you will need:

* Some kind of localhost server(any will do)
* Node.js
* NPM (comes with the latest version of Node.js)
* Grunt (install with: `npm install grunt -g`)


### Build a Local Copy of the plugin

Expand Down Expand Up @@ -108,13 +105,19 @@ Get in the habit of pulling in the "upstream" `main` branch to stay up to date a
$ git pull upstream main
```

Run the Grunt tools:
Run the build and rebuild when source files change:

```bash
$ npm start
```

In another terminal, run the test server:

```bash
$ grunt && grunt watch
$ npm run test:server
```

Now open the jQuery test suite in a browser at http://localhost/test. If there is a port, be sure to include it.
Now open the jQuery test suite in a browser at http://localhost:3000/test/.

Success! You just built and tested jQuery!

Expand Down
155 changes: 0 additions & 155 deletions Gruntfile.js

This file was deleted.

15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,21 +89,12 @@ Build and run tests:
====================================================

## Build with `npm` commands
```sh
$ git clone git://github.com/jquery/jquery-migrate.git
$ cd jquery-migrate
$ npm install
$ npm run build
```

## Build with [`grunt`](http://gruntjs.com/)

```sh
$ git clone git://github.com/jquery/jquery-migrate.git
$ cd jquery-migrate
$ npm install
$ npm install -g grunt-cli
$ grunt build
$ npm run build
```

### Run tests
Expand All @@ -115,5 +106,7 @@ $ npm test
### Or

```sh
$ grunt test
$ npm run test:server
```

and open http://localhost:3000/test/ in your browser.
Loading
Loading