I have a problem with web storm and github, I guess.
After I made some local changes in Local Changes appears some random files from node modules enter image description here. I didn't touch those files but it looks like I changed something.
It looks like you haven't added node_modules to your .gitignore file.
Add node_modules/ as a new line in that .gitignore file or create a new one. That way git will ignore any changes made in these files.
Related
I am using angular4. I used angular-cli to create my project.
I want to use node.js as server side language with mongodb. So, I found a tutorial here to connect node.js with angular.
But there are two problems with it:
dist folder is created.
auto refresh server like using nodemon or similar is lost
problem with dist folder
My site depends heavily on images. I keep all the images in a folder called images which is located under assets folder created by angular-cli
So, when I run the server, all the assets will be copied to the dist directory, which will take time and (more important) space on the webserver. Another problem is that If I upload new images, then it will be copied to the images folder inside dist folder, so I have to manually copy those images to my original dist folder.
Another copy of images folder in dist folder will take double space than my original app. So, I have to pay more money for hosting to use more space.
problem with auto-refresh server
before using node, I just typed this command
ng serve
and my application started. Then when I change any code and save the file, the changes were reflected in the browser without restarting the server.
But when I started to use node, I have to manually restart the server whenever I make changes to my code.
Question:
Is there any way that prevents app to create images folder inside dist folder to save space. I mean can I use original Images folder instead of creating one inside dist?
Or is there any other way that a node application and angular application work together?
If anybody knows a solution that does not use dist folder, then I would love to use that solution. As my need is satisfied. Auto-refresh server is not important to me in this case.
So, if anybody knows a way of how to create a mean app without angular-cli,
then I think that is very near to my solution.
You can change dist folder's name to any name you want. you just need to find file .angular-cli.json in your main root folder and change json
"apps": [
{
...,
"outDir": "dist", // dist to any name e.g. public, ...
...
}
]
I recently added typings files to my project so that I get intellisense in VS Code for libraries such as Angular, D3, Underscore, etc.
So my changes in this branch were adding a typings/ folder with relevant typings files, adding typings.json, and adding jsconfig.json. I also added each of these to my .gitignore. So my diff only shows the .gitignore changes. If I merge this into remote master, when other team members pull it down will they have the typings folder, typings.json, and jsconfig.json. I want them to have access to this so they also get intellisense if using VS Code, but I'm not sure if I'm approaching this correctly.
No they will not pull down the files that you listed in gitignore because they will not be pushed up when you commit and push. They will only pull down the changes to the gitignore file. The only way they would get the new "typings" folder and files is if you removed them from your gitignore and checked them into git and then merge your changes into master.
I've created a bundle file of a private project of mine, and I would like to share it with someone. They ask me to provide the git bundle file generated.
Can I just email them the single bundle file? ...or do I need to attach the folder of the project itself as well?
Can I just email them the single bundle file?
Yep, that the point behind the bundle.
Its a full read-only repository.
Once you have the bundle you can share it.
git bundle will only package references that are shown by git show-ref: this includes heads, tags, and remote heads.
git bundle create ../reponame.bundle --all
--all- get all refs
This command creates bundle with all the source code and all other info like tags.
Even due that --all is not documented its much better to use it.
Note : --all would not include remote-tracking branches !!!
I've successfully setup my YUI Compressor JS. But it doesn't works like I would like it to.
I would like it to minify an entire directory every time a file in that directory gets changed.
So far I've made a scope with the directory, but the compressor only works on the file I have changed (in the scope), and not on the entire directory. So it only minify's that one file, and not the entire directory.
I've solved this by using gulp and setting it up accordingly. All I have to do then is running gulp and everything works.
I am a total programming newbie.
If I upload my Meteor project to Github and after clone it, I cant run it in Meteor anymore, it will crash.
When I delete the local entry in .gitignore then it works.
But then with every lil change many local files change and the github commits look messy.
How can I fix this?
I think you first need to run meteor create app-name for meteor to create the local folder and the various things it needs in there such as mongodb etc and then clone your repo into that folder. You don't want this content in the repo so keep your .gitignore file but you both need your own local copies of local folder for the app to run.
Or link to the repo if it's public and I'll see if I can run it/what errors pop up.