Library upload example files


#1

I’ve upload a library I created, guided by the tutorial for the particle CLI. After some missteps with extra files created during development and work on the examples, I created a separate “purge” folder containing only the files necessary for upload.

Upload mostly works, except that each of the example files appear both under “Files” and under “Examples” In the Web IDE. Everything else seems to be normal. Installing the library in a newly created project in Workbench works correctly, no extra copies of the example files appear.

How did I get the extra copies showing up in the Web IDE, and how can I remove them?

Thanks!
Randy R.


#2

Not quite sure what you mean?
What files would be that. AFAICT there are no special files for the upload but only the files that are actually required for the library (sources plus meta data like library.properties).

Without knowing what you actually uploaded it’s hard to tell.
But judging by the verbal description you may have the library structure not quite right.


#3

Thanks for the response ScruffR.

GitHub repository is here: https://github.com/Randyrtx/EEPROM_Class

Admittedly, this would be easier were my library public, but I’m trying to hold off until I resolve this little annoyance.

Folder structure is shown below. By “purge”, I meant that I had removed all extraneous files/folders (.vscode, project files for the examples, etc.). I keep this separate from the master development folder for the project, but other than the cleanup it’s an exact copy.

In the Web IDE page for the library, the two example source file appear both under the “Files” heading along with the class files, and also under the “Examples” heading where they should be.

It appears to only be a display problem. I can select either example for “Use this example”. If I install the library under Particle workbench, the download library files match the correct folder structure with no extra copies of the example sources.

I plan to publish it later today in any event.

EEPROM_Class
    library.properties
    LICENSE
    README.md
    |------ examples
    |            |    
    |            |---------- advancedUsage
    |            |                        |---------- src
    |            |                                     advancedUsage.cpp
    |            |---------- basicUsage
    |                                    |---------- src
    |                                                  basicUsage.cpp
    |------ src
                     EEPROM_Class.cpp
                     EEPROM_Class.h
                     UserSettingsClass.cpp
                     UserSettingsClass.h

#4

Looking at other libraries the examples are not using a project.properties file nor do they place the sources into a src subfolder.


#5

Brilliant! Moving them out of the examples/src folders took care of it.

Going live soon.

Thanks so much!
Randy R.

Live now at EEPROM_Class