Can js file be compiled in a different folder from the source folder? - directory

I'm building an Obsidian plugin, and it uses esbuild to bundle ts file to js file. The ts file is located at D:\foo1\foo2\..., and I want the js file to be at D:\bar1\bar2\.... The reason for this is because I want the source folder is in a different folder than the plugin folder, so that when syncing it to mobile I don't have to exclude the source files.
I was suggested to edit the esbuild.config.mjs file, and I find in the documentation that beside the outfile config there are also outdir, outbase. However, these are the results when I'm using them:
outdir
outdir: 'D:\Quả Cầu\B Nội dung\Knowledge graphs\Cây vấn đề\.obsidian\plugins\dotmaker'
error: Failed to create output directory: mkdir D:\GitHub\Obsidian\dotmaker\D:Quả CầuB Nội dungKnowledge graphsCây vấn đề.obsidianpluginsdotmaker: The directory name is invalid.
outbase
outbase: 'D:\Quả Cầu\B Nội dung\Knowledge graphs\Cây vấn đề\.obsidian\plugins\dotmaker',
It prints the js content in the terminal, but the real file isn't changed.
It seems that I can only create the js file inside the source folder. Is that possible?

You didn't correctly format the content of the outdir setting. When using backslashes \ as path separator on windows, you have to escape them. Ie use
outdir: 'D:\\Quả Cầu\\B Nội dung\\Knowledge graphs\\Cây vấn đề\\.obsidian\\plugins\\dotmaker'

Related

LESSC Compiling Included Files Into CSS

I have the following file structure:
--public_html/
- css/
- less/
- _mixins.less
- _variables.less
- _theme.less
- main.less
I am using PhpStorm with a File Watcher running LESSC from NPM.
My file watcher is as follows:
Program: /usr/local/bin/lessc
Arguments: --no-color $FileName$
Output paths to refresh: ../$FileNameWithoutExtention$.css
Files:
main.less:
#import "_variables.less";
#import "_mixins.less";
#import "_theme.less";
_theme.less contains my stylsheet and _variables.less and _mixins.less are all pretty self explanatory.
When I modify and save main.less The file main.css is created in the css folder as it should.
However, when I edit my _theme.less file, LESSC creates a _theme.css file, also.
How do I stop these extra files being created?
If you need any more info, please ask.
Please ensure that Track only root files option is enabled in that particular File Watcher settings -- it does just that.
From https://www.jetbrains.com/help/phpstorm/2016.3/new-watcher-dialog.html#d199014e291
When the File Watcher is invoked on a file, PhpStorm detects all the files in which this file is included. For each of these files, in its turn, PhpStorm again detects the files into which it is included. This operation is repeated recursively until PhpStorm reaches the files that are not included anywhere within the specified scope. These files are referred to as root files (do not confuse with content roots).
When this check box is selected, the File Watcher runs only against the root files.
When the check box is cleared, the File Watcher runs against the file from which it is invoked and against all the files in which this file is included recursively within the specified scope.

Can linter-flake8 ignore files by using a project-wide .flake8rc?

I'm using Atom and linter-flake8 for my project. I have a set of huge generated Python files and I want them ignored by linter-flake8. These files are placed in a folder called generated/, inside the project root folder. At the same level with the generated/ folder, I placed a .flake8rc with the following content:
[flake8]
exclude=generated/
and configured linter-flake8 to use this file (via Preferences in Atom). However, it still parses those files. What am I doing wrong?
PS: If I run flake8 --exclude=generated/ . in bash, in the project root folder, it works fine and ignores my files.

IAR project variable like $PROJ_DIR$

Is there any possibility in IAR to add additional project variable like $PROJ_DIR$ to specify my project environment?
I like to keep my project portable and adaptable.
Of course there are, according to the manuals:
Variable / Description
$CONFIG_NAME$ The name of the current build configuration, for example Debug or Release.
$CUR_DIR$ Current directory
$CUR_LINE$ Current line
$DATE$ Today’s date
$EW_DIR$ Top directory of IAR Embedded Workbench, for example c:\program files\iar systems\embedded workbench 6.n
$EXE_DIR$ Directory for executable output
$FILE_BNAME$ Filename without extension
$FILE_BPATH$ Full path without extension
$FILE_DIR$ Directory of active file, no filename
$FILE_FNAME$ Filename of active file without path
$FILE_PATH$ Full path of active file (in Editor, Project, or Message window)
$LIST_DIR$ Directory for list output
$OBJ_DIR$ Directory for object output
$PROJ_DIR$ Project directory
$PROJ_FNAME$ Project filename without path
$PROJ_PATH$ Full path of project file
$TARGET_DIR$ Directory of primary output file
$TARGET_BNAME$ Filename without path of primary output file and without extension
$TARGET_BPATH$ Full path of primary output file without extension
$TARGET_FNAME$ Filename without path of primary output file
$TARGET_PATH$ Full path of primary output file
$TOOLKIT_DIR$ Directory of the active product, for example c:\program files\iar systems\embedded workbench 6.n\arm
$USER_NAME$ Your host login name
$ENVVAR$ The environment variable ENVVAR. Any name within $_ and _$ will
be expanded to that system environment variable.
If you go to Tools > Configure Custom Argument Variables you can add variables that you can address with $VARIABLE_NAME$. Not sure if that's exactly what you were looking for.
As a caution, if you are using IarBuild.exe to build from the command line, the workspace or global values set from "Configure Custom Arguments Variables" are not included in the project files (.ewp) and thus is not expanded by IarBuild.exe at build time. This is not an issue if you only use the IDE to build.
I found a reason for my problem (but it givs another one):
I define a windows "path-variable" like LIB_PATH and put it in the IAR project file with $_LIB_PATH_$.This works as long until i save the IAR-project. Then IAR sets all paths realive to $PROJ_DIR$ :-(

Empty translation files using QT internationalisation

I am using QT and trying to generate .ts translation files using the pylupdate4 command.
I marked the strings I needed to translate with
self.tr('example string')
Unfortuanetly, the generated .ts files are empty.
I am in the src folder of the project and generate my own .pro file, which is also in the src folder. It looks like this:
SOURCE = rob_gui.py
TRANSLATIONS = en.ts \
germ.ts
rob_gui.py is also in the src folder.
Why are the .ts files empty?

How do you include .java files and .html files in a .jar file when you take Clean and Build in Netbeans 7?

If you have files in the build/classes/folderToJar Netbeans7 takes the .class files and make a .jar file when you take Clean and Build.
But how can you have .java files and .html files go into the .jarfile as well?
First Create a package(Say html) under Source Packages
copy all of your html files to this package(when you create a package,a folder in the name of your package will be created inside your project src folder, so copy files to it)
You can access your html file from your program as
URL someURL = yourclass.class.getResource("/html/yourhtml.html");

Resources