vue-rule-builder icon indicating copy to clipboard operation
vue-rule-builder copied to clipboard

can i use this without npm but with unpkg?

Open coderofsalvation opened this issue 6 years ago • 3 comments

My attempt:

Screenshot 2019-06-05 at 17 09 41

coderofsalvation avatar Jun 05 '19 15:06 coderofsalvation

ps. I do see 'index.min.js' and 'Builder.min.js' in the /dist folder though

coderofsalvation avatar Jun 05 '19 15:06 coderofsalvation

I pushed up a new version which should have this fixed.

blocka avatar Jun 05 '19 15:06 blocka

Thanks for the quick reply. In the meantime i've got this to work, from the top of my mind i did:

  <script src="https://unpkg.com/vue-rule-builder/dist/Builder.min.js"></script>
  <script src="https://unpkg.com/vue-rule-builder/dist/index.min.js"></script>
  <link rel="stylesheet" src="https://unpkg.com/vue-rule-builder/dist/styles.css"></script>

and in vue components I did:

             {   
               ....
               components:{
                      rulebuilder: vueRuleBuilder.RuleBuilder
               } 

as well as mocking require:

  window.require = function(x){
    if( x == './Builder' ) return vueRuleBuilder.RuleBuilder
   }

I will look at your modifications and update my code accordingly. Thanks!

coderofsalvation avatar Jun 05 '19 15:06 coderofsalvation