Skip to content

Commit

Permalink
Merge pull request #4 from grafana/chore/build-adjustments
Browse files Browse the repository at this point in the history
chore: adjust build commands/exports for packaging
  • Loading branch information
jewbetcha authored Nov 25, 2024
2 parents b305c73 + ba13f06 commit 91e4146
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ The library in this directory is an effort to reduce the potential toil involved

## Examples

```ts
import { promql, Expression } from 'tsqtsq';
```

`sum`

```ts
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"description": "A reusable and composable query library for Prometheus",
"keywords": ["prometheus", "promql", "typescript", "query", "javascript"],
"author": "Grafana Labs",
"types": "dist/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/grafana/tsqtsq"
Expand All @@ -20,6 +21,6 @@
"scripts": {
"test": "jest",
"test:watch": "jest --watch",
"build": "esbuild src/index.ts --bundle --outfile=dist/index.js "
"build": "esbuild src/index.js --bundle --platform=node --outfile=dist/index.js "
}
}
9 changes: 9 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { promql } from './promql';
import { Expression } from './expression';
import { MatchingOperator } from './types';

module.exports = {
promql,
Expression,
MatchingOperator,
};
5 changes: 0 additions & 5 deletions src/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */

/* Emit */
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
Expand Down

0 comments on commit 91e4146

Please sign in to comment.