aichaos / rivescript-js

A RiveScript interpreter for JavaScript. RiveScript is a scripting language for chatterbots.
https://www.rivescript.com/
MIT License
377 stars 145 forks source link

Shell.js is not shipped when installing via npm #329

Closed ErwanDL closed 4 years ago

ErwanDL commented 4 years ago

I created a test RiveScript project in Node.js, and installed the rivescript package using npm install rivescript.

I did not find a way to start the interactive shell (the doc simply says to type node shell.js foldername), so I explored _nodemodules/rivescript/ in my project folder and discovered that the shell.js script is not present in there. The only folders and files there are : dist/, docs/, lib/, src/, Changes.md, LICENSE, package.json, README.md, rivescript.d.ts.

I am not sure if this is intended or not, but to use the interactive shell, I had to download the git code repo as a ZIP and then paste the folder into my project, and can run the shell with node rivescript-js-master/shell.js.

dcsan commented 4 years ago

I think usually the npm module is intended to be used (required) within your own project and used as pure code. the shell.js is for testing things out if you clone the full repo, it has test cases and demo code etc.

ErwanDL commented 4 years ago

Okay, I thought it was supposed to be shipped with the module as well. I think the documentation on the README file is a bit misleading as far as installation/usage is concerned with Node. Maybe I could submit a PR to update the README ?

I also noticed Rivescript doesn't have an official logo icon, would you like me to try and design one ?

kirsle commented 4 years ago

@ErwanDL you could submit a PR to update the README or one that makes the shell.js into an installable binary so it is available as a command after an npm install.

I don't work much with JavaScript apart from this module so it's currently very GitHub-centric and the README reflects instructions from a GitHub point of view rather than npm.

As for logo image, there is the one here in rivescript-wd: https://github.com/aichaos/rivescript-wd/blob/master/RiveScript.svg also used in the aichaos GitHub organization's avatar. Do you mean a logo for the README page? You can go ahead and use that SVG and create a stylish logo if you'd like and send a PR. :smile:

dcsan commented 4 years ago

that logo looks radioactive!

ErwanDL commented 4 years ago

@kirsle I had not seen that logo, it looks awesome ! I'll suggest it to be the official icon for .rive files in Material Icon Theme (maybe with a red background behind it just like the official RiveScript site ?).

I'll try and find a way to make the shell available via npm too, I'll submit a PR if I manage to !

ErwanDL commented 4 years ago

@kirsle I submitted a PR that makes the interactive shell available when installing via npm (#330), I would appreciate if you could review it :)

I also submitted a PR on vscode-material-icon-theme to add icons for .rive scripts and folders containing Rivescript files. They look like this (hope you like them !) :

image

image

image

dcsan commented 4 years ago

maybe you can find another customer for a virus looking logo @ErwanDL 🗡