mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-17 18:51:10 +01:00
create bundle for git plugin
This commit is contained in:
13
scm-plugins/scm-git-plugin/package.json
Normal file
13
scm-plugins/scm-git-plugin/package.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -61,6 +61,38 @@
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|||||||
31
scm-plugins/scm-git-plugin/src/main/js/CloneInformation.js
Normal file
31
scm-plugins/scm-git-plugin/src/main/js/CloneInformation.js
Normal 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;
|
||||||
4
scm-plugins/scm-git-plugin/src/main/js/index.js
Normal file
4
scm-plugins/scm-git-plugin/src/main/js/index.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
import { binder } from "@scm-manager/ui-extensions";
|
||||||
|
import CloneInformation from './CloneInformation';
|
||||||
|
|
||||||
|
binder.bind("repos.repository-details.informations", CloneInformation);
|
||||||
2188
scm-plugins/scm-git-plugin/yarn.lock
Normal file
2188
scm-plugins/scm-git-plugin/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user