Coder Social home page Coder Social logo

Comments (9)

monstrfolk avatar monstrfolk commented on July 17, 2024

I have also tried cloning my forked repo manually into node_modules of the example app and then building the ngx-perfect-scroll module. After the modules builds I then tried to build the example app with no luck.

Can a maintainer please post the correct steps to npm install from git repo and build the module for usage in example app?

from ngx-perfect-scrollbar.

sconix avatar sconix commented on July 17, 2024

Just normal npm install & npm start in the example app directory is needed after cloning the repository nothing else. If you are using the build library in the example app or another via npm link for example then for building the library you need to run 'npm run build' and 'npm run inline' (in the root directory) after the build for the library to work in webpack projects. The build process is working at least in Linux / OS X environments, don't have access to Windows machine so I am not sure if it needs something special.

So in short, just clone the repository, run 'npm run build' and 'npm run inline' and then link the library into your project by using npm link for example or manually copying the folder. So only the 'npm run inline' is the unstandard step since I haven't yet found proper clean solution for the build process to do the inlining of templates.

from ngx-perfect-scrollbar.

monstrfolk avatar monstrfolk commented on July 17, 2024

Hi sconix,

Thanks for the information. I can build the example without problems if I do not change the ngx-perfect-scrollbar dependency. When I fork ngx-perfect-scrollbar and change the dependency in package.json for the example app I have problems cause npm install ignores the source files and also does not build the dependency.

from ngx-perfect-scrollbar.

monstrfolk avatar monstrfolk commented on July 17, 2024

You commented more while I was commenting. I will try what you suggest and report back to this thread.

from ngx-perfect-scrollbar.

sconix avatar sconix commented on July 17, 2024

Yes you can not install the library directly from git since I don't include the build files in git. So you need to clone and build the library and then use it via npm link or what ever way is suitable for you.

I noticed that my readme has bit old info about the building, will update it to match the inline bit and will check if there is a way to do it with the angular compiler nowadays.

from ngx-perfect-scrollbar.

monstrfolk avatar monstrfolk commented on July 17, 2024

Why not include the dist files in git? I imagine you have to I include them in the npm package.

from ngx-perfect-scrollbar.

sconix avatar sconix commented on July 17, 2024

Well its not proper git usage to include build files in git. At least it is not encouraged and haven't seen any other projects doing that neither. I don't know if there exists a way to setup the repository so that npm install from git would run the build steps etc. at least I haven't seen such a setup.

from ngx-perfect-scrollbar.

monstrfolk avatar monstrfolk commented on July 17, 2024

I have seen other packages include built files...for example https://github.com/vimeo/player.js/. I don't see any way around this to allow a person to pull directly from git.

For your project...I would like to add outputs for perfect-scrollbar events to the component and directive. Is this something that could be added to your project? If so, I will create a pull request after I test everything.

from ngx-perfect-scrollbar.

sconix avatar sconix commented on July 17, 2024

Yes there are projects who include build files in the git, but imho its not good practice (this is also the mainstream view so not just mine). There seems to be npm packages for adding posinstall routines for making git install possible, but I don't see the point since the normal npm package local development way is to use the npm link and not installing directly from git.

Adding the outputs that have been named according angular best practices is on the todo list so PR is more than welcomed. I have it on the other libs already, but this has been missing since it has been possible to listen the events from perfect scrollbar so its not that critical to have the angular style events.

from ngx-perfect-scrollbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.