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?
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.
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.
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.
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:
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With