Removing Modernizr from the project

This commit is contained in:
Rob Larsen
2023-09-02 02:03:46 +00:00
committed by Rob Larsen
parent 7e8b7e9c03
commit 22d800ad31
16 changed files with 1 additions and 433 deletions

View File

@@ -15,7 +15,6 @@ way that you want.
* [Homepage](https://html5boilerplate.com/) * [Homepage](https://html5boilerplate.com/)
* [Source Code](https://github.com/h5bp/html5-boilerplate) * [Source Code](https://github.com/h5bp/html5-boilerplate)
* [Twitter(@h5pb)](https://twitter.com/h5bp)
## About This Repository ## About This Repository
@@ -85,8 +84,6 @@ Choose one of the following options:
research and experimentation by over 200 contributors. research and experimentation by over 200 contributors.
* Designed with progressive enhancement in mind. * Designed with progressive enhancement in mind.
* Includes: * Includes:
* A custom build of [`Modernizr`](https://modernizr.com/) for feature
detection.
* Placeholder Open Graph elements and attributes. * Placeholder Open Graph elements and attributes.
* An example package.json file with [WebPack](https://webpack.js.org/) commands * An example package.json file with [WebPack](https://webpack.js.org/) commands
built in to jumpstart application development. built in to jumpstart application development.

1
dist/index.html vendored
View File

@@ -27,7 +27,6 @@
<!-- Add your site or application content here --> <!-- Add your site or application content here -->
<p>Hello world! This is HTML5 Boilerplate.</p> <p>Hello world! This is HTML5 Boilerplate.</p>
<script src="js/vendor/modernizr-3.12.0.min.js"></script>
<script src="js/app.js"></script> <script src="js/app.js"></script>
</body> </body>

File diff suppressed because one or more lines are too long

View File

@@ -13,7 +13,6 @@ module.exports = merge(common, {
patterns: [ patterns: [
{ from: 'img', to: 'img' }, { from: 'img', to: 'img' },
{ from: 'css', to: 'css' }, { from: 'css', to: 'css' },
{ from: 'js/vendor', to: 'js/vendor' },
{ from: 'icon.svg', to: 'icon.svg'}, { from: 'icon.svg', to: 'icon.svg'},
{ from: 'favicon.ico', to: 'favicon.ico'}, { from: 'favicon.ico', to: 'favicon.ico'},
{ from: 'tile-wide.png', to: 'tile-wide.png'}, { from: 'tile-wide.png', to: 'tile-wide.png'},

View File

@@ -136,68 +136,4 @@ The central part of the boilerplate template is pretty much empty. This is
intentional, in order to make the boilerplate suitable for both web page and web intentional, in order to make the boilerplate suitable for both web page and web
app development. app development.
### Modernizr
HTML5 Boilerplate uses a custom build of Modernizr.
[Modernizr](https://modernizr.com/) is a JavaScript library which adds classes
to the `html` element based on the results of feature test and which ensures
that all browsers can make use of HTML5 elements (as it includes the HTML5
Shiv). This allows you to target parts of your CSS and JavaScript based on the
features supported by a browser.
Starting with version 3 Modernizr can be customized using the
[modernizr-config.json](https://github.com/h5bp/html5-boilerplate/blob/main/modernizr-config.json)
and the
[Modernizr command line utility](https://www.npmjs.com/package/modernizr-cli).
### What About Polyfills?
If you need to include
[polyfills](https://remysharp.com/2010/10/08/what-is-a-polyfill) in your
project, you must make sure those load before any other JavaScript. If you're
using a polyfill CDN service, like [polyfill.io](https://polyfill.io/v3/), just put
it before the other scripts in the bottom of the page:
```html
<script src="js/vendor/modernizr-3.11.7.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js"></script>
<script src="js/app.js"></script>
</body>
```
When you have a bunch of polyfills to load in, you could also
create a `polyfills.js` file in the `js/vendor` directory or include the files
individually and combine them using a build tool. Always ensure that the
polyfills are all loaded before any other JavaScript.
There are some misconceptions about Modernizr and polyfills. It's important to
understand that Modernizr just handles feature checking, not polyfilling itself.
The only thing Modernizr does regarding polyfills is that the team maintains
[a huge list of cross Browser polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills).
### jQuery
As of v8.0.0 we no longer include jQuery by default. Web development has
changed a lot since we started this project and while many millions of sites
still use jQuery there are many sites and applications that don't. 10 years ago
jQuery _was_ JavaScript for most developers. That's not the case any more so
we've made the decision to remove jQuery from the project.
If you're interested in including it, you can easily install jQuery using the
following command:
```
npm install jquery
```
You can then copy the minified file into the `vendor` folder and add jQuery
to the `index.html` manually.
To load jQuery from a CDN with a local fallback you can use the following:
```html
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.6.0.min.js"><\/script>')</script>
```

View File

@@ -10,12 +10,3 @@ Information about the default JavaScript included in the project.
This file can be used to contain or reference your site/app JavaScript code. If This file can be used to contain or reference your site/app JavaScript code. If
you're working on something more advanced you might replace this file entirely. you're working on something more advanced you might replace this file entirely.
That's cool. That's cool.
## vendor
This directory can be used to contain all third-party library code.
Our custom build of the Modernizr library is included by
default. You may wish to create your own [custom Modernizr build with the online
builder](https://modernizr.com/download/) or [command line
tool](https://modernizr.com/docs#command-line-config).

View File

@@ -36,8 +36,6 @@ A basic HTML5 Boilerplate site initially looks something like this:
├── img ├── img
├── js ├── js
│ ├── app.js │ ├── app.js
│ └── vendor
│ └── modernizr.min.js
├── .editorconfig ├── .editorconfig
├── 404.html ├── 404.html
├── favicon.ico ├── favicon.ico
@@ -153,7 +151,6 @@ It copies the following files and folders to the dist folder:
* css * css
* img * img
* js/vendor
* 404.html * 404.html
* favicon.ico * favicon.ico
* icon.png * icon.png
@@ -163,7 +160,3 @@ It copies the following files and folders to the dist folder:
* site.webmanifest * site.webmanifest
* tile.png * tile.png
* tile-wide.png * tile-wide.png
`js/vendor` is copied over in order to allow you to use unprocessed JS files
(like Modernizr) in addition to the files bundled based on the project's entry
point `app.js.`

View File

@@ -9,11 +9,9 @@ import gulpReplace from 'gulp-replace';
import archiver from 'archiver'; import archiver from 'archiver';
import { globSync } from 'glob' import { globSync } from 'glob'
import { deleteSync } from 'del'; import { deleteSync } from 'del';
import modernizr from 'modernizr';
import { createRequire } from 'module'; import { createRequire } from 'module';
const require = createRequire(import.meta.url); const require = createRequire(import.meta.url);
const pkg = require('./package.json'); const pkg = require('./package.json');
const modernizrConfig = require('./modernizr-config.json');
const dirs = pkg['h5bp-configs'].directories; const dirs = pkg['h5bp-configs'].directories;
@@ -74,10 +72,7 @@ gulp.task('clean', (done) => {
gulp.task('copy:index.html', () => { gulp.task('copy:index.html', () => {
let modernizrVersion = pkg.devDependencies.modernizr;
return gulp.src(`${dirs.src}/index.html`) return gulp.src(`${dirs.src}/index.html`)
.pipe(gulpReplace(/{{MODERNIZR_VERSION}}/g, modernizrVersion))
.pipe(gulp.dest(dirs.dist)); .pipe(gulp.dest(dirs.dist));
}); });
@@ -115,16 +110,6 @@ gulp.task('copy:misc', () =>
}).pipe(gulp.dest(dirs.dist)) }).pipe(gulp.dest(dirs.dist))
); );
gulp.task('modernizr', (done) => {
// TODO: rework this flow instead of just reacting to the fact that the jQuery step is gone
if (!fs.existsSync(`${dirs.dist}/js/vendor/`)){
fs.mkdirSync(`${dirs.dist}/js/vendor/`);
}
modernizr.build(modernizrConfig, (code) => {
fs.writeFile(`${dirs.dist}/js/vendor/modernizr-${pkg.devDependencies.modernizr}.min.js`, code, done);
});
});
gulp.task('lint:js', () => gulp.task('lint:js', () =>
gulp.src([ gulp.src([
@@ -152,8 +137,7 @@ gulp.task(
'build', 'build',
gulp.series( gulp.series(
gulp.parallel('clean', 'lint:js'), gulp.parallel('clean', 'lint:js'),
'copy', 'copy'
'modernizr'
) )
); );

View File

@@ -1,17 +0,0 @@
{
"minify": true,
"options": [
"domPrefixes",
"prefixes",
"addTest",
"hasEvent",
"mq",
"prefixedCSSValue",
"testAllProps",
"testProp",
"testStyles",
"setClasses"
],
"feature-detects": [
]
}

300
package-lock.json generated
View File

@@ -23,7 +23,6 @@
"gulp-replace": "^1.1.4", "gulp-replace": "^1.1.4",
"main.css": "3.0.0", "main.css": "3.0.0",
"mocha": "^10.2.0", "mocha": "^10.2.0",
"modernizr": "3.12.0",
"strip-json-comments": "^5.0.1" "strip-json-comments": "^5.0.1"
}, },
"engines": { "engines": {
@@ -2195,15 +2194,6 @@
"once": "^1.4.0" "once": "^1.4.0"
} }
}, },
"node_modules/entities": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz",
"integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==",
"dev": true,
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"node_modules/error-ex": { "node_modules/error-ex": {
"version": "1.3.2", "version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
@@ -4854,12 +4844,6 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/file": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/file/-/file-0.2.2.tgz",
"integrity": "sha1-w9/Y+M81Na5FXCtCPC5SY112tNM=",
"dev": true
},
"node_modules/file-entry-cache": { "node_modules/file-entry-cache": {
"version": "6.0.1", "version": "6.0.1",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
@@ -7295,15 +7279,6 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/linkify-it": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz",
"integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==",
"dev": true,
"dependencies": {
"uc.micro": "^1.0.1"
}
},
"node_modules/load-json-file": { "node_modules/load-json-file": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
@@ -7563,22 +7538,6 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/markdown-it": {
"version": "12.3.2",
"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz",
"integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==",
"dev": true,
"dependencies": {
"argparse": "^2.0.1",
"entities": "~2.1.0",
"linkify-it": "^3.0.1",
"mdurl": "^1.0.1",
"uc.micro": "^1.0.5"
},
"bin": {
"markdown-it": "bin/markdown-it.js"
}
},
"node_modules/matchdep": { "node_modules/matchdep": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz",
@@ -7721,12 +7680,6 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/mdurl": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==",
"dev": true
},
"node_modules/merge2": { "node_modules/merge2": {
"version": "1.4.1", "version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
@@ -8287,240 +8240,6 @@
"node": ">=10" "node": ">=10"
} }
}, },
"node_modules/modernizr": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/modernizr/-/modernizr-3.12.0.tgz",
"integrity": "sha512-i5f5xfnxMOb3cePoBpwk4bWjVAyIB3hgm7QrDvZx/R7zUUS8PO9zlyQF7vJKn8kCVxEvL0nRWeZ0PPqVbY31sw==",
"dev": true,
"dependencies": {
"doctrine": "^3.0.0",
"file": "^0.2.2",
"lodash": "^4.17.21",
"markdown-it": "^12.3.2",
"mkdirp": "0.5.5",
"requirejs": "^2.3.6",
"yargs": "^15.4.1"
},
"bin": {
"modernizr": "bin/modernizr"
},
"engines": {
"node": ">=8"
}
},
"node_modules/modernizr/node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true,
"dependencies": {
"color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/modernizr/node_modules/camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"dev": true,
"engines": {
"node": ">=6"
}
},
"node_modules/modernizr/node_modules/cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
"integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
"dev": true,
"dependencies": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
"wrap-ansi": "^6.2.0"
}
},
"node_modules/modernizr/node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"dependencies": {
"color-name": "~1.1.4"
},
"engines": {
"node": ">=7.0.0"
}
},
"node_modules/modernizr/node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"node_modules/modernizr/node_modules/find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dev": true,
"dependencies": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/modernizr/node_modules/get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true,
"engines": {
"node": "6.* || 8.* || >= 10.*"
}
},
"node_modules/modernizr/node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true,
"engines": {
"node": ">=8"
}
},
"node_modules/modernizr/node_modules/locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dev": true,
"dependencies": {
"p-locate": "^4.1.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/modernizr/node_modules/p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dev": true,
"dependencies": {
"p-try": "^2.0.0"
},
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/modernizr/node_modules/p-locate": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dev": true,
"dependencies": {
"p-limit": "^2.2.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/modernizr/node_modules/p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true,
"engines": {
"node": ">=6"
}
},
"node_modules/modernizr/node_modules/require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
"dev": true
},
"node_modules/modernizr/node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/modernizr/node_modules/which-module": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
"dev": true
},
"node_modules/modernizr/node_modules/wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
"integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
"dev": true,
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/modernizr/node_modules/y18n": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
"integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
"dev": true
},
"node_modules/modernizr/node_modules/yargs": {
"version": "15.4.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
"integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
"dev": true,
"dependencies": {
"cliui": "^6.0.0",
"decamelize": "^1.2.0",
"find-up": "^4.1.0",
"get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^4.2.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^18.1.2"
},
"engines": {
"node": ">=8"
}
},
"node_modules/modernizr/node_modules/yargs-parser": {
"version": "18.1.3",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
"integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
"dev": true,
"dependencies": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/ms": { "node_modules/ms": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -9971,19 +9690,6 @@
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
"dev": true "dev": true
}, },
"node_modules/requirejs": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz",
"integrity": "sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg==",
"dev": true,
"bin": {
"r_js": "bin/r.js",
"r.js": "bin/r.js"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/resolve": { "node_modules/resolve": {
"version": "1.20.0", "version": "1.20.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
@@ -11167,12 +10873,6 @@
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
"dev": true "dev": true
}, },
"node_modules/uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==",
"dev": true
},
"node_modules/unbox-primitive": { "node_modules/unbox-primitive": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",

View File

@@ -35,7 +35,6 @@
"gulp-replace": "^1.1.4", "gulp-replace": "^1.1.4",
"main.css": "3.0.0", "main.css": "3.0.0",
"mocha": "^10.2.0", "mocha": "^10.2.0",
"modernizr": "3.12.0",
"strip-json-comments": "^5.0.1" "strip-json-comments": "^5.0.1"
}, },
"engines": { "engines": {

View File

@@ -27,7 +27,6 @@
<!-- Add your site or application content here --> <!-- Add your site or application content here -->
<p>Hello world! This is HTML5 Boilerplate.</p> <p>Hello world! This is HTML5 Boilerplate.</p>
<script src="js/vendor/modernizr-{{MODERNIZR_VERSION}}.min.js"></script>
<script src="js/app.js"></script> <script src="js/app.js"></script>
</body> </body>

0
src/js/vendor/.gitkeep vendored Normal file
View File

View File

@@ -13,7 +13,6 @@ module.exports = merge(common, {
patterns: [ patterns: [
{ from: 'img', to: 'img' }, { from: 'img', to: 'img' },
{ from: 'css', to: 'css' }, { from: 'css', to: 'css' },
{ from: 'js/vendor', to: 'js/vendor' },
{ from: 'icon.svg', to: 'icon.svg'}, { from: 'icon.svg', to: 'icon.svg'},
{ from: 'favicon.ico', to: 'favicon.ico'}, { from: 'favicon.ico', to: 'favicon.ico'},
{ from: 'tile-wide.png', to: 'tile-wide.png'}, { from: 'tile-wide.png', to: 'tile-wide.png'},

View File

@@ -51,11 +51,6 @@ function runTests() {
describe(`Test if the files from the "${dir}" directory have the expected content`, () => { describe(`Test if the files from the "${dir}" directory have the expected content`, () => {
it('"index.html" should contain the correct Modernizr version in the local URL', (done) => {
const string = `js/vendor/modernizr-${pkg.devDependencies.modernizr}.min.js`;
checkString(path.resolve(dir, 'index.html'), string, done);
});
it('"style.css" should contain a custom banner', function (done) { it('"style.css" should contain a custom banner', function (done) {
const string = `/*! HTML5 Boilerplate v${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n`; const string = `/*! HTML5 Boilerplate v${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n`;
checkString(path.resolve(dir, 'css/style.css'), string, done); checkString(path.resolve(dir, 'css/style.css'), string, done);

View File

@@ -39,9 +39,6 @@ const expectedFilesInDistDir = [
'js/', 'js/',
'js/app.js', 'js/app.js',
'js/vendor/',
`js/vendor/modernizr-${pkg.devDependencies.modernizr}.min.js`,
'LICENSE.txt', 'LICENSE.txt',
'robots.txt', 'robots.txt',
'site.webmanifest', 'site.webmanifest',