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

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -42,12 +42,12 @@
</dependency>
</dependencies>
<!-- create test jar -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
@@ -60,20 +60,52 @@
</execution>
</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>
<!-- for jgit -->
<repositories>
<repository>
<id>maven.scm-manager.org</id>
<name>scm-manager release repository</name>
<url>http://maven.scm-manager.org/nexus/content/groups/public</url>
</repository>
</repositories>
</project>

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