Skip to content
This repository was archived by the owner on Jun 22, 2025. It is now read-only.
This repository was archived by the owner on Jun 22, 2025. It is now read-only.

[Feature Request] Option to set allowed extensions #61

Closed

Description

@EricKotato

Allowed extension list is hardcoded, so it can cause troubles. Mine, for example, that couldn't include local CSS file.

Activity

  1. ChrisKnott commented on Jul 5, 2018

    @ChrisKnott
    Collaborator

    @RadRussianRus the allowed extensions is only for looking for functions that have been exposed, it should still serve .css

  2. EricKotato commented on Jul 5, 2018

    @EricKotato
    Author

    It's strange because local .css wasn't working for me until I commented out this.

  3. brumar commented on Nov 23, 2018

    @brumar

    This is still a relevant feature request to my eyes :)
    I had to manually edit the allowed extensions to make eel work with my transcrypt files (ending up with .py). Something like that would been neat:

    eel.search_in(extensions=[".js", ".html"], folders="./web", recursive=True)
  4. ChrisKnott commented on Nov 26, 2018

    @ChrisKnott
    Collaborator

    @brumar sorry for not replying to several good points you've made.

    I should have some time soon to work on Eel and I will incorporate this change.

    I am hoping to release 1.0 over the Christmas period

  5. brumar commented on Nov 27, 2018

    @brumar

    @ChrisKnott Great ! As you noticed, I am very motivated by this project. I just pushed the repository where I am playing with Transcrypt and Eel : https://github.com/brumar/tranquille. As I wrote in the README I believe Transcrypt is a very good partner to Eel. Let me know if you have an idea of you would like that I contribute. Maybe some tests should be introduced ? Sorry, this is off-subject concerning the issue :)

  6. KyleKing commented on Dec 31, 2018

    @KyleKing
    Contributor

    Setting the searchIn option would also be really useful for me for typescript files

    For example, this is how I handle development/production builds from within the Create-React-App (snippet based on: AnthoniG/eel_react) where an additional option, 'searchIn': ['.tsx', '.ts', '.js', '.html'], would be available:

    def start_eel(develop=True):
        if develop:
            eel.init('src')
            page = {'port': 3000}
            flags = ['--start-fullscreen', '--auto-open-devtools-for-tabs']
        else:
            eel.init('build')
            page = 'index.html'
            flags = ['--start-fullscreen']
    
        eel.start(page, options={
            'searchIn': ['.tsx', '.ts', '.js', '.html'],  # ** Proposed Option **
            'mode': 'chrome-app',
            'port': 8080,
            'host': 'localhost',
            'chromeFlags': flags
        })

    Also, I think it would be useful to add some clarification to the README that eel uses a regular expression eel.expose\((.*)\) to locate the exposed functions. This tripped me up for a few minutes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions