theetrain / gulp-resource-hints Goto Github PK
View Code? Open in Web Editor NEWAdd resource hints to your html files
Home Page: https://www.npmjs.com/package/gulp-resource-hints
License: ISC License
Add resource hints to your html files
Home Page: https://www.npmjs.com/package/gulp-resource-hints
License: ISC License
Change pageToken
option to just token
It may be more efficient to check if the document has a <head>
(via soup) before building resource hints, that way I can avoid the 'no head' warning.
Include
function merge(opts) {
var options = Object.assign({}, defaults, opts);
options.paths = Object.assign({}, defaults.paths, opts.paths);
return options
}
new Set()
instead of map
when parsing assets to automatically remove duplicates from the arrayreduce
to append resource hints to data
variableIn the html file's <head>
, resource hints ought to be written out in this order for maximum performance:
User-submitted entries can accept an object by default, and they'll be written out as above. If they prefer, they can submit an array.
<body>
<head>
Add 'silent' option to disable console output.
Need a hotfix: must return true
when insertion point is a token at https://github.com/theetrain/gulp-resource-hints/blob/master/lib/helpers.js#L121
Use list-assets
to scan CSS files within captured html streams, and write resource hints for them.
Instead of ##gulp-resource-hints## use <!-- ##gulp-resource-hints## -->
for added safety.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.