Ideas for generating tagged template literals

オープン
#612 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
15/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript, python
領域
compilers

調査の方向性

The request refers to custom-greeting.js on the linked lit-element example page, but names no Transcrypt file or test. Start by comparing that render() use of tagged template literals with Transcrypt’s existing Python-to-JavaScript capabilities, then define how a Python representation should behave and how its generated browser code would be verified.

索引モデルが issue の本文から書いたものです。

説明

STATE: under consideration

Related to my demo on server-side rendering and HyperApp, there's a vastly more interesting idea: lit-html and lit-element. I won't go into it here but will instead work on an example.

One fly in the ointment: tagged template literals have no real equivalent in Python. How might one write the html in the render method of custom-greeting.js on the example page ?


import { LitElement, html } from 'lit-element';

// Create your custom component
class CustomGreeting extends LitElement {
  // Declare properties
  static get properties() {
    return {
      name: { type: String }
    };
  }
  // Initialize properties
  constructor() {
    super();
    this.name = 'World';
  }
  // Define a template
  render() {
    return html`<p>Hello, ${this.name}!</p>`;
  }
}
// Register the element with the browser
customElements.define('custom-greeting', CustomGreeting);
主要言語
Python
スター
2.9k
フォーク
218
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TranscryptOrg/Transcrypt のほかの issue

TranscryptOrg/Transcrypt の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。