question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

latest version to npm

See original GitHub issue

Hi, Is it possible to publish the latest version of railroad-diagrams to npm?

On npm version 1.0.0, the NonTerminal function is

function NonTerminal(text)

however in the git repository it is

function NonTerminal(text, href)

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
gertsonderbycommented, Nov 22, 2016

Also, version-number tagged releases would be nice, so people don’t have to depend on a commit hash.

0reactions
rparreecommented, May 18, 2022

I ended up with the following solution;

<script type="module">
    import("./railroad.js").then(rr => {
        Object.assign(window, rr.default)
        document.querySelectorAll("script[type='application/railroad']").forEach(s => {
            const r = eval(s.innerHTML)
            const div = document.createElement("div")
            div.classList.add("railroad-diagram")
            r.addTo(div)
            s.replaceWith(div)
        })
    })
</script>
<script type="application/railroad">
    Diagram("test")
</script>
Read more comments on GitHub >

github_iconTop Results From Across the Web

npm - a JavaScript package manager
Latest version: 9.2.0, last published: 15 days ago. Start using npm in your project by running `npm i npm`. There are 5230 other...
Read more >
Try the latest stable version of npm
See what version of npm you're running. npm -v ... You can upgrade to the latest version of npm using: npm install -g...
Read more >
Updating your published package version number - npm Docs
To change the version number in package.json , on the command line, in the package root directory, run the following command, replacing <update_type>...
Read more >
get-latest-version - npm
Find the latest version of an npm module matching a given semver range. Latest version: 4.0.0, last published: 10 months ago.
Read more >
Updating packages downloaded from the registry - npm Docs
Updating local packages · Navigate to the root directory of your project and ensure it contains a package.json file: cd /path/to/project · In...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found