npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eatmatic_common

v1.0.41

Published

Eatmatic common is a common library for Eatmatic and Eatmatic Admin containing - model - services - util

Downloads

8

Readme

README

Eatmatic common is a common library for Eatmatic and Eatmatic Client containing

  • model
  • services
  • util

What is this repository for?

Eatmatic common is a common library used by

  • Eatmatic
  • Eatmatic admin

How do I get set up?

Checkout the Eatmatic common repo

git clone https://github.com/gongiskhan/eatmatic-common.git

Create a link to the nodel global repository

cd

sudo npm link
iain:~/development/eatmatic-common$ sudo npm link 
[sudo] password for iain: 
npm WARN @angular/[email protected] requires a peer of zone.js@~0.8.26 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/platform-browser-dynamic@>=6.0.0 <8 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of zone.js@^0.8.0 but none is installed. You must install peer dependencies yourself.
....
....
....
audited 31680 packages in 7.6s
found 0 vulnerabilities

/usr/local/lib/node_modules/eatmatic_common -> /home/iain/development/eatmatic-common

Linking Eatmatic client to eatmatic common


iain:~/development/eatmatic-ionic/src/config$ npm link eatmatic_common
[sudo] password for iain: 
/home/iain/development/eatmatic-ionic/node_modules/eatmatic_common -> /usr/local/lib/node_modules/eatmatic_common -> /home/iain/development/eatmatic-common
iain:~/development/eatmatic-ionic/src/config$ ionic serve

Linking Eatmatic admin to eatmatic common


iain:~/development/eatmatic-admin/$ sudo npm link eatmatic_common
[sudo] password for iain: 
/home/iain/development/eatmatic-ionic/node_modules/eatmatic_common -> /usr/local/lib/node_modules/eatmatic_common -> /home/iain/development/eatmatic-common
iain:~/development/eatmatic-ionic/src/config$ ionic serve

[Development] Building the Dist folder


iain:~/development/eatmatic-admin/$ sudo npm run build

Verification that

Verify that for both eatmatic admin and eatmatic client projects that a symbolic link to the eatmatic common library is created

iain:~/development/eatmatic-ionic-admin$ cd node_modules/
iain:~/development/eatmatic-ionic-admin/node_modules$ ls -al eatmatic_common
lrwxrwxrwx 1 root root 57 Dec  5 08:57 eatmatic_common -> ../../../../../usr/local/lib/node_modules/eatmatic_common
iain:~/development/eatmatic-ionic-admin/node_modules$ 

Contribution guidelines

  • Writing tests
  • Writing docs
  • Code review

Who do I talk to?

  • Repo owner or admin

Gotchas

This section lists common errors issues which one may encounter

Circular dependencies

The following error was found when refactoring Eatmatic admin /client to use Eatmatic common library. The problem was difficult to find. Root cause of the problem was that some Eatmatic service classes have inter dependencies. The order in which service classes appear in Eatmatic common index.ts is important! The order should be children specified first (or those classes with no dependencies), then list of classes with dependencies specified next. Otherwise one would see the following error:

Error: Encountered undefined provider! Usually this means you have a circular dependencies. This might be caused by using 'barrel' index.ts files.
    at syntaxError (http://localhost:8101/build/vendor.js:113430:17)
    at http://localhost:8101/build/vendor.js:123368:40
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver._getProvidersMetadata (http://localhost:8101/build/vendor.js:123353:19)
    at CompileMetadataResolver.getNgModuleMetadata (http://localhost:8101/build/vendor.js:123072:106)
    at JitCompiler._loadModules (http://localhost:8101/build/vendor.js:136260:51)
    at JitCompiler._compileModuleAndComponents (http://localhost:8101/build/vendor.js:136241:36)
    at JitCompiler.compileModuleAsync (http://localhost:8101/build/vendor.js:136201:37)
    at CompilerImpl.compileModuleAsync (http://localhost:8101/build/vendor.js:111829:31)
    at PlatformRef.bootstrapModule (http://localhost:8101/build/vendor.js:4801:25)