Programmatic API

Đang mở
#889 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, python
Lĩnh vực
api, compilers

Hướng nghiên cứu

No files or tests are named. Start by checking whether the proposed compilationApi.compile entry point exists and tracing how Transcrypt currently compiles a module; define the public API and its handling of imported modules for the live-reload use case, then document and test the supported behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Does transcrypt have a programmatic API?

I'd like to do something like this for a live-reload server:

from transcrypt import compilationApi
def requestHandler(req):
    # Suppose browser has made request to download localhost:3000/code/myproject.module.js
    moduleName = req.path.replace("/code/", "").replace(".js", "") # I know this logic is wrong, just simple for example
    return Response.text(compilationApi.compile(moduleName)).contentType("application/javascript")

If the compiled .js for myproject.module contains any import statements, they'll trigger other HTTP requests from the browser which will trigger other calls to requestHandler to compile those modules.

Ngôn ngữ chính
Python
Star
2.9k
Fork
218
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TranscryptOrg/Transcrypt

Tất cả issue của TranscryptOrg/Transcrypt

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.