How do you do a "dry run" of meteor update so you can see the changes, rather than apply them?
That's not possible. Copy the folder of your project and apply the update on the copy to see how the changes.
You can also apply patches fixes that will not break your application, etc. See more in the documentation.
Using Google Translate.
Related
So I'm struggling a bit with this. Let's say I build my NextJS project, I have 2 css files one of them is 10mb. Then I run next start and I see on Lighthouse that the file size is only a few kb. But if I run node server.js on the standalone folder, the css file size stays the same and that's a problem. Is this the intended behavior? Is there any way to fix this?
When I say standalone folder I mean this: https://nextjs.org/docs/advanced-features/output-file-tracing#automatically-copying-traced-files-experimental
UPDATED
I think you're trying to build custom server (https://nextjs.org/docs/advanced-features/custom-server)
According to that document, they mention this part which may be related to what you're looking for
Before deciding to use a custom server, please keep in mind that it
should only be used when the integrated router of Next.js can't meet
your app requirements. A custom server will remove important
performance optimizations, like serverless functions and Automatic
Static Optimization.
OLD ANSWER
next start usually goes along with next build (https://nextjs.org/docs/api-reference/cli#production) and it has its own custom configs under next.config with a ton of good stuff like file compression, routings, image optimization, etc. (under the hood, it also uses Webpack and Babel for builds)
node server.js is just simply to run a server and does nothing else. Therefore, if you want to have better builds like NextJS. You need to add libraries into NodeJS.
You can find some useful libraries here.
https://blog.bitsrc.io/23-insanely-useful-nodejs-libraries-you-should-know-in-2020-5a9b570d5416
I decide to use scss instead of css in my project, but I'm having real hard time with switch manually the project, i want to know if there's a way to switch to scss in a clean way by jhipster or maybe i have to regenerate the app from the start and select scss in the configuration? this way should work fine but it will take really long time to get the app back in the actual state. I'm looking for a better solution. Any ideas?
You could create a git branch, edit .yo-rc.json, enable sass, re-generate your app using jhipster --with-entities then merge into your master branch using the git merge strategy that suits you to keep your custom code.
Perhaps you could use this npm package. You can use it as an executable or as a library. The installation and usage are described in detail in the page linked above.
I'm using https://github.com/AtomLinter/linter-jscs. The docs say:
It will lint on edit and/or on save
It seems that it lints on edit and save all the time. I don't see a way to configure it to lint on only save.
First of all you really should be looking into moving to ESLint (linter-eslint) as all development on JSCS has stopped.
As for your question, you can configure this behavior in the Linter package by disabling On-the-fly linting there. This package is simply a service provider allowing linting of code through JSCS, the Linter package is what controls when it is ran, and how its results are displayed to the user.
There are two command line programs to start/stop/manage your meteor app. There is meteor and there is mrt. As of the latest build (0.8.2 or so) it's really not clear what the difference is between these two, if any. Both seem to support the argument "help" like meteor help and mrt help. The output of both seems to be the same to me.
Sadly, I do not see a "clean" argument available when I check the help for either of these. What do I need to do if I want to achieve a clean build? One that would
Blow away all packages and re-install them
Blow away any compiled templates
Blow away all Sass/Less compiled output
I ask this because I find myself in some kind of dependency Hades right now and want out now.
Meteor is still in a pre-release state. So the idea of packages is (still as of this post) not officially supported, though it will be soon. The meteor community stepped in to build their own way to use 3rd party packages and this is what meteorite does.
Most of the commands you give to meteorite are eventually passed to meteor which is why you see the same output.
The only (main difference is) mrt add which checks atmospherejs.com for packages first.
These two will be merged very soon (there is a branch on meteor on github called packaging which seeks to achieve this)
The idea of 'clean' isn't really there in meteor because most of the stuff is based on hot code reloads, so when a file changes its completely scrapped/(cleaned) and rewritten.
If you change a bit of code it will rebuild all this unless you have a syntax error.
Nonetheless if you want to 'clean' the build from everything you would have to do this in two steps (the meteor part and the meteorite part)
This erases some stuff in the hidden .meteor folder
meteor reset
Delete everything in ~/.meteorite/packages
Delete all symlinks only in your projects /packages folder. Be careful not to delete the folders because these will have been put in by you/whoever made your project and wouldn't be from atmosphere or meteor
Then run mrt update to reinstall all the atmosphere packages from scratch
In the MiniProfiler.MVC3 NuGet package, it creates a file in App_Start that is used to control MiniProfiler settings (the SqlFormatter to use, modifications to the ViewEngines, when to start MiniProfiler, etc.).
There are a lot of TODO comments in this file talking about how to change the code to perform how you want. This is great, but when the NuGet package is updated, it will see that I've changed the file and not pull down the updated version. The problem here is that I lose any updates to that file, and depending on what else updated in the package, making it unusable (for example, when upgrading MiniProfiler.MVC3 from version 1.9 to version 2.0.1 after modifying MiniProfiler.cs in App_Start, the project will no longer build because of needed changes to that file in the 2.0.1 version).
What is the best way to handle this? Should I create my own file in App_Start and not modify the one in the NuGet package, ensuring that I will always get the full update when upgrading to the latest version of the NuGet package?
You could backup the file in App_Start, update it, then merge the files manually, or using a merge tool. You'd probably end up doing this anyways if you're using source control.
Quick-and-dirty: create the file you want. Then copy over/merge every time you upgrade with nugget. Or with every compile. The added build time is negligible.
Slightly better: use the precompile event in visual studio and compare the files. If they differ - either copy over or tell the user. I can't figure out a way to show a message box, or similar, on the top of my head but one could always create a new file with a compilation error and some text nearby "discrepancy in the xxx file".
try using mercurial queues. You can get your code to the point you want (excluding the file you refer to), and then commit. Make changes to your file, and push it to a queue. Make sure to exclude it from any future updates (manually), and then when you want to update your package, pop it off your code base. This will make it look like it used to, and run the nuget update. Then you can push the queue back to the code, and your changes will re-applied. It might take a bit of fiddling, but worth a look.
For reference:
https://www.mercurial-scm.org/wiki/MqExtension
https://www.mercurial-scm.org/wiki/MqTutorial
https://developer.mozilla.org/en/Mercurial_Queues