create bundle for git plugin

This commit is contained in:
Sebastian Sdorra
2018-08-21 14:56:44 +02:00
parent 84e729793b
commit e2fa2388f1
5 changed files with 2277 additions and 9 deletions

View File

@@ -0,0 +1,13 @@
{
"name": "@scm-manager/scm-git-plugin",
"main": "src/main/js/index.js",
"scripts": {
"build": "ui-bundler build"
},
"dependencies": {
"@scm-manager/ui-extensions": "^0.0.3"
},
"devDependencies": {
"@scm-manager/ui-bundler": "^0.0.1"
}
}

View File

@@ -61,6 +61,38 @@
</executions>
</plugin>
<plugin>
<groupId>com.github.sdorra</groupId>
<artifactId>buildfrontend-maven-plugin</artifactId>
<version>2.0.1</version>
<configuration>
<node>
<version>8.11.3</version>
</node>
<pkgManager>
<type>YARN</type>
<version>1.7.0</version>
</pkgManager>
<script>build</script>
</configuration>
<executions>
<execution>
<id>install</id>
<phase>process-resources</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
<execution>
<id>build</id>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@@ -0,0 +1,31 @@
//@flow
import React from 'react';
// TODO flow types ???
type Props = {
repository: Object
}
class CloneInformation extends React.Component<Props> {
render() {
const { repository } = this.repository;
if (repository.type !== "git") {
return null;
}
if (!repository._links.httpProtocol) {
return null;
}
return (
<div>
<h2>Git</h2>
<pre><code>
git clone { repository._links.httpProtocol }
</code></pre>
</div>
);
}
}
export default CloneInformation;

View File

@@ -0,0 +1,4 @@
import { binder } from "@scm-manager/ui-extensions";
import CloneInformation from './CloneInformation';
binder.bind("repos.repository-details.informations", CloneInformation);

File diff suppressed because it is too large Load Diff