Comments (9)
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.
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.
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.
You commented more while I was commenting. I will try what you suggest and report back to this thread.
from ngx-perfect-scrollbar.
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.
Why not include the dist files in git? I imagine you have to I include them in the npm package.
from ngx-perfect-scrollbar.
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.
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.
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)
- Native Scrollbars Support in ngx-prerfect-scrollbar HOT 1
- help/question x scrollbar position top
- Scroll to buttom and reduce the contents of the container, the scroll bar will not adapt to changes automatically HOT 1
- scrollbar focusing prevent configuration required
- ngx-perfect-scrollbar works properly in desktop but has some issue in IPad
- update perfect-scrollbar version to support minor releases to prevent scrollTop issues from the perfect-scrollbar package
- Support Angular 13
- Angular 13 ivy. Processing legacy "View Engine" libraries HOT 24
- SCRIPT1002 error in ie11 HOT 1
- Scrollbar is not activated when the 2nd last entry is split across two lines and thee min-scroll-bar-length is set
- update doc for scroll spy usage
- choppy scroll on touch devices
- Scroll not working for nested scroll containers on Mobile device.
- Angular 14: DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
- [Angular 14] not able to import perfect-scrollbar.component.css
- how to set the minHeight of the Scroll bar
- Is it possible to wrap scrollable content inside a fixed div?
- Sticky Header
- Keyboard scroll not working in mat-select
- Sometime Scroll bottom not working it is stack, and notable to scroll. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-perfect-scrollbar.