Khertan Khertan - 2 years ago 98
AngularJS Question

Using easy-fit in an angularjs application without requirejs

I m trying to use a js library easy-fit ( in an angularjs application (

Easy-fit use gulp, babel. And i would like to transpil and compile to a unique javascript file.

How can i use gulp-babel to transpile without require call ?

Thank you,

Answer Source

After reading documentation

There is no requirejs dependancy at all.

But as there is some require() call in the lib which is a node method, browserify the lib is required...

How i ve made and used the lib

$ browserify easy-fit.js --standalone easy-fit > easy-fit.bundle.js

Include it in your index.html :

<script src="lib/easy-fit.bundle.js"></script>

And now call it in your javascript :

var EasyFit = window.easyFit.default;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download