Skip to content

Commit

Permalink
Merge pull request #66 from marmelab/modernize
Browse files Browse the repository at this point in the history
Modernize
  • Loading branch information
fzaninotto committed Apr 19, 2024
2 parents 19b3190 + 8027da9 commit c046d67
Show file tree
Hide file tree
Showing 28 changed files with 7,849 additions and 20,359 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ on:
- 'docs/**'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js LTS
uses: actions/setup-node@v1
with:
node-version: '18.x'
- uses: bahmutov/npm-install@v1
- name: Lint Check
run: npx @biomejs/biome lint src
- name: Format Check
run: npx @biomejs/biome format src
unit-test:
runs-on: ubuntu-latest
steps:
Expand All @@ -20,7 +34,7 @@ jobs:
- name: Use Node.js LTS
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
- uses: bahmutov/npm-install@v1
- name: Unit Tests
run: make test
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ install:
@bower install

build-dev:
@${CURDIR}/node_modules/.bin/webpack
@NODE_ENV=development npm run build

build:
@${CURDIR}/node_modules/.bin/webpack --mode=production
@NODE_ENV=production npm run build

watch:
@${CURDIR}/node_modules/.bin/webpack --watch
@NODE_ENV=development npm run build --watch

test:
@npm run test

format:
@npm run format

lint:
@npm run lint
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Intercept AJAX calls to fake a REST server based on JSON data. Use it on top of [Sinon.js](http://sinonjs.org/) (for `XMLHTTPRequest`) or [fetch-mock](https://github.com/wheresrhys/fetch-mock) (for `fetch`) to test JavaScript REST clients on the browser side (e.g. single page apps) without a server.

See it in action in the [react-admin](https://marmelab.com/react-admin/) [demo](https://marmelab.com/react-admin-demo) ([source code](https://github.com/marmelab/react-admin/tree/master/examples/demo)).

## Usage

### Fake XMLHTTPRequest
Expand Down
22 changes: 22 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://biomejs.dev/schemas/1.7.0/schema.json",
"organizeImports": {
"enabled": true
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 4
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}
33 changes: 0 additions & 33 deletions bower.json

This file was deleted.

78 changes: 0 additions & 78 deletions example/fetch.html

This file was deleted.

81 changes: 0 additions & 81 deletions example/index.html

This file was deleted.

22 changes: 0 additions & 22 deletions example/ng-admin/Readme.md

This file was deleted.

19 changes: 0 additions & 19 deletions example/ng-admin/bower.json

This file was deleted.

Loading

0 comments on commit c046d67

Please sign in to comment.