CCM NG: Integration of Node/NPM modules into build
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@5460 8810af33-2d31-482b-a856-94f89814c4dfccm-docs
parent
7d84a9fe8a
commit
3ccda6dda5
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"name": "ccm-cms-js",
|
||||
"version": "7.0.0",
|
||||
"description": "JavaScript for the ccm-cms-module",
|
||||
"repository": {
|
||||
"type": "svn",
|
||||
"url": "https://svn.libreccm.org/ccm/ccm_ng/ccm-cms-js"
|
||||
},
|
||||
"author": "Jens Pelzetter",
|
||||
"license": "GPL-3.0",
|
||||
"scripts": {
|
||||
"build": "webpack",
|
||||
"tslint": "tslint --project ."
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^16.3.2",
|
||||
"react-dom": "^16.3.2",
|
||||
"react-redux": "^5.0.7",
|
||||
"redux": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^16.3.14",
|
||||
"@types/react-dom": "^16.0.5",
|
||||
"ts-loader": "^4.3.0",
|
||||
"tslint": "^5.10.0",
|
||||
"typescript": "^2.8.3",
|
||||
"webpack": "^4.8.1",
|
||||
"webpack-cli": "^2.1.3",
|
||||
"ccm-pagemodelseditor": "^7.0.0-SNAPSHOT"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
<?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>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<timestamp>${maven.build.timestamp}</timestamp>
|
||||
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'Z</maven.build.timestamp.format>
|
||||
</properties>
|
||||
|
||||
<parent>
|
||||
<artifactId>libreccm-parent</artifactId>
|
||||
<groupId>org.libreccm</groupId>
|
||||
<version>7.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.librecms</groupId>
|
||||
<artifactId>ccm-cms-js</artifactId>
|
||||
<version>7.0.0-SNAPSHOT</version>
|
||||
|
||||
<name>LibreCMS JS</name>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Lesser GPL 2.1</name>
|
||||
<url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.libreccm</groupId>
|
||||
<artifactId>ccm-pagemodelseditor</artifactId>
|
||||
<version>7.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>ccm-cms-js</finalName>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/typescript</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${project.build.directory}/generated-resources</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${project.build.directory}/maven-shared-archive-resources/ccm-pagemodelseditor</directory>
|
||||
</resource>
|
||||
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-remote-resources-plugin</artifactId>
|
||||
<version>1.5</version>
|
||||
<configuration>
|
||||
<resourceBundles>
|
||||
<resourceBundle>org.libreccm:ccm-pagemodelseditor:${project.version}</resourceBundle>
|
||||
</resourceBundles>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>process</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>com.github.eirslett</groupId>
|
||||
<artifactId>frontend-maven-plugin</artifactId>
|
||||
|
||||
<configuration>
|
||||
<installDirectory>../node</installDirectory>
|
||||
</configuration>
|
||||
|
||||
<executions>
|
||||
<execution>
|
||||
<id>Install node.js and NPM</id>
|
||||
<goals>
|
||||
<goal>install-node-and-npm</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<nodeVersion>v8.11.1</nodeVersion>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>npm link ccm-pagemodelseditor</id>
|
||||
<goals>
|
||||
<goal>npm</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<arguments>link ccm-pagemodelseditor</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>npm install</id>
|
||||
<goals>
|
||||
<goal>npm</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>build</id>
|
||||
<goals>
|
||||
<goal>npm</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<arguments>run build</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
import * as React from "react";
|
||||
import { render } from "react-dom";
|
||||
|
||||
import { PageModelEditor } from "../ccm-pagemodelseditor/PageModelsEditor";
|
||||
|
||||
render(
|
||||
<PageModelEditor />,
|
||||
document.getElementById("cms-content"),
|
||||
);
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"jsx": "React",
|
||||
"module": "amd",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "target/generated-resources/dist",
|
||||
"sourceMap": true,
|
||||
"target": "es6"
|
||||
},
|
||||
"include": [
|
||||
"src/main/typescript/**/*"
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"defaultSeverity": "error",
|
||||
"extends": [
|
||||
"tslint:recommended"
|
||||
],
|
||||
"jsRules": {},
|
||||
"rules": {
|
||||
"interface-name": {
|
||||
"options": ["never-prefix"]
|
||||
},
|
||||
"max-classes-per-file": {
|
||||
"options": [100]
|
||||
},
|
||||
"max-line-length": {
|
||||
"options": [80]
|
||||
}
|
||||
},
|
||||
"rulesDirectory": []
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
|
||||
devtool: "inline-source-map",
|
||||
|
||||
entry: {
|
||||
ccmcms: "./src/main/typescript/ccm-cms/ccm-cms-pagemodelseditor.tsx"
|
||||
},
|
||||
|
||||
output: {
|
||||
//path: path.resolve(__dirname, "src/main/resources/dist"),
|
||||
path: path.resolve(__dirname, "target/generated-resources/dist"),
|
||||
filename: "ccm-cms-pagemodelseditor.js"
|
||||
},
|
||||
|
||||
resolve: {
|
||||
extensions: [".webpack.js", "web.js", ".ts", ".tsx", ".js"]
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{ test: /\.tsx?$/, loader: "ts-loader"}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ccm-pagemodelseditor",
|
||||
"version": "7.0.0",
|
||||
"version": "7.0.0-SNAPSHOT",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "ccm-pagemodelseditor",
|
||||
"version": "7.0.0",
|
||||
"version": "7.0.0-SNAPSHOT",
|
||||
"main": "index.js",
|
||||
"description": "Editor for PageModels build using React.js",
|
||||
"repository": {
|
||||
"type": "svn",
|
||||
|
|
|
|||
|
|
@ -70,6 +70,10 @@
|
|||
<groupId>com.github.eirslett</groupId>
|
||||
<artifactId>frontend-maven-plugin</artifactId>
|
||||
|
||||
<configuration>
|
||||
<installDirectory>../node</installDirectory>
|
||||
</configuration>
|
||||
|
||||
<executions>
|
||||
<execution>
|
||||
<id>Install node.js and NPM</id>
|
||||
|
|
@ -85,6 +89,9 @@
|
|||
<goals>
|
||||
<goal>npm</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<arguments>install</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>build</id>
|
||||
|
|
@ -95,6 +102,15 @@
|
|||
<arguments>run build</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>npm link</id>
|
||||
<goals>
|
||||
<goal>npm</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<arguments>link</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue