Commit 54b4b139 authored by Matthieu Le Corre's avatar Matthieu Le Corre

webpack setup

Signed-off-by: Matthieu Le Corre's avatarMatthieu Le Corre <matthieu.lecorre@univ-nantes.fr>
parent d1e537bd
nodes_modules
.vscode/
\ No newline at end of file
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports) {
/**
* @author Matthieu Le Corre <matthieu.lecorre@univ-nantes.fr>
*
......@@ -104,3 +194,8 @@ $(document).ready(function () {
});
/***/ })
/******/ ]);
//# sourceMappingURL=main.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/main.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,KAAK;;;AAGL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA,KAAK;;AAEL;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS,E;AACT;AACA,CAAC;;;;;AAKD;;AAEA;;AAEA;;AAEA;;AAEA;;;AAGA,CAAC","file":"main.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/**\n * @author Matthieu Le Corre <matthieu.lecorre@univ-nantes.fr>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n \n/**\n* @namespace whiteboard\n*/\nwhiteboardApp = {\n\n\n // App init\n initialise: function() {\n this.registerFileActions() ;\n },\n\n\n // register file handler\n registerFileActions: function() {\n\n var self = this ;\n\n OCA.Files.fileActions.registerAction({\n name: 'Edit',\n mime: \"application/wbr\",\n actionHandler: self.editAction,\n permissions: OC.PERMISSION_READ,\n icon: function () {\n return OC.imagePath('core', 'actions/edit');\n }\n }) ;\n \n OCA.Files.fileActions.setDefault(\"application/wbr\", 'Edit');\n\n },\n\n //edit\n editAction: function(filename,context) {\n \n dir = context.dir ;\n\n var ncClient = OC.Files.getClient();\n\n fo = ncClient.getFileInfo(dir + \"/\" + filename) ;\n\n console.log( fo) ;\n }\n \n} ;\n\nwhiteboardApp.NewFileMenu = {\n attach: function (menu) {\n\n var fileList = menu.fileList;\n if (fileList.id !== \"files\") {\n return;\n }\n\n menu.addMenuEntry({\n id: \"whiteboard\",\n displayName: t('whiteboard', \"New whiteboard\"),\n templateName: t('whiteboard', \"New whiteboard.wbr\"),\n iconClass: \"icon-whiteboard\",\n fileType: \"application/wbr\",\n actionHandler: function (fileName) {\n var dir = fileList.getCurrentDirectory();\n fileList.createFile(fileName)\n .then(function () {\n console.log(\"new whiteboard\") ;\n });\n }\n }); \n }\n} ;\n\n\n\n\nOCA.whiteboard = whiteboardApp ;\n\nOC.Plugins.register(\"OCA.Files.NewFileMenu\", whiteboardApp.NewFileMenu);\n\n$(document).ready(function () {\n\n console.log(\"Whiteboard registered\") ;\n\n OCA.whiteboard.initialise() ;\n\n\n});\n"],"sourceRoot":""}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "whiteboard",
"version": "0.0.1",
"description": "collaborative whiteboard",
"main": "./js/main.js",
"repository": "https://gitlab.univ-nantes.fr/uncloud/whiteboard.git",
"author": "Matthieu Le Corre <matthieu.lecorre@univ-nantes.fr>",
"license": "AGPL-3.0",
"scripts": {
"build": "NODE_ENV=production webpack --progress --hide-modules --config webpack.prod.js ",
"dev": "NODE_ENV=none webpack --progress --config webpack.dev.js ",
"watch": "NODE_ENV=none webpack --progress --watch --config webpack.dev.js "
},
"devDependencies": {
"webpack": "^4.42.0"
}
}
/**
* @author Matthieu Le Corre <matthieu.lecorre@univ-nantes.fr>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* @namespace whiteboard
*/
whiteboardApp = {
// App init
initialise: function() {
this.registerFileActions() ;
},
// register file handler
registerFileActions: function() {
var self = this ;
OCA.Files.fileActions.registerAction({
name: 'Edit',
mime: "application/wbr",
actionHandler: self.editAction,
permissions: OC.PERMISSION_READ,
icon: function () {
return OC.imagePath('core', 'actions/edit');
}
}) ;
OCA.Files.fileActions.setDefault("application/wbr", 'Edit');
},
//edit
editAction: function(filename,context) {
dir = context.dir ;
var ncClient = OC.Files.getClient();
fo = ncClient.getFileInfo(dir + "/" + filename) ;
console.log( fo) ;
}
} ;
whiteboardApp.NewFileMenu = {
attach: function (menu) {
var fileList = menu.fileList;
if (fileList.id !== "files") {
return;
}
menu.addMenuEntry({
id: "whiteboard",
displayName: t('whiteboard', "New whiteboard"),
templateName: t('whiteboard', "New whiteboard.wbr"),
iconClass: "icon-whiteboard",
fileType: "application/wbr",
actionHandler: function (fileName) {
var dir = fileList.getCurrentDirectory();
fileList.createFile(fileName)
.then(function () {
console.log("new whiteboard") ;
});
}
});
}
} ;
OCA.whiteboard = whiteboardApp ;
OC.Plugins.register("OCA.Files.NewFileMenu", whiteboardApp.NewFileMenu);
$(document).ready(function () {
console.log("Whiteboard registered") ;
OCA.whiteboard.initialise() ;
});
//const webpack = require("webpack");
const path = require("path");
module.exports = {
devtool: 'source-map',
mode: 'none',
entry: {
'main': "./src/main.js"
},
output: {
path: path.resolve(__dirname, "js"),
filename: "[name].js",
jsonpFunction: "webpackJsonpFileWhiteboard"
},
node: {
fs: 'empty'
}
}
const webpack = require("webpack");
const path = require("path");
module.exports = {
devtool: 'source-map',
mode: 'production',
entry: {
'main' : "./src/main.js"
},
output: {
path: path.resolve(__dirname, "js"),
filename: "[name].js",
jsonpFunction: "webpackJsonpWhiteboard"
},
node: {
fs: 'empty'
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment