tajmone / Sublime-PML

Sublime Text 4 syntax for PML (Practical Markup Language)
https://tajmone.github.io/Sublime-PML/
MIT License
4 stars 0 forks source link

Add Developers' Assetes Folder #12

Open tajmone opened 3 years ago

tajmone commented 3 years ago

Add a _dev/ folder to collect developers and maintainers' assets and documents, which should be excluded from the final package shipped via Package Control.

I'm not sure whether it's possible to exclude some files and folders from the final packed package on Package Control. I have a vague recollection that there used to be some JSON settings to handle this, but I might be wrong or this might no longer be the case.

Devs/maintainers' assets don't really need to be included in the auto-installed package, it's a waste of space; they should only be available when cloning the repository via Git.

tajmone commented 3 years ago

Ignoring Package Files

The Creating Package Files page of the Package Control documentation mentions various Package Profiles settings that allow to exclude certain files and folders from the final .sublime-package archive (packed package):

The instructions are for custom repository hosting instead of using GitHub or BitBucket, so I don't think they apply to normal packages delivered by Package Control — there doesn't seem to be an equivalent settings file for a package repository intended to be delivered via the official channel.

Package Profiles

Profiles refer to the Package Control package that's bundled with ST, i.e. settings that the users can tweak via the Preferences » Package Settings » Package Control » SettingsDefault/User menus.

The file allows a package_profiles setting:

E.g., this is the default profile:

{
    "Binaries Only": {
        // Exclude all .py files, but consequently include all .pyc files
        "files_to_ignore": [
            "*.py", ".hgignore", ".gitignore", ".bzrignore",
            "*.sublime-project", "*.sublime-workspace", "*.tmTheme.cache"
        ],

        // Include __init__.py so Sublime Text will load the package
        "files_to_include": [
            "__init__.py"
        ]
    }
}