ionic-frameworkfabricjscustom-build

How to use fabric js (html5-Canvas Library) custom build in ionic project


I am working in ionic application that enable to create graphics. I am using fabric js letest version 3.2.0 and want ot use touch gesture.

I try to clone fabric js repository into my pc and try to build custom build using following command :

  node build.js modules=ALL

So, build is successful in dist folder, but I don't know how to install it in ionic.

Please help me.


Solution

  • After compare all file in node-module/fabric and my custom build. and I got that both are same. So I put this answer for help.

    Step :

    1. install letest fabric js using cmd : npm install fabric --save

    2. download custom build from fabric js site : http://fabricjs.com/build/

    3. open : ionic-project-folder/node modules/fabric/

    4. replace dist folder Placed inside above path with downloaded custom build (dist folder)

    5. re-serve project.

    If any other solution is possible (like publishing into npm and install) then Please mention.