VS 2022 excluding one of my javascript files during publish - javascript

I have a .NET Core 6 MVC application, with all JavaScript files stored in the wwwroot/js folder. When I publish the project for deployment, one of the javascript files is excluded -- it does not appear in the publish location -- and I don't understand why.
If it matters, the file is named "CustomerService.js"; I haven't tried publishing with a different file name at the time of this writing, though I doubt that's causing the issue.
I have made no changes to the .git configuration or other settings, and I have updated VS to version 17.3.6, the current version as of this writing.
Can anyone explain why this could be happening?

Related

NodeWebkit - deploy the application

I have one code base for both Web and NodeWebkit (NW) application.
I use the following stack:
- React
- Hapi
- Sequelize
- Windows environment
Web version of the application uses MySQL, while NW uses Sqlite. It all works fine. I have config file that compiles application for what I need (web or NW).
The problem that I face now is how to deploy the NW application. Idea is to provide NW applicaiton to a client, where he will open it clicking the icon.
Since I use the Node for the NW version, and the application uses many modules which are stored in node_modules, I face a challenge how to pack it all up.
My idea is to make an Windows installer. User will click it and the installer will extract all files to the destination. And also make an icon on the user desktop to run it.
Problem is with the Windows file name limitation. Inside the node_modules, there are many subdirectories that simply violate the Windows limitation. I cant even copy the node_modules folder. I cant even delete it. Well sure I can copy it If I zip it... or remove manually long folders.
I have not yet started working on the installer, but I am thinking I will hit the wall with this approach.
Does anyone have an idea how to make this deployment?
How can I integrate NPM3 in NW?
My plan now is to make Windows installer. That windows installer will install normally application files. The node_modules will be zipped previously and placed inside the installer. Installer will then simply unzip it to the destionation folder.
I will post my progress here.
Some update here.
Main issue here was the depth of the node_modules. I have many modules in node_modules, and after some thinking I figured out there is a simple rule there. Some modules are server side modules, while other ones are used by react.
And since Webpack already creates a huge files in which all of the modules are already included, I simply do not need them at all.
So I have removed all front end side modules(babel modules, react-*), and left only server side (Hapi, sequelize...). Miracle happened, application run and was much faster at the startup.
I am going to use Inno setup to make a manifest file, and it should be good to go.
I am still not out of the danger zone, as developer might need a server side module, which has huge depth. But I will think about that if it happens.
More to follow...
actually in nodejs you can do the following:
1-Create another folder inside your project folder for example "server_modules"
2-In the created folder create another package.json file and install any modules needed for server out there
3-All these modules will be accessible as normal node_modules using require('module_name') and you can delete "server_modules" folder when you package your desktop version if you don't need it
Note: this approach used by some developers to achive micro services in nodejs but it is useful in your case

TeamCity selects only 1 version of JQuery

In short:
How can I build and deploy using TeamCity multiple versions of jQuery?
Long way:
existing info:
Two files from jQuery (jquery-2.1.1.js and jquery-2.1.3.js) are checked into the source control (TFS) in absolutely same 100% way (Build Action -> "Context"). In parallel, in the same directory, all identical.
Local Build and deploy using MSStudio 12 works without any issues copying at the end of the build both files into Scripts directory
when it runs from TeamCity, it fails to find the relevant "meant to be copied" files and comes back with the following error:
"C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Transform\Microsoft.Web.Publishing.AspNetCompileMerge.targets(608,
5): Copying file Scripts\jquery-2.1.3.js to
obj\Debug\AspnetCompileMerge\Source\Scripts\jquery-2.1.3.js failed.
Could not find file 'Scripts\jquery-2.1.3.js'"
Would someone help me to understand what is going on?

Correct minified/uglified/revv-ed JS on Windows, but empty file on Linux?

I've been pulling my hair lately. I have a Yeoman generated JekyllRB grunt/bower setup. The build works correct on my Windows machine but not on an automated Linux build machine.
With correct, I mean that I get a minified/uglified/revv-ed version of JQuery in
dist/js/50b6.app.js
On the continuous integration build setup, which runs Linux, I get an empty js file:
dist/js/d41d.app.js
I updated Grunt and all plugins to the latest version, without success. Analyzed my full Gruntfile.js, verified the src and dest of all the plugins and all seems the same, taking into account the difference in platform specific path separators.
Here is the link to the sources of my Jekyll site: site-ringo
Eventually, I was able to resolve this myself. I hadn't updated my local Bower components for a while. On my build server, I ended up with another version of JQuery than on my local machine. The newer JQuery was packaged differently leading to the jquery.js file being in another location. As such, the concat+uglify+rev build chain didn't pick up the correct file leading to the output file being empty.

Eclipse building workspace hangs after importing existing maven project because of JavaScript validation

When running Eclipse Kepler and importing an existing Maven project, Eclipse hangs during "Building Workspace (XX%)". Switching to the Progress tab reveals a "Validating nnn"; it looks like it’s validating a directory containing JavaScript files.
Kill Eclipse process.
Go to project folder and edit .project file.
Remove the following lines (it will disable failing JavaScript validator):
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
Save file.
Re-open Eclipse.
I faced the same problem when I tried to install Angular.js with bower in my project. I seems bower has lots of javascript files it downloaded automatically which caused my IDE to stuck in validation process for a long time. So, I solved this problem this way,
I first installed tern.js 0.9.0.
Then I went to the project properties, selected tern script path
included only the path I needed for validation, My project's
javascript folder. I excluded other path like placeholders,
Angular.js files, Jquery files.
I selected the Javascript from the properties again and did the same
things in include path's source.
My IDE currently working without freezing. I took help from there. Tern
I guess it can be helpful, where any IDE stuck due to lots of Javascript file.

CodeKit stopped "watching" folders for file changes, why?

I love CodeKit, but for some reason, it stopped "watching" for changes to the files in the folder I placed in there. I double checked the project configuration to make sure the output paths are correct, but when I make a change to any of the files being watched, CodeKit does nothing -- no minifying, syntax checking, compiling down .scss files to .css.
As the developer suggested to "refresh" CodeKit, I launched the app while holding down shift and sure enough CodeKit opened with no projects. So I re-added the project, and still, it is not watching the files. Has anybody ever encountered this with CodeKit?
I have experienced a similar issue before and it was because in the codekit project I had included the images folder and I generated a huge amount of .png images. Every time codekit ran it got hung up processing the pngs trying to compress them.
Try putting your images folder outside of your codekit project directory and see if that helps.
I've been having the same problem lately (Version 2.1.9). I haven't managed to figure out the root cause as yet, but I have figured out a way to solve this issue every time it occurs.
Rename your parent folder that contains all of your CodeKit projects. E.g. my HTDocs equivalent folder is called "Sites". In Terminal do this:
mv sites sites_temp
mv sites_temp sites
The first line will rename your sites folder to sites_temp, and then the second line will do the opposite.
For some reason this works every time for me.
I've written a short blog post on this matter here, but to be honest the above is my go-to solution whenever this problem occurs: http://www.joetannorella.com/codekit-mac-auto-compiling-compass-upon-file-change/

Categories

Resources