A quick look at the files and directories you'll see in a SCM-Manager project.
.
├── node_modules/
├── src/
| ├── main/
| | ├── java/
| | ├── js/
| | └── resources/
| ├── test/
| | ├── java/
| | └── resources/
| └── target/
├── .editorconfig
├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── package.json
├── pom.xml
├── README.md
├── tsconfig.json
└── yarn.lock
1.**`node_modules/`**: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed.
2.**`src/`**: This directory will contain all of the code related to what you see or not. `src` is a convention for “source code”.
1.**`main/`**
1.**`java/`**: This directory contain the Java code.
2.**`js/`**: This directory contains the JavaScript code for the web ui, inclusive unit tests: suffixed with `.test.ts`
3.**`resources/`**: This directory contains the the classpath resources.
2.**`test/`**
1.**`java/`**: This directory contains the Java unit tests.
3.**`resources/`**: This directory contains classpath resources for unit tests.
3.**`target/`**: This is the build directory.
3.**`.editorconfig`**: This is a configuration file for your editor using [EditorConfig](https://editorconfig.org/). The file specifies a style that IDEs use for code.
4.**`.gitignore`**: This file tells git which files it should not track / not maintain a version history for.
5.**`CHANGELOG.md`**: All notable changes to this project will be documented in this file.
6.**`LICENSE`**: This project is licensed under the MIT license.
The file specified at `main` should use the `binder` from the [@scm-manager/ui-extensions](../../scm-ui/ui-extensions) in oder to bind its extensions.
For more information of extensions, binder and extension points, please have a look at the [README.md](../../scm-ui/ui-extensions/README.md) of @scm-manager/ui-extensions.
If the plugins gets build (`mvn package` or `mvn install`), the [buildfrontend-maven-plugin](https://github.com/sdorra/buildfrontend-maven-plugin), will call the `build` script of `package.json`.
The build script triggers the `plugin` command of the [@scm-manager/ui-bundler](https://bitbucket.org/scm-manager/ui-bundler).
The `ui-bundler` will do the following steps:
* traverses the import statements of the script specified at `main`
* transpiles flow/es@next to es5
* creates a single bundle
* registers the bundle in the plugin.xml
* stores the bundle in the final scmp package
At runtime the plugins are loaded by PluginLoader. The PluginLoader is a React component, which does the following steps:
* fetches plugin metadata (name and registered bundles) from the rest service
* fetches each bundle of every plugin
* executes each bundle
* starts the rest of the application
## Static web resources
A plugin can also store static files in the `src/main/webapp` directory.
All files of the webapp directory can be resolved relative to the root of the application e.g. the file
`src/main/webapp/images/logo.jpg` of a plugin can be resolved at `http://localhost:8081/scm/images/logo.jpg`