Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adjust build commands/exports for packaging #4

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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