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

Prepare to publish as npm package #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ursm
Copy link

@ursm ursm commented Oct 9, 2020

I have prepared to publish d3sparql.js as npm package.

It automatically generates Node.js build (dist/d3sparql.cjs) and browser build (dist/d3sparql.js) from the source code using the ECMAScript module (src/d3sparql.mjs). This is a similar mechanism to sparql-support.

There is already a library named d3-sparql, and npm didn't allow us to give it a similar name. Hence the name of this package is @ktym/d3sparql.

As an example, here's how to use this package from TogoStanza:

$ npm install @kytm/d3sparql
// stanzas/foo/index.js
import d3sparql from '@ktym/d3sparql';

After merging the pull request, follow these steps:

  1. npm version minor: Increment the package version (0.0.0 -> 0.1.0 in this case), commit and create a git tag
  2. git push --tags: Push that commit and tag to GitHub
  3. npm publish --access public: Submit this package to the npm registry

@ursm
Copy link
Author

ursm commented Oct 9, 2020

If you want to try it out locally before merging, you can install it with the following command:

$ npm install 'ursm/d3sparql#publish'

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.

1 participant