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

Installation instructions incomplete #145

Open
jonathanhaglund opened this issue May 11, 2018 · 2 comments
Open

Installation instructions incomplete #145

jonathanhaglund opened this issue May 11, 2018 · 2 comments

Comments

@jonathanhaglund
Copy link

The installation instructions just say to execute "npm install talisman" but don't say what is necessary after that.

On Node 8.11, "const talisman = require('talisman')" throws "Error: cannot find module 'talisman'"

The usage documentation uses the "import" feature that is not yet supported on the current LTS, so some hints about how to get going would be greatly appreciated.

@Yomguithereal
Copy link
Owner

Just replace any import statement by a require, likewise:

import alphaSis from 'talisman/phonetics/alpha-sis';
// translates to
var alphaSis = require('talisman/phonetics/alpha-sis');

@jonathanhaglund
Copy link
Author

I figured that out about 30 minutes ago, but I still recommend updating the Installation section of the readme to be something like (forgive any incorrect terms):

Install using "npm install talisman"

Note on ES6 Modules and "import": This project is written using ES6 modules. If your engine does not support this feature yet (i.e. Node 8.11 LTS), replace the import statements in the documentation with require ones.

import alphaSis from 'talisman/phonetics/alpha-sis';
// translates to
var alphaSis = require('talisman/phonetics/alpha-sis');

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

No branches or pull requests

2 participants