Skip to content

Instantly share code, notes, and snippets.

@TheJaredWilcurt
Created October 17, 2016 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheJaredWilcurt/28f34ac39edf5484ff784066793fc57e to your computer and use it in GitHub Desktop.
Save TheJaredWilcurt/28f34ac39edf5484ff784066793fc57e to your computer and use it in GitHub Desktop.

Thanks for posting. I'll clear up a little bit about how the FTUX currently works and the project auto-guesser.

FTUX

  1. The app loads, sees you don't have any projects in your saved settings file (or no save settings file).
  2. The sidebar and project view are hidden. The FTUX view is displayed.
  3. We scan the following directories on the user's computer: (Just using Windows for this example, but we check for the same things on each OS)
  • C:\Users\USERNAME\github
  • C:\Users\USERNAME\projects
  • C:\Users\USERNAME\repositories
  • C:\Users\USERNAME\repos
  • C:\Users\USERNAME\websites
  • C:\Users\USERNAME\Documents\github
  • C:\Users\USERNAME\Documents\projects
  • C:\Users\USERNAME\Documents\repositories
  • C:\Users\USERNAME\Documents\repos
  • C:\Users\USERNAME\Documents\websites
  • C:\Users\USERNAME\Desktop\github
  • C:\Users\USERNAME\Desktop\projects
  • C:\Users\USERNAME\Desktop\repositories
  • C:\Users\USERNAME\Desktop\repos
  • C:\Users\USERNAME\Desktop\websites
  • C:\github
  • C:\projects
  • D:\github
  • D:\projects
  • E:\github
  • E:\projects
  • F:\github
  • F:\projects
  • Z:\github
  • Z:\projects
  • Y:\github
  • Y:\projects
  • X:\github
  • X:\projects
  • G:\github
  • G:\projects
  • H:\github
  • H:\projects
  • M:\github
  • M:\projects
  • N:\github
  • N:\projects
  1. Whenever the Auto-Guesser finds a folder that exists in the above list, it checks to see if it contains at least one subfolder. If it does, we stop scanning for Projects folders and just use the one it found.
  2. We display a list of all folders in the Projects folder in the panel.
  3. The user unchecks any folders they do not want to import and then clicks "Import Selected"

Project Auto-Guesser

  1. Scout-App scans each project folder for the following input folders:
  • ProjectRoot\scss
  • ProjectRoot\sass
  • ProjectRoot\_scss
  • ProjectRoot\_sass
  • ProjectRoot\app\scss
  • ProjectRoot\app\sass
  • ProjectRoot\app\_scss
  • ProjectRoot\app\_sass
  • ProjectRoot\source\scss
  • ProjectRoot\source\sass
  • ProjectRoot\source\_scss
  • ProjectRoot\source\_sass
  • ProjectRoot\src\scss
  • ProjectRoot\src\sass
  • ProjectRoot\src\_scss
  • ProjectRoot\src\_sass
  1. Then Scout-App's auto-guesser lookes for the output folder in all of these locations:
  • css, stylesheets, stylesheet, styles, style, _css, _stylesheets, _stylesheet, _styles, _style
  • And if it can't find those then it checks for folders with those names inside of folders with these names:
  • built, public, distribution, production, prod, build, dist
  1. Then the auto-guesser looks for images folders in these spots:
  • graphics, images, image, imgs, img, meta, _graphics, _images, _image, _imgs, _img, _meta
  • Then if they exist we check inside them for any folders that match that same list. (_img/meta for example)
  • Otherwise if we couldn't find an image folder, we check that list again inside of the src or source folder if they have one.
  • Finally if there is an image folder in a source folder, than we check to see it has another folder in it from the list (src/meta/graphics)
  1. If Scout-App has auto-guessed an image input folder then it will look for one of these images.
  • logo.png, mstile03wd.png, apl-str.png, logo_48.png, logo-48.png, logo48.png, apl_57.png, apl-57.png, apl57.png, mstile01sm.png, apl_72.png, apl-72.png, apl72.png, logo_256.png, logo-256.png, logo256.png, logo_512.png, logo-512.png, logo512.png, fluid.png, mstile04lg.png, mstile02md.png, apl_144.png, apl-144.png, apl144.png, apl_114.png, apl-114.png, apl114.png, logo_128.png, logo-128.png, logo128.png, /favion.ico, /src/favion.ico, /dist/favion.ico

That Project Auto-Guesser will tap the hard disk potentially hundreds of times for every project it is importing. Which can be slow. If I import in 50 projects at once the UI can freeze up for a couple of seconds while this process completes before the sidebar slides in with the list of projects.

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