How to make IntelliJ IDEA recognise code created by macros?

With the latest Scala plugin build, there is an API which can be used to write your own plugin to support your macros: http://blog.jetbrains.com/scala/2015/10/14/intellij-api-to-build-scala-macros-support/ Now, everyone can use this API to make their macros more friendly to their favorite IDE. To do that, you have to implement SyntheticMembersInjector, and register it in the plugin.xml file: …

Read more

How to compile a single Java file

As far as I can understand you want to re-compile a single java file and replace it in an existing jar file.. So you compile it.. cmd>javac -classpath jar1.jar;jar2.jar my.company.MyClassToReplace.java and replace it in the jar. cmd>jar uf myJarFile.jar my/company/MyClassToReplace.class

How can I get rid of the warning import/no-anonymous-default-export in React?

It’s telling you to give the object being exported a name before exporting, to make it more likely that the name used is consistent throughout the codebase. For example, change to: function init() {} function log(error) { console.error(error); } const logger = { init, log, }; export default logger; (Give it whatever name makes most …

Read more

What is module option in tsconfig used for?

TLDR; module in tsconfig.json tells the compiler what syntax to use for the modules in the emitted .js files. Frequently used values are “commonjs” (require/module.exports) or “ES2015” (import/export keywords), but there are other module systems. module affects the module syntax of emitted code while target affects the rest. What does Specify module code generation mean? …

Read more