Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up file/folder organisation #112

Closed
7 of 8 tasks
Treora opened this issue Jun 24, 2017 · 4 comments
Closed
7 of 8 tasks

Clean up file/folder organisation #112

Treora opened this issue Jun 24, 2017 · 4 comments

Comments

@Treora
Copy link
Collaborator

Treora commented Jun 24, 2017

The organisation of this repo has become a bit messy over time. I intend to move some things around soon, currently thinking about these changes:

  • Make clearer which code is an 'extension page' (overview, options, page-viewer), what is background or content script, and what is commonly usable by any of them. Be more consistent in using (or possibly remove) the separation of background and content_script folders, it is a bit confusing now.
  • (124319d) Move html files out of extension, into src. Rename bundled scripts (e.g. src/overview/main.jsx) so they match the names used in html script tags (also hard-wire output naming in gulp task). extension is to be more like a 'build' output folder. (where do we put images?)
  • In src/overview, separate 'application' (main.jsx + store.js) and 'redux module' (the rest). Maybe make 'application' part reusable for e.g. options page.
  • Move stuff from src/search/find-pages into src/page-storage, it's not really search-related.
  • Consider altogether regrouping activity-logger, page-analysis, page-storage, and search, or at least define their roles and interfaces better.
  • Refactor generateVisitDocId functions etc in some sensible way.
  • (c73fb7e) Remove unused code: src/browser-history, ...more?
  • (354b7dc) Move src/freeze-dry into its own repo (or else into util).
@poltak
Copy link
Collaborator

poltak commented Jun 28, 2017

(where do we put images?)

Could put them in sub dirs of the main module's dir, like src/overview/img, reflecting the build extension/overview/img and just add entries for them into staticFiles in the gulpfile. Or have another top level dir for static assets mirroring the src/ and extension/ structures, like assets/{overview,options}/{fonts,img}/.

HTML files could be treated as static files in the same way, or could unify them in a shared template and spit them out for their respective build tasks using something like gulp-template.

@Treora
Copy link
Collaborator Author

Treora commented Jul 12, 2017

Thanks still for the input. For now the question about images is solved, since there are no images anymore (using semantic-ui's icons and ditched the background). The question will probably pop up again though.

I started cleaning up in the 'cleanup' branch, checking at least some of the boxes.

Treora added a commit that referenced this issue Jul 20, 2017
Various changes to improve the source organisation and build process.
Makes ./extension an output-only folder; cleaned up before every build.

Plenty of intended improvements are not yet addressed; see issue #112.
@Treora
Copy link
Collaborator Author

Treora commented Jul 20, 2017

Move html files out of extension, into src

This one has been done in 124319d. The other tasks may have to wait a bit; upcoming feature developments may give a better picture of the logical grouping. I suspect the aspects of logging visits and storing pages should be more clearly separated.

@Treora
Copy link
Collaborator Author

Treora commented Aug 6, 2018

Lots of reorganisation done in #135. It could always be better, but it seems good enough to close this.

@Treora Treora closed this as completed Aug 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants