在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):AvraamMavridis/gulp-louis开源软件地址(OpenSource Url):https://github.com/AvraamMavridis/gulp-louis开源编程语言(OpenSource Language):JavaScript 99.2%开源软件介绍(OpenSource Introduction):LouisLouis is a gulp task that is used to analyze the performance of a website against a performance budget. IntroductionThere are many definitions of the performance budget on the web, my favourite is from Zachary Brady. A performance budget provides values against which design, development, content, or any aspect of a site that may affect performance, can be made. The aim of the plugin is to analyze the performance of the website against a performance bugdet. There are various metrics against which we can set a performance budget e.g. number of requests, imageSize etc. Getting startedInstallationUsage1.Example2.Output3.Options4.Performance Budget Options5.Change log6.Getting StartedUsage$ npm install --save-dev gulp-louis import louis = require('gulp-louis');
gulp.task('louis', function(done) {
louis({
timeout: 60,
viewport: '1280x1024',
engine: 'webkit',
userAgent: 'Chrome/37.0.2062.120',
noExternals: false,
performanceBudget: {
requests: 2,
medianLatency: 10,
slowestResponse: 1000
}
}, done);
});
gulp.task('default', ['louis']); ExampleExample 1 (with specified url) louis({
url: 'http://localhost:8000/',
timeout: 200,
performanceBudget: {
requests: 10,
domComplete: 3000
}
}) Example 2 (without url) This will launch a server and look for an index.html in the same folder as the gulpfile.js, then it will analyze the performance of this website. louis({
timeout: 10,
performanceBudget: {
requests: 10,
headersSize: 200
}
}) OutputOutput with specified performance budget Output without specified performance budget OptionsAll options are optional
Performance Budget OptionsThe performance budget option can contain some or all of these values:
Example: performanceBudget = {
cssSize: 200
jsSize: 2000
consoleMessages: 0
imageSize: 5000
domContentLoaded: 2000
smallestLatency: 1000
} Change log[2.3.2] - 2018-03-16
[2.3.1] - 2018-02-28
[2.3.0] - 2016-10-07
[2.2.1] - 2016-09-29
[2.2.0] - 2016-09-29
[2.1.1] - 2016-09-16
[2.1.0] - 2016-09-15
[2.0.0] - 2016-08-29
[1.1.0] - 2016-08-19
[1.0.14] - 2015-11-23Bug Fixes
[1.0.10] - 2015-02-21[1.0.9] - 2015-02-21[1.0.8] - 2015-02-20[1.0.7] - 2015-02-17[1.0.0] - 2015-02-16LicenseReleased under the MIT license. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论