Browse Source

webpackify workflowengine

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Arthur Schiwon 4 months ago
parent
commit
e5fefd1338

+ 2 - 0
.gitattributes

@@ -17,5 +17,7 @@
 /apps/twofactor_backupcodes/js/*.js.map binary
 /apps/updatenotification/js/updatenotification.js binary
 /apps/updatenotification/js/updatenotification.js.map binary
+/apps/workflowengine/js/*.js binary
+/apps/workflowengine/js/*.js.map binary
 
 /settings/js/vue* binary

+ 1 - 0
apps/workflowengine/.l10nignore

@@ -0,0 +1 @@
+js/checkPlugins.js

File diff suppressed because it is too large
+ 22 - 0
apps/workflowengine/js/workflowengine.js


File diff suppressed because it is too large
+ 1 - 0
apps/workflowengine/js/workflowengine.js.map


+ 1 - 13
apps/workflowengine/lib/AppInfo/Application.php

@@ -60,19 +60,7 @@ class Application extends \OCP\AppFramework\App {
 				]);
 
 				script('workflowengine', [
-					'admin',
-					'templates',
-
-					// Check plugins
-					'filemimetypeplugin',
-					'filenameplugin',
-					'filesizeplugin',
-					'filesystemtagsplugin',
-					'requestremoteaddressplugin',
-					'requesttimeplugin',
-					'requesturlplugin',
-					'requestuseragentplugin',
-					'usergroupmembershipplugin',
+					'workflowengine',
 				]);
 			},
 			-100

apps/workflowengine/js/admin.js → apps/workflowengine/src/admin.js


apps/workflowengine/js/filemimetypeplugin.js → apps/workflowengine/src/filemimetypeplugin.js


apps/workflowengine/js/filenameplugin.js → apps/workflowengine/src/filenameplugin.js


apps/workflowengine/js/filesizeplugin.js → apps/workflowengine/src/filesizeplugin.js


apps/workflowengine/js/filesystemtagsplugin.js → apps/workflowengine/src/filesystemtagsplugin.js


apps/workflowengine/js/requestremoteaddressplugin.js → apps/workflowengine/src/requestremoteaddressplugin.js


apps/workflowengine/js/requesttimeplugin.js → apps/workflowengine/src/requesttimeplugin.js


apps/workflowengine/js/requesturlplugin.js → apps/workflowengine/src/requesturlplugin.js


apps/workflowengine/js/requestuseragentplugin.js → apps/workflowengine/src/requestuseragentplugin.js


apps/workflowengine/js/templates.js → apps/workflowengine/src/templates.js


apps/workflowengine/js/templates/operation.handlebars → apps/workflowengine/src/templates/operation.handlebars


apps/workflowengine/js/templates/operations.handlebars → apps/workflowengine/src/templates/operations.handlebars


apps/workflowengine/js/usergroupmembershipplugin.js → apps/workflowengine/src/usergroupmembershipplugin.js


+ 13 - 0
apps/workflowengine/src/workflowengine.js

@@ -0,0 +1,13 @@
+import './admin'
+import './templates'
+import './filemimetypeplugin'
+import './filenameplugin'
+import './filesizeplugin'
+import './filesystemtagsplugin'
+import './requestremoteaddressplugin'
+import './requesttimeplugin'
+import './requesturlplugin'
+import './requestuseragentplugin'
+import './usergroupmembershipplugin'
+
+window.OCA.WorkflowEngine = OCA.WorkflowEngine

+ 37 - 0
apps/workflowengine/webpack.js

@@ -0,0 +1,37 @@
+const path = require('path');
+
+module.exports = {
+	entry: path.join(__dirname, 'src', 'workflowengine.js'),
+	output: {
+		path: path.resolve(__dirname, './js'),
+		publicPath: '/js/',
+		filename: 'workflowengine.js',
+	},
+	module: {
+		rules: [
+			{
+				test: /\.css$/,
+				use: ['style-loader', 'css-loader']
+			},
+			{
+				test: /\.scss$/,
+				use: ['style-loader', 'css-loader', 'sass-loader']
+			},
+			{
+				test: /\.js$/,
+				loader: 'babel-loader',
+				exclude: /node_modules/
+			},
+			{
+				test: /\.(png|jpg|gif|svg)$/,
+				loader: 'file-loader',
+				options: {
+					name: '[name].[ext]?[hash]'
+				}
+			}
+		]
+	},
+	resolve: {
+		extensions: ['*', '.js']
+	}
+};

+ 3 - 1
webpack.common.js

@@ -10,6 +10,7 @@ const oauth2 = require('./apps/oauth2/webpack')
 const systemtags = require('./apps/systemtags/webpack')
 const twofactor_backupscodes = require('./apps/twofactor_backupcodes/webpack')
 const updatenotifications = require('./apps/updatenotification/webpack')
+const workflowengine = require('./apps/workflowengine/webpack')
 
 module.exports = [].concat(
 	core,
@@ -22,5 +23,6 @@ module.exports = [].concat(
 	oauth2,
 	systemtags,
 	twofactor_backupscodes,
-	updatenotifications
+	updatenotifications,
+	workflowengine
 );