Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow use with lazy loading library #178

Open
DerekLiang opened this issue Aug 24, 2016 · 0 comments
Open

allow use with lazy loading library #178

DerekLiang opened this issue Aug 24, 2016 · 0 comments

Comments

@DerekLiang
Copy link

DerekLiang commented Aug 24, 2016

Here is the sample javascript source code with ocLazyLoad at https://github.com/ocombe/ocLazyLoad/blob/master/examples/complexExample/js/app.js

I cut and paste the relevant part below:

return $ocLazyLoad.load([
                'bower_components/bootstrap/dist/css/bootstrap.css', // will use the cached version if you already loaded bootstrap with the button
                'bower_components/ocModal/dist/css/ocModal.animations.css',
                'bower_components/ocModal/dist/css/ocModal.light.css',
                'bower_components/ocModal/dist/ocModal.js',
                'partials/modal.html'
              ])

I am wondering if I can minify the css and javascript files that are referenced in a javascript file.

In detail, if I write the instructions in the comments as the following:

return $ocLazyLoad.load([
                //<!-- build:css vender.css -->
                'bower_components/bootstrap/dist/css/bootstrap.css', // will use the cached version if you already loaded bootstrap with the button
                'bower_components/ocModal/dist/css/ocModal.animations.css',
                'bower_components/ocModal/dist/css/ocModal.light.css',
                //<!-- endbuild -->

                <!-- build:js scripts/vendor.js -->
                'bower_components/ocModal/dist/ocModal.js',
                //<!-- endbuild -->

                'partials/modal.html'
              ])

it will get compiled into:

return $ocLazyLoad.load([
                 "vender.78483ea.css", 

                 "scripts/vendor.c2392b.js",

                'partials/modal.html'
              ])

Thank you for your help in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant