Skip to content

Commit

Permalink
Remove obsolete CommonJS version
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Jan 25, 2024
1 parent f91dcd4 commit 365fe36
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 160 deletions.
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,6 @@ If you're using an older version of **node,** stick with **fetch-json v2.7** and
$ npm install node-fetch
```

### 3. Legacy web browsers
To support really old browsers, include polyfills for
[Promise](https://github.com/taylorhakes/promise-polyfill/) and
[Fetch API](https://github.com/github/fetch):
```html
<script src=https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js></script>
<script src=https://cdn.jsdelivr.net/npm/whatwg-fetch@3/dist/fetch.umd.min.js></script>
```

## K) Build Environment
Check out the `runScriptsConfig` section in [package.json](package.json) for an
interesting approach to organizing build tasks.
Expand All @@ -299,7 +290,7 @@ interesting approach to organizing build tasks.
- 🪺 [recursive-exec](https://github.com/center-key/recursive-exec):&nbsp; _Run a command on each file in a folder and its subfolders_
- 🔍 [replacer-util](https://github.com/center-key/replacer-util):&nbsp; _Find and replace strings or template outputs in text files_
- 🔢 [rev-web-assets](https://github.com/center-key/rev-web-assets):&nbsp; _Revision web asset filenames with cache busting content hash fingerprints_
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):&nbsp; _Organize npm scripts into named groups of easy to manage commands_
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):&nbsp; _Organize npm package.json scripts into named groups of easy to manage commands_
- 🚦 [w3c-html-validator](https://github.com/center-key/w3c-html-validator):&nbsp; _Check the markup validity of HTML files using the W3C validator_

<br>
Expand Down
133 changes: 0 additions & 133 deletions dist/fetch-json.umd.cjs

This file was deleted.

23 changes: 7 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,12 @@
"license": "MIT",
"type": "module",
"module": "dist/fetch-json.js",
"jsdelivr": "dist/fetch-json.min.js",
"main": "dist/fetch-json.umd.cjs",
"browser": "dist/fetch-json.min.js",
"types": "dist/fetch-json.d.ts",
"exports": "./dist/fetch-json.js",
"files": [
"dist"
],
"exports": {
".": {
"import": "./dist/fetch-json.js",
"require": "./dist/fetch-json.umd.cjs"
},
"./": "./dist/"
},
"engines": {
"node": ">=18"
},
Expand Down Expand Up @@ -85,8 +78,6 @@
],
"build": [
"tsc",
"tsc --module UMD --outDir build/umd",
"copy-file build/umd/fetch-json.js build/fetch-json.umd.cjs",
"esm-to-plain-js --cd=build fetch-json.js fetch-json.dev.js",
"uglifyjs build/fetch-json.dev.js --output build/fetch-json.min.js"
],
Expand All @@ -104,9 +95,9 @@
},
"devDependencies": {
"@fortawesome/fontawesome-free": "~6.5",
"@types/node": "~20.10",
"@typescript-eslint/eslint-plugin": "~6.17",
"@typescript-eslint/parser": "~6.17",
"@types/node": "~20.11",
"@typescript-eslint/eslint-plugin": "~6.19",
"@typescript-eslint/parser": "~6.19",
"add-dist-header": "~1.3",
"assert-deep-strict-equal": "~1.1",
"copy-file-util": "~1.1",
Expand All @@ -115,10 +106,10 @@
"eslint": "~8.56",
"esm-to-plain-js": "~1.1",
"http-server": "~14.1",
"jsdom": "~23.0",
"jsdom": "~24.0",
"jshint": "~2.13",
"mocha": "~10.2",
"puppeteer": "~21.6",
"puppeteer": "~21.9",
"puppeteer-browser-ready": "~1.3",
"replacer-util": "~1.2",
"rimraf": "~5.0",
Expand Down
1 change: 0 additions & 1 deletion spec/package.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ describe('The "dist" folder', () => {
'fetch-json.dev.js',
'fetch-json.js',
'fetch-json.min.js',
'fetch-json.umd.cjs',
];
assertDeepStrictEqual(actual, expected);
});
Expand Down

0 comments on commit 365fe36

Please sign in to comment.