Jean-Yves Didier

renamed files for more logical webpack organization

......@@ -24,7 +24,7 @@ We suppose that npm is already installed. Then, you will have to setup your
development environment by typing these commands,
the last one being executed in the local sources repository:
`npm install -g webpack`
`npm install -g webpack-cli`
`npm install -g eslint`
......
/******/ "use strict";
/******/ var __webpack_modules__ = ([
/* 0 */,
/* 0 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
/* harmony import */ var _statemachine_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
/* harmony import */ var _isinnode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
/* harmony import */ var _context_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
/* harmony import */ var _invocation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8);
/* harmony import */ var _connection_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9);
/* harmony import */ var _sheet_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10);
/* harmony import */ var _application_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11);
// no longer needed with the use of imports
let ARCS = {
Component: _component_js__WEBPACK_IMPORTED_MODULE_0__.default,
isInNode : _isinnode_js__WEBPACK_IMPORTED_MODULE_2__.default,
StateMachine: _statemachine_js__WEBPACK_IMPORTED_MODULE_1__.default,
Context: _context_js__WEBPACK_IMPORTED_MODULE_3__.default,
Invocation: _invocation_js__WEBPACK_IMPORTED_MODULE_4__.default,
Connection: _connection_js__WEBPACK_IMPORTED_MODULE_5__.default,
Sheet: _sheet_js__WEBPACK_IMPORTED_MODULE_6__.default,
Application: _application_js__WEBPACK_IMPORTED_MODULE_7__.default
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ARCS);
/***/ }),
/* 1 */
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
......@@ -1214,7 +1253,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _statemachine_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _arcs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6);
/* harmony import */ var _arcs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
......@@ -2264,46 +2303,11 @@ Application.slot("finish");
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
(() => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
/* harmony import */ var _statemachine_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
/* harmony import */ var _arcs_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
/* harmony import */ var _context_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
/* harmony import */ var _invocation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8);
/* harmony import */ var _connection_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9);
/* harmony import */ var _sheet_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10);
/* harmony import */ var _application_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11);
// no longer needed with the use of imports
let ARCS = {
Component: _component_js__WEBPACK_IMPORTED_MODULE_0__.default,
isInNode : _arcs_js__WEBPACK_IMPORTED_MODULE_2__.default,
StateMachine: _statemachine_js__WEBPACK_IMPORTED_MODULE_1__.default,
Context: _context_js__WEBPACK_IMPORTED_MODULE_3__.default,
Invocation: _invocation_js__WEBPACK_IMPORTED_MODULE_4__.default,
Connection: _connection_js__WEBPACK_IMPORTED_MODULE_5__.default,
Sheet: _sheet_js__WEBPACK_IMPORTED_MODULE_6__.default,
Application: _application_js__WEBPACK_IMPORTED_MODULE_7__.default
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ARCS);
})();
var __webpack_exports__default = __webpack_exports__.default;
export { __webpack_exports__default as default };
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module is referenced by other modules so it can't be inlined
/******/ var __webpack_exports__ = __webpack_require__(0);
/******/ var __webpack_exports__default = __webpack_exports__.default;
/******/ export { __webpack_exports__default as default };
/******/
......
This diff is collapsed. Click to expand it.
/**
* Bootstrap for the ARCS engine in a browser environment.
* It relies on require.js to get the job done.
* @file
*/
"use strict";
// basically, here we start by importing the module ARCS
//import ARCS from './exports.js';
import ARCS from "./arcs.js";
console.log("[ARCS] Bootstrapping...");
var baseUrl, appDescription, requireMarkup, xhr;
requireMarkup = document.querySelector('[data-arcsapp]');
if (requireMarkup !== undefined) {
baseUrl = requireMarkup.dataset.baseUrl ;
appDescription = requireMarkup.dataset.arcsapp || "arcsapp.json";
}
(async function toto() {
var description = await(fetch(appDescription));
var applicationObject = await(description.json());
console.log("[ARCS] Application description loaded");
var aap = new ARCS.Application();
aap.import(applicationObject);
aap.start();
})();
......@@ -10,7 +10,7 @@
"main": "build/arcs.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
},
"keywords": [
"Augmented",
"Reality"
......@@ -30,10 +30,12 @@
"author": "Jean-Yves Didier",
"license": "GPL-3.0-or-later",
"dependencies": {
"tracking": ">=1.1.3",
"three": ">=0.131",
"codemirror": ">=5.62",
"eslint": "^7.32.0",
"js-aruco": ">=0.1",
"codemirror": ">=5.62"
"three": ">=0.131",
"tracking": ">=1.1.3",
"webpack": "^5.51.1"
},
"devDependencies": {
"copy-webpack-plugin": "^9.0.1",
......
// ARCS.js : 27/6/2014 16:00
// handling dependencies
//"use strict";
/**
* Main source: describes all the methods needed by the ARCS engine
* @file
*/
/******************************************************************************
* Helper functions to determine environment
* ***************************************************************************/
/**
* @return {boolean} true if ARCS is run in a node.js environment
*/
export default function isInNode() {
return (typeof process !== 'undefined') &&
(process.release.name.search(/node|io.js/) !== -1);
// return (typeof require === 'function' && require.resolve);
// no longer needed with the use of imports
import Component from './component.js';
import StateMachine from './statemachine.js';
import isInNode from './isinnode.js';
import Context from './context.js';
import Invocation from './invocation.js';
import Connection from './connection.js';
import Sheet from './sheet.js';
import Application from './application.js';
let ARCS = {
Component: Component,
isInNode : isInNode,
StateMachine: StateMachine,
Context: Context,
Invocation: Invocation,
Connection: Connection,
Sheet: Sheet,
Application: Application
};
export default ARCS;
......
// no longer needed with the use of imports
import Component from './component.js';
import StateMachine from './statemachine.js';
import isInNode from './arcs.js';
import Context from './context.js';
import Invocation from './invocation.js';
import Connection from './connection.js';
import Sheet from './sheet.js';
import Application from './application.js';
let ARCS = {
Component: Component,
isInNode : isInNode,
StateMachine: StateMachine,
Context: Context,
Invocation: Invocation,
Connection: Connection,
Sheet: Sheet,
Application: Application
};
export default ARCS;
// ARCS.js : 27/6/2014 16:00
// handling dependencies
//"use strict";
/**
* Main source: describes all the methods needed by the ARCS engine
* @file
*/
/******************************************************************************
* Helper functions to determine environment
* ***************************************************************************/
/**
* @return {boolean} true if ARCS is run in a node.js environment
*/
export default function isInNode() {
return (typeof process !== 'undefined') &&
(process.release.name.search(/node|io.js/) !== -1);
// return (typeof require === 'function' && require.resolve);
};
......@@ -11,7 +11,7 @@ module.exports = [
},
entry: {
'arcs' : {
import : './src/exports.js',
import : './src/arcs.js',
},
},
mode: 'none',
......@@ -46,7 +46,7 @@ module.exports = [
},
entry: {
'arcs' : {
import : './src/exports.js',
import : './src/arcs.js',
},
},
mode: 'production',
......@@ -163,20 +163,6 @@ module.exports = [
/*** parts of gruntfile not processed yet
- minification with probably some custom targets
files: {
'build/arcs.min.js': [
'build/arcs.js'
],
'build/arcs_browser.min.js': [
'src/arcs_browser.js'
],
'build/arcseditor.min.js': [
'build/arcseditor.js'
]
}
- editor (to rebuild from scratch)
editor : {
......