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

Move logic from routes to lib #3

Open
5 tasks
doowb opened this issue Nov 8, 2017 · 1 comment
Open
5 tasks

Move logic from routes to lib #3

doowb opened this issue Nov 8, 2017 · 1 comment

Comments

@doowb
Copy link
Contributor

doowb commented Nov 8, 2017

I think we should move the logic that prepares the arguments and calls autotrace and fontcustom to lib folders: (e.g. lib/autotrace.js and lib/fontcustom.js or something like that), then we can test those pieces more easily, use them in the webapp part, and provide a library that can be required in by other libraries.

The following is a list of things that I think will accomplish the above:

  • lib folder with autotrace and fontcustom specific code
  • index.js will be a Fontastic object that uses the files from the lib folder
  • path configuration should be passed to Fontastic and options can be passed to autotrace and fontcustom specific methods.
  • workflow should be handled in Fontastic methods.
  • routes handle transforming req/res specific properties to arguments passed to Fontastic methods.
@jollen
Copy link
Contributor

jollen commented Nov 10, 2017

I like this idea. As such, a CLI tool can be made with libs/ and also be highly decoupled from the views.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants