calling uglifyjs (javascript function) from within a perl script - perl

I have a directory full of .js files and I have already written a perl script that displays the source code from all of the .js files in a new file. The source files in the new file are all separated by a header that shows the name,date, and size of the source file.
For example:
file1|creation date|size
Contents of file 1
file2|creation date|size
Contents of file 2
I would like to call the function uglifyjs (from within a perl script)to minimize the .js file without changing the creation date. Is there a simple way to do that?

I don't think there is a package uglifyjs in perl but you may use JavaScript::Minifier.

Related

'Current Directory' search path for INCLUDE in GNU linker (ld)?

I have broken out the MEMORY{} command of my linker script into a separate file memmap.ld in order to share it between projects (bootloader and target firmware).
The file is currently located in the same directory as the main linker script and I include it using the line
INCLUDE memmap.ld
from my main .ld script however this does not work and I get the error
ld.exe: cannot open linker script file memmap.ld: No such file or directory
when building. The section of the ld manual dealing with the INCLUDE filename command reads
Include the linker script filename at this point. The file will be searched for in
the current directory, and in any directory specified with the ā€˜-Lā€™ option. You
can nest calls to INCLUDE up to 10 levels deep.
You can place INCLUDE directives at the top level, in MEMORY or SECTIONS commands, or in output section descriptions.
What is up with this? Is the current directory taken from the current script, executable, some other external parameter?
Am using the ST build of the GNU Linker distributed with the 64 bit Windows STM32CubeIDE if it makes any difference.
It appears the matching of .ld scripts within the current directory when using INCLUDE only compares with script names introduced via either '-L searchdir' or '-T scriptfile'.
[i.e. the LD program doesn't do a file system search but instead searches the list of scripts provided during invocation (or at least behaves as such) ].
My case in point when using STM32CubeIDE only provides the option to provide a single loader script via the -T option within project system (while Eclipse Embedded CDT which ST bases it's tools on allows multiple files to be passed by -T) required the addition of the folder containing both my scripts using the -L option (from the Libraries subsection of the Linker project properties).
Once the script I was referencing inside LD was being passed through the build system by including the directory location in the command line the 'current directory' did resolve to that of the script doing the inclusion.

How to change TypeLite Output Directory

Currently all of my TypeScript typings are located under Scripts/typings/Library. By default, TypeLite is just under Scripts. Is there a way to specify the output directory so it is under a custom Library name? ie Scripts/typings/MyCSharpProj?
TypeLite uses T4 templates for generating output files and I am afraid it isn't possible to change the output directory for the template. The output file is always generated alongside the template.
If you move Manager.ttinclude TypeLite.tt and TypeLite.Net4.tt to another directory and the output files will be generated there.

How to Include Coffeescript File in one more coffeescript file

I want to use code written in one.coffee file in one more coffee file two.coffee , just like include function present in Php
I am working on casperjs with coffee script

How do I add a blank line in an unix man page using groff?

I tried the following and it doesn't work:
.SH ADD A NEW TEST
Everytime you invoke a command within the shell,
this is what actually happens: the shell search for a folder
named as your command inside the directory
.B path/to/framework/Tests
or any subfolder,
if it finds such a folder, it will search for a file called
main.pl and will launch it.
.br
.br
Adding a new test is easy as create a new folder, put a main.pl
file inside it and invoke the folder name. Of course, for a better
integration with the whole system you should follow
some guide lines. Invoke the command
.B skeleton
to find out where the skeleton file is installed in your
system. Have a look to that file. It's well commented and
cover all possibile case and scenarios. Use it as a model to write
your own test.
The second .br is simply ignored.
I was able to accomplish it by using .PP when a paragraph begins.
.SH ADD A NEW TEST
.PP
Everytime you invoke a command within the shell,
this is what actually happens: the shell search for a folder
named as your command inside the directory
.B path/to/framework/Tests
or any subfolder,
if it finds such a folder, it will search for a file called
main.pl and will launch it.
.PP
Adding a new test is easy as create a new folder, put a main.pl
file inside it and invoke the folder name. Of course, for a better
integration with the whole system you should follow
some guide lines. Invoke the command
.B skeleton
to find out where the skeleton file is installed in your
system. Have a look to that file. It's well commented and
cover all possibile case and scenarios. Use it as a model to write
your own test.

Where are Doxygen output files put?

I have just run Doxygen from the command line and am unsure where it put it...
It doesn't show up in the directory I ran it from
Is there an easy way to find it?
From the Doxygen manual:
The default output directory is the directory in which doxygen is started. The root directory to which the output is written can be changed using the OUTPUT_DIRECTORY. The format specific directory within the output directory can be selected using the HTML_OUTPUT, RTF_OUTPUT, LATEX_OUTPUT, XML_OUTPUT, and MAN_OUTPUT tags of the configuration file. If the output directory does not exist, doxygen will try to create it for you (but it will not try to create a whole path recursively, like mkdir -p does).
If you are having some problems getting it to do what you want use doxywizard it makes writing the configuration file much easier.