Risk-Aware Code Review: Auto Approve Low-Risk Changes
LiveReview LiveReview LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt GitHub Install Now

We'd appreciate a star

Mojolicious::Plugin::AssetPack::Pipe::Vuejs - Process .vue files

Description

       This modules is EXPERIMENTAL and based on homebrewed regexes instead of running the code through an
       external nodejs binary!

       This pipe could get pulled completely from the Mojolicious::Plugin::AssetPack distribution if the problem
       is too hard to solve.

Methods

process
       See "process" in Mojolicious::Plugin::AssetPack::Pipe.

Name

       Mojolicious::Plugin::AssetPack::Pipe::Vuejs - Process .vue files

See Also

       Mojolicious::Plugin::AssetPack.

perl v5.40.0                                       2024-12-07              Mojolicious::P...ck::Pipe::Vuejs(3pm)

Synopsis

       Currently only "script" and "template" is supported. "style" is not yet supported.

       Here is an example ".vue" file:

         <template>
           <h1 :id="id">Example</h1>
           <button @click="toggle" :disabled="loading">{{loading ? "loading" : "click me!"}}</button>
         </template>

         <script>
         var initial = false;
         module.exports = {
           data: function() {
             return {id: id, loading: initial}
           },
           methods: {
             toggle: function() {
               this.loading = !this.loading;
             }
           }
         };
         </script>

       The vuejs file above produces this output:

         (function(){
         var initial = false;
         Vue.component("example", {
           data: function() {
             return {id: id, loading: initial}
           },
           methods: {
             toggle: function() {
               this.loading = !this.loading;
             }
           },
         template: "
           Example
           {{loading ? \"loading\" : \"click me!\"}}
         "}))();

See Also