Skip to content

Prepare to publish as npm package#23

Open
ursm wants to merge 1 commit intoktym:masterfrom
ursm:publish
Open

Prepare to publish as npm package#23
ursm wants to merge 1 commit intoktym:masterfrom
ursm:publish

Conversation

@ursm
Copy link
Copy Markdown

@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
Copy Markdown
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