Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In an angular.io project, which files need to be commited to source control?

Tags:

angular

I generated an angular project using the command line client (ng-cli). For a basic project, it downloads and builds many different files and folders, including 806 node modules.

├── e2e
├── karma.conf.js
├── node_modules
├── package.json
├── package-lock.json
├── protractor.conf.js
├── README.md
├── src
├── tsconfig.json
└── tslint.json

Which files should be committed to source control?

like image 658
Steve Hanov Avatar asked Jan 24 '18 14:01

Steve Hanov


People also ask

What is my-project in angular CLI?

When you run this command, the CLI installs the necessary Angular npm packages and other dependencies in a new workspace, with a root-level application named my-project . The workspace root folder contains various support and configuration files, and a README file with generated descriptive text that you can customize.

What is the use of angular components?

Angular lets you build your apps through modular components, which are the most basic UI building block of an Angular app. When building multiple Angular projects or applications, components can be shared and reused between them, to speed development and build better modular apps.

What is a project in angular?

A project is the set of files that comprise a standalone application or a shareable library. The Angular CLI ng new command creates a workspace.

How to build an angular file upload component?

In order to build an Angular file upload component, we need to first understand how to upload files in plain HTML and Javascript only, and take it from there. The key ingredient for uploading files in a browser is a plain HTML input of type file:


1 Answers

As I said in my comment you created your application using angular-cli. By default it will create a .gitignore file that will exclude everything that shouldn't be commit to source control. Currently this file look like:

# compiled output
/dist
/dist-server
/tmp
/out-tsc

# dependencies
/node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# e2e
/e2e/*.js
/e2e/*.map

# System Files
.DS_Store
Thumbs.db

Edit: One can check the current up-to-date version in the angular-cli repository https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/workspace/files/__dot__gitignore.template

like image 114
JEY Avatar answered Sep 28 '22 08:09

JEY