-
Notifications
You must be signed in to change notification settings - Fork 0
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
Include in angular project #2
Comments
Hi @aaweb, Currently we (GetMoreBrain) don't integrate the bitmark-grammar in our front-end; we only use it from server-side only, so I don't have experience in setting this up. Maybe @nodayoshikazu can help more with setting this up? not sure...
Indeed, the readme is not up to date so it can be confusing. We can have 2 approaches with this:
Regarding the packages, we keep the packages in GitHub: https://github.com/bitmark-standard/bitmark-grammar/pkgs/npm/bitmark-grammar - we'll remove the npmjs package so please you can use |
Very fair answer, @stefanszasz! However, let's keep the npmjs package up as it's the most common way for packages to be downloaded. @aaweb, we're working on bringing npmjs in line with the current version. |
Tim,
Okay I deleted the public bitmark-parser package, and then tried to
re-create the same name package with cleaned up code. I then got below
error when I ran "npm publish". It seems like an expected behavior of
public package manipulation.So in order to circumvent it. I created public
package with the name *"bitmark-grammar2". *It is published now and it no
longer has the webpack directory when installed. I maybe able to reinstate
the "bitmark-grammar" package after 24 hours but for now it can't be done.
…-------------
npm notice === Tarball Details ===
npm notice name: bitmark-grammar
npm notice version: 1.0.34
npm notice filename: bitmark-grammar-1.0.34.tgz
npm notice package size: 6.6 MB
npm notice unpacked size: 40.0 MB
npm notice shasum: 719c8d251788077b97ec4757153b1a8714400322
npm notice integrity: sha512-SI/w3NKLGMq0G[...]96wJaoWXxXMJQ==
npm notice total files: 1267
npm notice
npm notice Publishing to https://registry.npmjs.org/ with tag latest and
default access
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/bitmark-grammar
- bitmark-grammar cannot be republished until 24 hours have passed.
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.
npm ERR! A complete log of this run can be found in:
npm ERR!
/Users/nodayoshikazu/.npm/_logs/2023-03-21T11_38_43_882Z-debug-0.log
nodayoshikazu-no-MacBook-Pro:bitmark-grammar.1 nodayoshikazu$
2023年3月21日(火) 20:26 Timothy Lim ***@***.***>:
Very fair answer, @stefanszasz <https://github.com/stefanszasz>! However,
let's keep the npmjs package up as it's the most common way for packages to
be downloaded. @aaweb <https://github.com/aaweb>, we're working on
bringing npmjs in line with the current version.
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG5NQ2WV4WU7TXUZOBZWILW5GGADANCNFSM6AAAAAAV6ROVDA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Very fair answer, @stefanszasz <https://github.com/stefanszasz>! However,
let's keep the npmjs package up as it's the most common way for packages to
be downloaded. @aaweb <https://github.com/aaweb>, we're working on bringing
npmjs in line with the current version.
What? We need to reinstate the ES5 bundle version?
2023年3月21日(火) 20:26 Timothy Lim ***@***.***>:
… Very fair answer, @stefanszasz <https://github.com/stefanszasz>! However,
let's keep the npmjs package up as it's the most common way for packages to
be downloaded. @aaweb <https://github.com/aaweb>, we're working on
bringing npmjs in line with the current version.
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG5NQ2WV4WU7TXUZOBZWILW5GGADANCNFSM6AAAAAAV6ROVDA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @nodayoshikazu, let's take this internally. |
You mean the public package remain as commonjs version, and build a bundle
version internally?
2023年3月21日(火) 21:02 Timothy Lim ***@***.***>:
… Hi @nodayoshikazu <https://github.com/nodayoshikazu>, let's take this
internally.
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG5NQ262RIYGGJBSK4GZ23W5GKD7ANCNFSM6AAAAAAV6ROVDA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hey guys Thanks for checking and the info. I tried both using the normal
I assume this is because you are still working on getting it back into the npm registy. Please let me know once there is a way to get it via npm or even just another way to add it to my project to test it with. You can also write me on Hackathon Slack (Andy Abgottspon) |
Hi @aaweb, In the meantime @nodayoshikazu made the package available on npmjs.com (https://www.npmjs.com/package/bitmark-grammar) based on @timothyylim 's input:
In any case, the 404 problem you were describing has to do with the default way of npm searching for packages in npmjs.com. Since this package was served from GitHub, you can create your |
Thanks so much, guys. This now worked and I could install it as expected! In my use case, I would need bitmark to be on the client side (Angular app). This would be entirely possible from what I can tell in the source, the only problem seems to be the dependency to 'fs', which I don't think is needed if you pass in a string and not read it from the file system. Would this be something for you guys to consider? My use case will be to use an AI language model to print back Bitmark in real-time and parse/show this on the page. I already got this working with Markdown where I wrote my own Markdown to JSON parser, so this should be pissible. |
Hi Andy,
We already have a ES5 js bundle to be used on the client side. The
bitmark-grammar used to include it but we have removed it recently. So we
already have it. It is only a matter of how to package it and provide it to
the users.
The "fs" module is only used to read a file content when the parse()
argument is a filepath. We can easily change that to accept text only. It
isn't an issue.
Cheers,
-yoshi
2023年3月23日(木) 7:50 Andy Abgottspon ***@***.***>:
… Thanks so much, guys. This now worked and I could install it as expected!
In my use case, I would need bitmark to be on the client side (Angular
app). This would be entirely possible from what I can tell in the source,
the only problem seems to be the dependency to 'fs', which I don't think is
needed if you pass in a string and not read it from the file system. Would
this be something for you guys to consider?
My use case will be to use an AI language model to print back Bitmark in
real-time and parse/show this on the page. I already got this working with
Markdown where I wrote my own Markdown to JSON parser, so this should be
pissible.
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG5NQ2IOQ5GMXGTCTKSBYLW5N6Z7ANCNFSM6AAAAAAV6ROVDA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hey Yoshi That would be amazing. Is there a way I can already use this during the Bitmark hackathon this weekend? Even if it's not already super packaged and everything, I could just hack it in as long as we can get it running (probably would not even have to be the most recent version, whatever works for you). |
Hi Andy,
Okay, please let me create a new bundle outside of the current CommonJS
code set. I will send you the bundle when it is built.
…-yoshi
2023年3月24日(金) 16:30 Andy Abgottspon ***@***.***>:
Hey Yoshi
That would be amazing. Is there a way I can already use this during the
Bitmark hackathon this weekend?
Even if it's not already super packaged and everything, I could just hack
it in as long as we can get it running (probably would not even have to be
the most recent version, whatever works for you).
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG5NQ5S2HI7PXHANJ7CZWLW5VERZANCNFSM6AAAAAAV6ROVDA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Andy, I sent you the package via slack. |
Let's publish this in the future for everybody and update the readme accordingly.
Looks like there is a need for it.
… On 24 Mar 2023, at 10:42, Noda Yoshikazu ***@***.***> wrote:
Andy, I sent you the package via slack.
—
Reply to this email directly, view it on GitHub <#2 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AJTBAKUYE4RUXNQL4EOJ2ALW5VT6RANCNFSM6AAAAAAV6ROVDA>.
You are receiving this because you are subscribed to this thread.
---
Thomas Gabathuler, Founder
https://www.linkedin.com/in/thomas-gabathuler/
www.getmorebrain.com
«Let’s make learning your competitive advantage»
|
Yeah Gaba that will be nice.
However we need to think carefully on how to prepare the two packages. The
ES5 version and the commonjs version share the same source code with slight
differences. I used to create mjs files from js manually. It would be a
problem if we put each in different repos.
2023年3月24日(金) 18:44 Thomas Gabathuler ***@***.***>:
… Let's publish this in the future for everybody and update the readme
accordingly.
Looks like there is a need for it.
> On 24 Mar 2023, at 10:42, Noda Yoshikazu ***@***.***> wrote:
>
>
> Andy, I sent you the package via slack.
>
> —
> Reply to this email directly, view it on GitHub <
#2 (comment)>,
or unsubscribe <
https://github.com/notifications/unsubscribe-auth/AJTBAKUYE4RUXNQL4EOJ2ALW5VT6RANCNFSM6AAAAAAV6ROVDA
>.
> You are receiving this because you are subscribed to this thread.
>
---
Thomas Gabathuler, Founder
https://www.linkedin.com/in/thomas-gabathuler/
www.getmorebrain.com
«Let’s make learning your competitive advantage»
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG5NQYPEUMRFH4R2BLBIWTW5VUGTANCNFSM6AAAAAAV6ROVDA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I see. So let's put them in the same repo and document this carefully.
… On 24 Mar 2023, at 10:52, Noda Yoshikazu ***@***.***> wrote:
Yeah Gaba that will be nice.
However we need to think carefully on how to prepare the two packages. The
ES5 version and the commonjs version share the same source code with slight
differences. I used to create mjs files from js manually. It would be a
problem if we put each in different repos.
2023年3月24日(金) 18:44 Thomas Gabathuler ***@***.***>:
> Let's publish this in the future for everybody and update the readme
> accordingly.
> Looks like there is a need for it.
>
> > On 24 Mar 2023, at 10:42, Noda Yoshikazu ***@***.***> wrote:
> >
> >
> > Andy, I sent you the package via slack.
> >
> > —
> > Reply to this email directly, view it on GitHub <
> #2 (comment)>,
> or unsubscribe <
> https://github.com/notifications/unsubscribe-auth/AJTBAKUYE4RUXNQL4EOJ2ALW5VT6RANCNFSM6AAAAAAV6ROVDA
> >.
> > You are receiving this because you are subscribed to this thread.
> >
>
> ---
>
> Thomas Gabathuler, Founder
> https://www.linkedin.com/in/thomas-gabathuler/
>
> www.getmorebrain.com
>
> «Let’s make learning your competitive advantage»
>
> —
> Reply to this email directly, view it on GitHub
> <#2 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAG5NQYPEUMRFH4R2BLBIWTW5VUGTANCNFSM6AAAAAAV6ROVDA>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub <#2 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AJTBAKUN7POIJVY3YOL3BXLW5VVHLANCNFSM6AAAAAAV6ROVDA>.
You are receiving this because you commented.
---
Thomas Gabathuler, Founder
https://www.linkedin.com/in/thomas-gabathuler/
www.getmorebrain.com
«Let’s make learning your competitive advantage»
|
Hey guys
Great project! I had a chat with Thomas Gabathuler about integrating this into one of our Angular apps.
However, I struggle to add it to my Angular 15 project.
I tried with various "target" settings in the compiler options of the "tsconfig.json", but no luck.
Do you have any recommended settings for the target and module?
On https://github.com/bitmark-standard/bitmark-grammar the Last Update is on 13 March 2022 with version 1.0.32. On npm and when I do normal "npm i bitmark-grammar" I get 1.0.4, which is also on https://www.npmjs.com/package/bitmark-grammarsteht.
Kind regards
The text was updated successfully, but these errors were encountered: