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

'defines' are activated with inverted booleans #5

Open
AntonioRedondo opened this issue Dec 20, 2017 · 3 comments
Open

'defines' are activated with inverted booleans #5

AntonioRedondo opened this issue Dec 20, 2017 · 3 comments

Comments

@AntonioRedondo
Copy link

Hi Jetiny,

According to the documentation, given the below options:

{
  defines: {
    IS_SKIP: false,
    IS_REMOVE: true,
  }
}

The below input should produce the below output:

input

// #if IS_SKIP
  console.log('!Skip!')
// #endif
// #if IS_REMOVE
console.log('!Remove!')
// #endif

output

// #if IS_SKIP
  console.log('!Skip!')
// #endif

However the real behaviour is the opposite. In order to produce the output above described the configuration should be:

{
  defines: {
    IS_SKIP: true,
    IS_REMOVE: false,
  }
}

Actually I think the real behaviour is more intuitive than the one explained on the documentation. So the fix would suffice by just updating the documentation.

@AntonioRedondo AntonioRedondo changed the title defines are activated with inverted booleans 'defines' are activated with inverted booleans Dec 20, 2017
@AntonioRedondo
Copy link
Author

Oops! Some wrong code was given mistaken results. Your code and documentation is perfectly fine! Closing this ticket.

@AntonioRedondo
Copy link
Author

Sorry Jetiny, but after further testing it looks like actually, yes, the defines are activated in the opposite way. Could you double check this behaviour?

@brettz9
Copy link

brettz9 commented Mar 28, 2018

I have the same problem...

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