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

Better use of shelljs #197

Merged
merged 5 commits into from
Oct 13, 2017
Merged

Better use of shelljs #197

merged 5 commits into from
Oct 13, 2017

Conversation

belemaire
Copy link
Member

This pull request improves the way our codebase makes use of shelljs library throughout ern modules.

Here is what this PR contains :

  • Relocate shelljs inside ern-util so that only one instance of it gets used in the process.
    Instead of importing shelljs as before through :
    import shell from 'shelljs'
    the new way to retrieve the process wide instance is now
    import { shell } from 'ern-util'

  • Configure instance of sheljs in ern-local-cli entry

    • fatal = true
      This will make shelljs throw an error if a command is failing (before we were using throwIfShellCommandFail util function. This is not needed anymore all code has been cleanup accordingly part of this PR).

    • verbose = logLevel === 'debug' || logLevel === 'trace'
      This will make shelljs log every command line it is executing, only when platform log level is set to debug or trace (before we were directly doing log.debug of the command line in some cases. This is not needed anymore all code has been cleanup accordingly part of this PR)

  • Removes all dependencies on shelljs module from ern- modules, as the dependency is not directly needed by the modules (they now consume shell from ern-util)

@deepueg deepueg merged commit e8e7fe7 into electrode-io:master Oct 13, 2017
@belemaire belemaire deleted the cleanup branch October 18, 2017 22:10
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

Successfully merging this pull request may close these issues.

None yet

2 participants