question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can't use '.'(dot) in 'configName' option

See original GitHub issue

When creating a new Liftoff instance and passing a configName you can’t use . as part of it.

I want to have a cli named dcm and it’s config file to be dcm.config.{ext}

import Liftoff from 'liftoff';
import { jsVariants } from 'interpret';

const Dcm = new Liftoff({
  name: 'dcm',
  configName: 'dcm.config',
  extensions: jsVariants
});

Dcm.prepare({}, env =>
  Dcm.execute(env, () => {
    const config = env.configPath ? require(env.configPath).default : undefined;
    // do something with config
  })
)

at this point when requiring the config the registered loaders doesn’t seem to run properly, when removing the . from the name or having es5 code syntax in the config file, it works.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
EladBezalelcommented, Apr 7, 2019

That’s awesome, thanks for looking into it. love your project, keep up the good work 😃

1reaction
sttkcommented, Apr 7, 2019

@EladBezalel Thanks for your code. I could reproduce this issue.

The cause of this issue is rechoir#37 and this was already fixed but liftoff has not update it yet.

I’ve sent a PR and this issue will be fixed by it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Removing config dot notation is a big mistake... #12429 - GitHub
And sometimes you want to pass around the group.. void myServerSomething(def config) { String serverName = config.name String serverIp = config.
Read more >
Can't read app.config in C# .NET Core unit test project with ...
The console app reads the app.config fine, but the unit test method fails and I cannot figure out why. Both are using a...
Read more >
Authoritative Server Settings - PowerDNS Documentation
When running on a system where systemd manages services, chroot does not work out of the box, as PowerDNS cannot use the NOTIFY_SOCKET...
Read more >
Configuration Reference Guide - Quarkus
In this reference guide we're going to describe various aspects of Quarkus configuration. A Quarkus application and Quarkus itself (core and extensions) are ......
Read more >
Configuration in ASP.NET Core - Microsoft Learn
Bind hierarchical configuration data using the options pattern ... DOTNET_ environment variables used outside of Microsoft.Extensions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found