Skip to content

Commit

Permalink
fix: expose autoloader
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Aug 15, 2023
1 parent 8389f70 commit f524090
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ npm install -ED @specfy/stack-analyser
```

```ts
import { analyser, FSProvider, flatten } from "@specfy/stack-analyser"
import { analyser, FSProvider, flatten, loadAllRules } from "@specfy/stack-analyser"

loadAllRules();
const result = await analyser({
provider: new FSProvider({
path: '/my/repository/path/',
Expand Down
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
"bin": "./dist/cli.js",
"typings": "./dist/index.d.ts",
"type": "module",
"homepage": "https://github.com/specfy/stack-analyser#readme",
"repository": {
"type": "git",
"url": "https://github.com/specfy/stack-analyser.git"
},
"bugs": {
"url": "https://github.com/specfy/stack-analyser/issues"
},
"scripts": {
"prebuild": "ts-node --esm src/scripts/prebuild.ts",
"build:watch": "tsc -w",
Expand Down
9 changes: 8 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
/* eslint-disable import/extensions */
import { analyser } from './analyser/index.js';
import { listIndexed, listTech } from './common/techs.generated.js';
import { rawList, dependencies as dependenciesList } from './loader.js';
import {
rawList,
dependencies as dependenciesList,
loadAllRules,
loadOne,
} from './loader.js';
import { matchDependencies } from './matchDependencies.js';
import {
flatten,
Expand Down Expand Up @@ -55,6 +60,8 @@ export {
export const rules = {
register,
list: registeredRules,
loadAllRules,
loadOne,
};
export const dependencies = {
detect: matchDependencies,
Expand Down

0 comments on commit f524090

Please sign in to comment.