Comments (8)
v1 uses a static server to host the build of the application. This is a great option till you get into more complex scenarios. Client project I'm on right now has some calls to the server made at the start of an application but these will fail because there is no server. I need a way for my CI process to startup the backend and frontend and gimbal be able to run audits against a URL I pass to gimbal.
In the same vein, it'd be great if the browser audits could be run on any remote web site. Not saying this is how it should work but running gimbal --url github.com
should run browser audits against github.com. There are some audits that wouldn't run like the size and source map explorer since they are run against local files and that's fine.
from gimbal.
I love the config file but as things have changed, the format of the config file is weird and should be looked at.
For example, the builtin audits, to set thresholds you put them in the configs
object but then you can set which audits you want in the separate audits
array. This is an example:
audits:
- size
configs:
size:
thresholds:
foo.js: 1 KB
This isn't necessarily bad but when we added plugins, you set the threshold for that plugin within that plugin object like so:
audits:
- axe
plugins:
- plugin: '@modus/gimbal-plugin-axe'
thresholds:
bypass: serious
Once again, this isn't bad but it made me think, should we do the same thing we are doing in the plugins object in the audits array (or make audits an object):
audits:
axe:
thresholds:
bypass: serious
size:
thresholds:
foo.js: 1 KB
plugins can still have objects since they may have options (and the ones we supply do) but thresholds seem to go better in the audits and it's one place for them.
from gimbal.
We need to replace commander with something else like minimist since commander doesn't support async command actions. Plus we were executing other things outside of commander so it'd be great to just handle everything ourselves and with something more suited to be a cli option parser like minimist. Commander seems to overweight for our use now.
Need to also think that plugins can create their own command and options that we need to manage also.
from gimbal.
Should move to a manager for CI/VCS so that plugins could add their own in. It's fine to have Gimbal support the popular ones but there are some out there that we either don't have the time to add or don't know about and should let anyone add their own support in.
from gimbal.
We can programmatically call gimbal since it's just JavaScript in the end. It'd be great to allow gimbal to be executed from test runners, have each call cache their results and at the end reconcile all these results to give a final report. Most of this is already worked out including the reconciliation but caching results and running gimbal using a URL or a puppeteer page instance needs to be thought of.
This would get us around any auth issues since the tests themselves would handle that, we'd just run on a page provided by the test runner.
from gimbal.
Thresholds can be a pain. Need to come up with something that can fail a gimbal run but not be as big of a hassle as thresholds can be.
Maybe have ranges:
- good = 0-5KB
- warning = 5KB-20KB
- error = 20KB+
Having a warning range could alert something is growing but not fail the build.
from gimbal.
The build directory defaults to build
which is great and easy to override but by default, let's have an array of common build directories and first one that actually exists is used... unless provided. So in code:
const possibleBuildDirs = ['build', 'dist'];
let buildDir = options.buildDir;
if (!buildDir) {
buildDir = possibleBuildDirs.find(dir => fs.existSync(path.resolve(cwd, dir)));
}
This may make default running on different projects a bit more friendly (one less thing maybe).
from gimbal.
There was a bus concept in v1 so that the plugins installed locally can get same instances of things that gimbal (that may not be installed locally, could be globally) uses. Maybe instead, we have a full class instance that gets passed to the plugin to handle more.
from gimbal.
Related Issues (20)
- Size module checks sizes on already matched files
- SQLite and MySQL plugins should be moved to own module
- Move webpack-gimbal-plugin into this repo
- SQLite plugin needs to create directory
- Refactor module default configs merging
- Move Config to gimbal-core
- Plugins are not able to add columns to tables used for markdown/html outputs
- Only outputs Asciiart and "Finished successfully". No report. HOT 18
- Badges
- size report: no output for custom build dir HOT 4
- Use GitHub Actions instead of Circle CI HOT 1
- Prepare for GH marketplace HOT 4
- Support for any URLs HOT 2
- Swap commander out for yargs HOT 1
- .gimbalrc.yml in root folder being ignored HOT 5
- `audit` command conflicts with yarn|npm audit HOT 1
- Github Comment not appearing HOT 7
- Unable to install gimbal HOT 1
- Not generating lighthouse reports
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gimbal.