Hegel initially uses default configuration, but if you want to ignore some files inside your project or tell Hegel that you have a specific environment (Node.js for example) then you need to configure Hegel manually.
To eject default configuration run:
$ hegel initProject initialized.
After the command is executed
.hegelrc file will be created.
.hegelrc uses YAML format. But you have the ability to choose between YAML and JSON.
.hegelrc consists of 4 sections:
String, which defines the specific environment that should be used. For now only "nodejs" and "browser" options exist. By default Hegel will not include any environment.
environment: browser# orenvironment: nodejs
Array of glob-pattern strings that match files to be excluded from analysis. By default Hegel excludes all files in the "node_modules" directory.
exclude:- ./node_modules/**- ./dist/**- specific.js
Array of glob-pattern strings that match files that should be analyzed. By default Hegel will analyze all files that end in
include:- ./**/*.js- ./components/*.jsx- specific.mjs
Array of paths where Hegel should search for typings. Order is important because Hegel will try to find typings for specific libraries in the order they are defined. By default Hegel will first look inside the local directory "@types" and then inside "./node_modules/@types".
If type definitions are placed inside a specific package you should not define this package path inside this configuration section.
types:- ./@types- ./custom-types- ./node_modules/@types- ./node_modules/custom-types
Hegel will first try to find type definitions in the directories specified in the
typesconfiguration section. If type definitions are not found Hegel will search the
node_modulesdirectory. If Hegel can't find type definitions it will infer the types automatically.