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

Publish to npm #10

Open
jerivas opened this issue Dec 2, 2019 · 15 comments
Open

Publish to npm #10

jerivas opened this issue Dec 2, 2019 · 15 comments
Assignees
Labels
enhancement New feature or request

Comments

@jerivas
Copy link

jerivas commented Dec 2, 2019

Would love to be able to npm install flowy to use with bundlers and unpkg.com

https://zellwk.com/blog/publish-to-npm/

@alyssaxuu alyssaxuu self-assigned this Dec 2, 2019
@alyssaxuu alyssaxuu added the enhancement New feature or request label Dec 2, 2019
@alyssaxuu alyssaxuu pinned this issue Dec 7, 2019
@DanielRuf
Copy link

Would be also good to have src and dist folders and some CI setup.

Could you need some asistance with this?

@alyssaxuu alyssaxuu unpinned this issue Dec 9, 2019
@joelvh
Copy link
Contributor

joelvh commented Mar 1, 2020

#37 is ready to merge to get this in place

@joelvh
Copy link
Contributor

joelvh commented Apr 22, 2020

@jerivas https://www.npmjs.com/package/flowy-engine has been published. v2 is in the works as a new NPM release in the future.

@AsimNet
Copy link

AsimNet commented Jun 17, 2020

@joelvh
Hello, I did this:
npm i flowy-engine
but no luck
image
ERROR in libs/author/src/lib/prototype/editor.component.ts:8:24 - error TS2307: Cannot find module 'flowy-engine'.

@DanielRuf
Copy link

@AsimNet please check the error, your Node version and that you import the module, not the main entry. See also https://unpkg.com/browse/[email protected]/package.json.

@AsimNet
Copy link

AsimNet commented Jun 17, 2020

could you please give me an example?
@DanielRuf

@DanielRuf
Copy link

@AsimNet try import * as flowy from 'flowy-engine/flowy-engine.mjs.

@AsimNet
Copy link

AsimNet commented Jun 17, 2020

same thing
ERROR in libs/author/src/lib/prototype/editor.component.ts:8:24 - error TS2307: Cannot find module 'flowy-engine/flowy-engine.mjs'.

@DanielRuf

@AsimNet
Copy link

AsimNet commented Jun 17, 2020

@DanielRuf
Copy link

Did you install it? Please check the content of your node_modules/flowy-engine. The source repo has nothing to do with the code on npmjs / unpkg (where you can see what you should have in your node_modules).

@DanielRuf
Copy link

same thing

You didn't specify the exact error before, you provided only a screenshot of a text with a red line under it which is not that helpful.
Please check your node_modules folder to see which files can be imported / required.

@DanielRuf
Copy link

It works for me:

➜  flowy-test npm i flowy-engine
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

+ [email protected]
added 1 package from 3 contributors and audited 1 package in 2.019s
found 0 vulnerabilities

➜  flowy-test code .
➜  flowy-test cat index.mjs 
import * as flowy from 'flowy-engine/flowy-engine.mjs';

console.log(flowy);%   
➜  flowy-test node --version
v10.16.3
➜  flowy-test nodenv versions
  system
  6.17.1
  8.16.0
  8.17.0
  9.11.2
  10.16.0
* 10.16.3 (set by /Users/danielruf/.nodenv/version)
  12.13.0
  13.5.0
➜  flowy-test nodenv local 13.5.0
➜  flowy-test node index.mjs 
(node:7408) ExperimentalWarning: The ESM module loader is experimental.
[Module] { default: [Function: e] }

@vicmosin
Copy link

Is the https://github.com/joelvh/flowy-engine "official" fork of npm feature?

@joelvh do you have any examples of the usage?

@DanielRuf
Copy link

Yes, it is linked at https://www.npmjs.com/package/flowy-engine

@joelvh
Copy link
Contributor

joelvh commented Feb 28, 2021

@vicmosin it's outdated and I decided not to pursue the work I started back then because there wasn't a desire by the maintainer to bring my updates into the project. I'm effectively waiting to see how much more the project gets updated, and if there's a desire in the future to use more tooling and accept contributions such as ES6 and so on.

However, it is a usable version from that point in time. The README has directions to build and run the demo. And there's the demo build in the repository as well.

For what it's worth, there's a React implementation as well that works in its own branch. And I was ambitious to refactor the whole thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants