Changeset 1490 in genappalpha


Ignore:
Timestamp:
Jul 19, 2018, 11:28:35 AM (2 years ago)
Author:
ehb
Message:

Pull module definitions with structure into extra_subs

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • bin/genapp_run.pl

    r1421 r1490  
    411411                        my $enc_mod_json = $js->encode( get_file_json_lang_specific( $module_to_file{ $l }{ $$rplc_menu{ 'menu:modules:id' } }, $l, 1 ) );
    412412                        grep s/__modulejson__/$enc_mod_json/g, @l;
     413                    }
     414
     415                    foreach my $sub ( keys %extra_subs ) {
     416                        print "doing extra sub $sub to $extra_subs{$sub}\n";
     417                        grep s/$sub/$extra_subs{$sub}/g, @l;
    413418                    }
    414419
  • etc/perl/genapp_util.pl

    r1480 r1490  
    732732    }
    733733
     734    # remove tags with structures and store in last_json
     735
     736    if ( $$json{ 'dependencies' } ) {
     737        print "found dependencies\n";
     738        my $js = JSON->new;
     739        $extra_subs{ '__dependencies__' } = $js->encode( $$json{ 'dependencies' } );
     740        delete $$json{ 'dependencies' };
     741    } else {
     742        delete $extra_subs{ '__dependencies__' };
     743    }
     744       
    734745    $json;
    735746}
  • etc/reserved_words

    r1281 r1490  
    8787config
    8888text
     89dependencies
Note: See TracChangeset for help on using the changeset viewer.