Skip to content

Commit ddd5ed0

Browse files
committed
Readme broken link fixed
1 parent 1819426 commit ddd5ed0

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Using the module/nomodule approach. Have a look at the example in this repositor
8383
- Create an entry (input) [.js or .mjs or .ts] [file for browsers which support ECMAScript modules](https://github.com/mcshaz/esm-date-input-polyfill/blob/master/examples/esm.module.js), which includes a polyfill for dynamic import in browsers which support modules but not dynamic import statements.
8484
- Have a [seperate entry file for legacy browsers](https://github.com/mcshaz/esm-date-input-polyfill/blob/master/examples/esm.nomodule.js).
8585
- Modern browsers will only download a tiny file to check for date-input support, and download the appropriate polyfill only if date inputs are not natively supported.
86-
- Older browsers will download the full executable. See an example [rollup config here](https://github.com/mcshaz/simple-nicu-calc/blob/master/rollup.config.js).
86+
- Older browsers will download the full executable. See an example [rollup config here](https://github.com/mcshaz/simple-nicu-calcs/blob/master/rollup.config.js).
8787
- Check if the script has already been run in the [common file](https://github.com/mcshaz/esm-date-input-polyfill/blob/master/examples/esm-page-script.js) that the 2 enty files point to (a problem with Safari 10 respecting `<script type="module" src="...">` but _not_ respecting `<script nomodule src="...">`).
8888
```js
8989
import { polyfillIfRequired } from 'polyfill-if-required.mjs';
@@ -94,7 +94,7 @@ window.__my_script_loaded = true;
9494
export function myScript() {
9595
polyfillIfRequired({watchForInsert: true}).then(function() {
9696
```
97-
- **Note** the distributable code for this polyfill has been bundled and minified, but intentionally it has not been transpiled by a tool such as babel. This ensures the smallest size file for modern browsers. You will therefore need to make sure you include esm-date-input-polyfill in your babel transpiling and automatic `js` polyfilling process for older browsers. Many bundling config files exclude all node modules with `{ exclude: /node_modules\ }`. Instead, change this to something like:
97+
- **Note** the distributable code for this polyfill has been bundled and minified, but intentionally it has not been transpiled by a tool such as Babel. This ensures the smallest size file for modern browsers. You will therefore need to make sure you include esm-date-input-polyfill in your transpiling and automatic `js` polyfilling process for older browsers (usually with Babel). Many bundling config files exclude all node modules with `{ exclude: /node_modules/ }`. Instead, change this to something like:
9898
```js
9999
rules: [
100100
{
@@ -107,7 +107,7 @@ export function myScript() {
107107
```
108108
109109
### Script Tag:
110-
Execute `dateInputPolyfill.polyfillIfRequired()` and if required with an option object with the properties described above. See the example of this workflow [here](https://github.com/mcshaz/esm-date-input-polyfill/blob/master/docs/iife.html).
110+
Execute `dateInputPolyfill.polyfillIfRequired()` and if required with an option object with the properties described above. See the example of this workflow [in the example html file here](https://github.com/mcshaz/esm-date-input-polyfill/blob/master/docs/iife.html).
111111
112112
113113
## Features
@@ -143,7 +143,7 @@ values in the format `yyyy-MM-dd`.
143143
`value` *property*.
144144
145145
If you don't want that, one potential workaround is to change
146-
the attribute upon form submission:
146+
the attribute back to the property value upon form submission:
147147
```js
148148
el.form.addEventListener('submit', (e)=> el.setAttribute('value', el.value));
149149
```
@@ -158,7 +158,7 @@ Run `npm run build`
158158
Given the lifecycle of browsers which do not natively support date-inputs, there no plans to add the features below, however if this project were to have a roadmap:
159159
- placeholder currently uses english characters e.g. `dd/mm/yyyy`. This should clearly be language specific.
160160
- separate out language files and dynamically retrieve only the 1 language file required.
161-
- have a cross inside the right of the input which deletes the selected date. At present to delete the date, the text within the input can be selected and deleted.
161+
- have a cross inside the right side of the input which deletes the selected date. At present to delete the date, the text within the input can be selected and deleted.
162162
163163
## Thanks
164164
Some words of appreciation for those who have submitted tickets, pull requests,

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "esm-date-input-polyfill",
3-
"version": "6.1.0",
3+
"version": "6.1.1",
44
"deprecated": false,
55
"description": "Automatically adds datepickers to input[type=date] on IE, Firefox, and macOS Safari.",
66
"main": "dist/cjs/polyfill-if-required.cjs.js",
@@ -55,7 +55,7 @@
5555
"rollup-plugin-babel": "^4.4.0",
5656
"rollup-plugin-copy": "^3.3.0",
5757
"rollup-plugin-delete": "^1.2.0",
58-
"rollup-plugin-postcss": "^3.1.0",
58+
"rollup-plugin-postcss": "^3.1.1",
5959
"rollup-plugin-sourcemaps": "^0.5.0",
6060
"rollup-plugin-terser": "^5.3.0",
6161
"rollup-plugin-url": "^3.0.1",

rollup.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import del from 'rollup-plugin-delete';
1212
import copy from 'rollup-plugin-copy';
1313
import sourcemaps from 'rollup-plugin-sourcemaps';
1414
import url from 'rollup-plugin-url';
15+
import { readFile } from 'fs'
1516

1617

1718
const buildTargets = {
@@ -49,7 +50,8 @@ function getRollupBasePlugins({ buildTarget = buildTargets.npm }) {
4950
resolve(),
5051
commonJS(),
5152
url(), // required by sourcemaps (below) on windows filesystems to corectly interpret sourcemap location
52-
sourcemaps());
53+
sourcemaps({ exclude: /node_modules/ }) // exclude not working at the moment as a sourcemaps option
54+
);
5355
} else {
5456
plugins.push(
5557
postcss({

0 commit comments

Comments
 (0)