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

More Automated Features #2

Open
nickzuber opened this issue Jan 21, 2018 · 0 comments
Open

More Automated Features #2

nickzuber opened this issue Jan 21, 2018 · 0 comments

Comments

@nickzuber
Copy link
Owner

New Workflow

Let's make the process even simpler by finding the source of ReasonML code (with an opt in to do it manually like we currently have).

setup would then look like:

$ add-reason setup

or

$ add-reason setup my-package-name
  1. Recurse through project directory ignoring folders like /node_modules, /.**, and find all the directories that have *.re.
    • If we find multiple directories, fail and output a message
    • If we one multiple directory, save this as the "source" directory
  2. Now continue like normal...

Other commands that need to know the source directory will also include this workflow.

Proposal of add-reason.lock

This lock file will be generated from every command unless a --no-lockfile flag is included. This file will store information that we glean from commands like:

  • The source directory path
  • The package name

This file will be used for all commands if it exists. This will allow a user to simply call something like

add-reason unlink

instead of

add-reason unlink my-package-name

Since we will have already known the package name. We could also keep other useful information here like is-linked: bool. I propose we only generate this file when a command has been executed successfully.

# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# add-reason lockfile v0.1.0

source: "/Users/nick/projects/add-reason/tests/root_for_testing/src/myCode"
name: "myCode"
is-linked: "true"
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

1 participant