pstanoev / simple-svelte-autocomplete

Simple Autocomplete / typeahead component for Svelte
http://simple-svelte-autocomplete.surge.sh/
MIT License
464 stars 78 forks source link

Module structure and github package #131

Closed PPP01 closed 2 years ago

PPP01 commented 2 years ago

Hi, I had some trouble to integrate this module by github directly. The main problem was that SimpleAutocomplete.svelte was not compiled and no index.js/mjs were generated.

According to this article, I made some modifications to package.json: https://blog.jim-nielsen.com/2018/installing-and-building-an-npm-package-from-github/

  1. I added "prepare": "npm run build" to scripts
  2. I moved the index.js/mjs to a /dist folder. That's more common structure IMHO.

After these changes, the module from github worked like a normal npm-package. If you like, I make a pull-request.