Skip to content

[Package] Add script to package up assembleVegaLite() functionality for use in peer projects - #8

Closed
Alper Sarikaya (yelper) wants to merge 1 commit into
mainfrom
dev/yelper/package-vlCompiler
Closed

[Package] Add script to package up assembleVegaLite() functionality for use in peer projects#8
Alper Sarikaya (yelper) wants to merge 1 commit into
mainfrom
dev/yelper/package-vlCompiler

Conversation

@yelper

Copy link
Copy Markdown
Collaborator

Adds (Copilot-generated) script to generate a *.tgz npm package so that functionality can be imported in peer projects. This "flint-chart-compiler" project only exports the assembleVegaLite() function and associated functionality/types.

Trigger a build by changing the version in "compiler.package.json", then running the following script:

npm run pack:compiler
# → produces microsoft-flint-chart-compiler-0.1.0.tgz

Copy the tarball to the repository wanting to use the functionality, and import the package as a dependency:

pnpm add microsoft-flint-chart-compiler-0.1.0.tgz

Once the package is added, then the package can be referenced by name in that respository, e.g.:

import { assembleVegaLite } from '@microsoft/flint-chart-compiler';
import type { ChartAssemblyInput } from '@microsoft/flint-chart-compiler/core';

Once we figure out publishing to npm by going through the Microsoft open-source process, peer repositories can just add the dependency by name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants