When should i build 'dist' folder and when i should not? [closed] - javascript

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I know dist folder is used for production, distribution and what it should contain.
What i want to know is, when is the best time to use it? in what kind of work environment/project requirement i should use dist folder? like Heroku, what are the other platforms where i can deploy an app without dist and the platforms where i can't deploy without it (if there is any)?
I'm new to this, if someone can clearify the process would be very much helpful.

The dist folder is for production website it's not necessary to have it. It will contain for example your image, css, script, vendor folder ready for production (minified and concatenated).
You can check on google for this. Type "how to deploy a production React app to Heroku" for example.

Related

How to reduce node_module file size [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I am working on 2-3 react apps, and for each app when I run npm install, it installs a bunch of dependencies in the "node-module" folder which is approximately 250-300mb in size! It becomes really hard to deploy that on Github. Is there any way to reduce file size of node_module folder.
You don't need to push node modules to github, they should be included in your .gitignore file.
Within the root directory, edit .gitignore and add the line
node_modules/
Now when you push to github, the node_modules directory will be ignored.

React : Change in node_modules file does not reflect the change in UI [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
Maybe I am doing it wrong. I want to do changes in node_modules folder. Now when I run npm run watch or npm run dev it doesn't get reflected in UI.
Any idea what is wrong?
Try editing from the /dist folder of the library you are trying to edit. Your changes will not reflect if you edit from the source and not from the output bundles.
Note: If you are just logging a result (via console.log) that is fine, but as much as possible, do not edit from the node_modules folder.

NodeJS - Typescript - Intellisense [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
In VS2013, intelliSense in a NodeJS App in a *.js file works like a charm. I was wondering if there is also intelliSense supported in a TypeScript file for several NodeJS-Modules? How can I enable intelliSense for NodeJS in a TypeScript file?
DefinitelyTyped is the place to look for typescript definition files:
https://github.com/borisyankov/DefinitelyTyped/tree/master/node
You can use your favorite package manager to get it and all of the DefinitelyTyped deffinitions are available in NuGet.
There are a quite a few specific NPM modules on there too, but some you will have to define yourself.
In VS2013 when you add a deffinition file (*.d.ts) then it will be available from the IntelliSense.

How to effectively develop plain Html/Javascript project? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
For the plain Html/Javascript project such as elasticsearch/kibana project (https://github.com/elasticsearch/kibana). In order to deploy the project, a developer and run command grunt build to generate a dist folder which including all Html/Javascript/Css and can be deployed to Tomcat.
But if the project is under development stage, for example, after updating a JavaScript/Html/Css file, it is time-consuming to re-run grunt build to generate a dist and redeployed to Tomcat. My question is how to develop the project effectively to check the updated JavaScript/Html/Css file in browser. Thanks.
In my case, it is not limited to the Tomcat during the develop/debug process, just take Tomcat as an example. Is there a development mode can accelerate the develop and debug process?

Recommended Intern directory structure for multiple package testing [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have gone thru the intern-tutorial which is a very simple unit test case. However, it's not clear to me if the directory structure can be different and how flexible intern's configuration can be to accommodate it.
I'd like to find a tutorial that showed the v1.1 intern locations expected... which locations are mandatory and which can be modified and how that impacts the config file (intern.js) settings. What is the directory structure intern expects for a project and what is changeable, such as when you have multiple packages even.
In particular I'd like to see the relative location relationships of the:
web root
intern dir
intern.js config file
unit-test files
dojo/dijig/dojox/etc package location
modules in a package
Please show how placement relates to the configuration settings if possible.
As of Intern 1.1, the only thing that is mandatory is that Intern be installed as an npm dependency of the root project being tested. There are no relationships to any of the things you asked about, except that everything needs to be within the project’s root directory.

Categories