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

NPM Release #40

Merged
merged 24 commits into from
Nov 1, 2023
Merged

NPM Release #40

merged 24 commits into from
Nov 1, 2023

Conversation

zampino
Copy link
Collaborator

@zampino zampino commented Oct 31, 2023

  • adjust for NPM release
  • update usage in README and landing page
  • add squint build snapshot with import-from-CDN demo

@zampino zampino marked this pull request as ready for review November 1, 2023 13:44
@zampino zampino requested review from borkdude and mk November 1, 2023 14:50
README.md Outdated
@@ -35,6 +35,25 @@ Enabling a decent Clojure/Script editor experience in the browser. Built for and
{:deps {io.github.nextjournal/clojure-mode {:git/sha "<SHA>"}}}
```

### Use if from [NPM](https://www.npmjs.com/package/@nextjournal/clojure-mode)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use if?

@zampino zampino merged commit 06f1920 into main Nov 1, 2023
3 checks passed
@zampino zampino deleted the npm-release branch November 1, 2023 15:02
@sstraust
Copy link

sstraust commented Nov 4, 2023

I tried using this today, and I'm getting the error:

(!) Plugin node-resolve: Could not resolve import "@nextjournal/clojure-mode" in /Users/sam/sstraust/newsViewer/newsjs/resources/codemirror_editor.js using exports defined in /Users/sam/sstraust/newsViewer/newsjs/resources/node_modules/@nextjournal/clojure-mode/package.json. Invalid mapping: "dist/nextjournal/clojure_mode.mjs".

(I'm new in this area, so I could be missing something obvious)

@borkdude
Copy link
Contributor

borkdude commented Nov 4, 2023

@sstraust Is it possible for you to put out a github repo with a repro of your problem?

@borkdude
Copy link
Contributor

borkdude commented Nov 4, 2023

Perhaps this is the bug:

rollup/plugins#886 (comment)

@sstraust Could you try editing node_modules/@nextjournal/clojure-mode/package.json and edit the "exports"field by adding./in front ofdist`, to see if this fixes it?

@sstraust
Copy link

sstraust commented Nov 4, 2023

yes! adding ./ in the suggested place removed the error warning from my build

borkdude added a commit that referenced this pull request Nov 4, 2023
@borkdude borkdude mentioned this pull request Nov 4, 2023
@mk
Copy link
Member

mk commented Nov 5, 2023

I've published 0.2.0 on npm. Please let us know if that resolves your issue, thanks!

@sstraust
Copy link

sstraust commented Nov 5, 2023

yep! it now works for me! Thanks for the speedy fix!

(I edited package.json to use "^0.2.0", then ran:

  $ rm -r node_modules/

  $ npm install

  $ npx rollup codemirror_editor.js -f iife -o dist/cm6.bundle.js -p @rollup/plugin-node-resolve --output.name cm6

)

compilation ran with no warnings, and I am able to see the editor in my browser.

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.

4 participants