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 ...@@ -24,7 +24,7 @@ We suppose that npm is already installed. Then, you will have to setup your
24 development environment by typing these commands, 24 development environment by typing these commands,
25 the last one being executed in the local sources repository: 25 the last one being executed in the local sources repository:
26 26
27 -`npm install -g webpack` 27 +`npm install -g webpack-cli`
28 28
29 `npm install -g eslint` 29 `npm install -g eslint`
30 30
......
1 -/******/ "use strict";
2 /******/ var __webpack_modules__ = ([ 1 /******/ var __webpack_modules__ = ([
3 -/* 0 */, 2 +/* 0 */
3 +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4 +
5 +__webpack_require__.r(__webpack_exports__);
6 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
7 +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
8 +/* harmony export */ });
9 +/* harmony import */ var _component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
10 +/* harmony import */ var _statemachine_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
11 +/* harmony import */ var _isinnode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
12 +/* harmony import */ var _context_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
13 +/* harmony import */ var _invocation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8);
14 +/* harmony import */ var _connection_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9);
15 +/* harmony import */ var _sheet_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10);
16 +/* harmony import */ var _application_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11);
17 +// no longer needed with the use of imports
18 +
19 +
20 +
21 +
22 +
23 +
24 +
25 +
26 +
27 +
28 +let ARCS = {
29 + Component: _component_js__WEBPACK_IMPORTED_MODULE_0__.default,
30 + isInNode : _isinnode_js__WEBPACK_IMPORTED_MODULE_2__.default,
31 + StateMachine: _statemachine_js__WEBPACK_IMPORTED_MODULE_1__.default,
32 + Context: _context_js__WEBPACK_IMPORTED_MODULE_3__.default,
33 + Invocation: _invocation_js__WEBPACK_IMPORTED_MODULE_4__.default,
34 + Connection: _connection_js__WEBPACK_IMPORTED_MODULE_5__.default,
35 + Sheet: _sheet_js__WEBPACK_IMPORTED_MODULE_6__.default,
36 + Application: _application_js__WEBPACK_IMPORTED_MODULE_7__.default
37 +};
38 +
39 +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ARCS);
40 +
41 +
42 +/***/ }),
4 /* 1 */ 43 /* 1 */
5 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 44 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6 45
...@@ -1214,7 +1253,7 @@ __webpack_require__.r(__webpack_exports__); ...@@ -1214,7 +1253,7 @@ __webpack_require__.r(__webpack_exports__);
1214 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 1253 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1215 /* harmony export */ }); 1254 /* harmony export */ });
1216 /* harmony import */ var _statemachine_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); 1255 /* harmony import */ var _statemachine_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
1217 -/* harmony import */ var _arcs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6); 1256 +/* harmony import */ var _arcs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
1218 1257
1219 1258
1220 1259
...@@ -2264,46 +2303,11 @@ Application.slot("finish"); ...@@ -2264,46 +2303,11 @@ Application.slot("finish");
2264 /******/ })(); 2303 /******/ })();
2265 /******/ 2304 /******/
2266 /************************************************************************/ 2305 /************************************************************************/
2267 -var __webpack_exports__ = {}; 2306 +/******/
2268 -// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. 2307 +/******/ // startup
2269 -(() => { 2308 +/******/ // Load entry module and return exports
2270 -__webpack_require__.r(__webpack_exports__); 2309 +/******/ // This entry module is referenced by other modules so it can't be inlined
2271 -/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2310 +/******/ var __webpack_exports__ = __webpack_require__(0);
2272 -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 2311 +/******/ var __webpack_exports__default = __webpack_exports__.default;
2273 -/* harmony export */ }); 2312 +/******/ export { __webpack_exports__default as default };
2274 -/* harmony import */ var _component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); 2313 +/******/
2275 -/* harmony import */ var _statemachine_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
2276 -/* harmony import */ var _arcs_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
2277 -/* harmony import */ var _context_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
2278 -/* harmony import */ var _invocation_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8);
2279 -/* harmony import */ var _connection_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9);
2280 -/* harmony import */ var _sheet_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10);
2281 -/* harmony import */ var _application_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11);
2282 -// no longer needed with the use of imports
2283 -
2284 -
2285 -
2286 -
2287 -
2288 -
2289 -
2290 -
2291 -
2292 -
2293 -let ARCS = {
2294 - Component: _component_js__WEBPACK_IMPORTED_MODULE_0__.default,
2295 - isInNode : _arcs_js__WEBPACK_IMPORTED_MODULE_2__.default,
2296 - StateMachine: _statemachine_js__WEBPACK_IMPORTED_MODULE_1__.default,
2297 - Context: _context_js__WEBPACK_IMPORTED_MODULE_3__.default,
2298 - Invocation: _invocation_js__WEBPACK_IMPORTED_MODULE_4__.default,
2299 - Connection: _connection_js__WEBPACK_IMPORTED_MODULE_5__.default,
2300 - Sheet: _sheet_js__WEBPACK_IMPORTED_MODULE_6__.default,
2301 - Application: _application_js__WEBPACK_IMPORTED_MODULE_7__.default
2302 -};
2303 -
2304 -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ARCS);
2305 -
2306 -})();
2307 -
2308 -var __webpack_exports__default = __webpack_exports__.default;
2309 -export { __webpack_exports__default as default };
......
This diff is collapsed. Click to expand it.
1 +
2 +/**
3 + * Bootstrap for the ARCS engine in a browser environment.
4 + * It relies on require.js to get the job done.
5 + * @file
6 + */
7 +"use strict";
8 +
9 +// basically, here we start by importing the module ARCS
10 +//import ARCS from './exports.js';
11 +import ARCS from "./arcs.js";
12 +
13 +console.log("[ARCS] Bootstrapping...");
14 +
15 +var baseUrl, appDescription, requireMarkup, xhr;
16 +
17 +requireMarkup = document.querySelector('[data-arcsapp]');
18 +if (requireMarkup !== undefined) {
19 + baseUrl = requireMarkup.dataset.baseUrl ;
20 + appDescription = requireMarkup.dataset.arcsapp || "arcsapp.json";
21 +}
22 +
23 +
24 +(async function toto() {
25 +var description = await(fetch(appDescription));
26 +var applicationObject = await(description.json());
27 +
28 +
29 +console.log("[ARCS] Application description loaded");
30 +
31 +var aap = new ARCS.Application();
32 +aap.import(applicationObject);
33 +aap.start();
34 +})();
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
10 "main": "build/arcs.js", 10 "main": "build/arcs.js",
11 "scripts": { 11 "scripts": {
12 "test": "echo \"Error: no test specified\" && exit 1" 12 "test": "echo \"Error: no test specified\" && exit 1"
13 - }, 13 + },
14 "keywords": [ 14 "keywords": [
15 "Augmented", 15 "Augmented",
16 "Reality" 16 "Reality"
...@@ -30,10 +30,12 @@ ...@@ -30,10 +30,12 @@
30 "author": "Jean-Yves Didier", 30 "author": "Jean-Yves Didier",
31 "license": "GPL-3.0-or-later", 31 "license": "GPL-3.0-or-later",
32 "dependencies": { 32 "dependencies": {
33 - "tracking": ">=1.1.3", 33 + "codemirror": ">=5.62",
34 - "three": ">=0.131", 34 + "eslint": "^7.32.0",
35 "js-aruco": ">=0.1", 35 "js-aruco": ">=0.1",
36 - "codemirror": ">=5.62" 36 + "three": ">=0.131",
37 + "tracking": ">=1.1.3",
38 + "webpack": "^5.51.1"
37 }, 39 },
38 "devDependencies": { 40 "devDependencies": {
39 "copy-webpack-plugin": "^9.0.1", 41 "copy-webpack-plugin": "^9.0.1",
......
1 -// ARCS.js : 27/6/2014 16:00 1 +// no longer needed with the use of imports
2 -// handling dependencies 2 +
3 - 3 +import Component from './component.js';
4 - 4 +import StateMachine from './statemachine.js';
5 -//"use strict"; 5 +import isInNode from './isinnode.js';
6 - 6 +import Context from './context.js';
7 - 7 +import Invocation from './invocation.js';
8 - 8 +import Connection from './connection.js';
9 - 9 +import Sheet from './sheet.js';
10 -/** 10 +import Application from './application.js';
11 - * Main source: describes all the methods needed by the ARCS engine 11 +
12 - * @file 12 +let ARCS = {
13 - */ 13 + Component: Component,
14 - 14 + isInNode : isInNode,
15 - 15 + StateMachine: StateMachine,
16 -/****************************************************************************** 16 + Context: Context,
17 - * Helper functions to determine environment 17 + Invocation: Invocation,
18 - * ***************************************************************************/ 18 + Connection: Connection,
19 - 19 + Sheet: Sheet,
20 -/** 20 + Application: Application
21 - * @return {boolean} true if ARCS is run in a node.js environment
22 - */
23 -
24 -export default function isInNode() {
25 - return (typeof process !== 'undefined') &&
26 - (process.release.name.search(/node|io.js/) !== -1);
27 -
28 - // return (typeof require === 'function' && require.resolve);
29 }; 21 };
30 22
23 +export default ARCS;
......
1 -// no longer needed with the use of imports
2 -
3 -import Component from './component.js';
4 -import StateMachine from './statemachine.js';
5 -import isInNode from './arcs.js';
6 -import Context from './context.js';
7 -import Invocation from './invocation.js';
8 -import Connection from './connection.js';
9 -import Sheet from './sheet.js';
10 -import Application from './application.js';
11 -
12 -let ARCS = {
13 - Component: Component,
14 - isInNode : isInNode,
15 - StateMachine: StateMachine,
16 - Context: Context,
17 - Invocation: Invocation,
18 - Connection: Connection,
19 - Sheet: Sheet,
20 - Application: Application
21 -};
22 -
23 -export default ARCS;
1 +// ARCS.js : 27/6/2014 16:00
2 +// handling dependencies
3 +
4 +
5 +//"use strict";
6 +
7 +
8 +
9 +
10 +/**
11 + * Main source: describes all the methods needed by the ARCS engine
12 + * @file
13 + */
14 +
15 +
16 +/******************************************************************************
17 + * Helper functions to determine environment
18 + * ***************************************************************************/
19 +
20 +/**
21 + * @return {boolean} true if ARCS is run in a node.js environment
22 + */
23 +
24 +export default function isInNode() {
25 + return (typeof process !== 'undefined') &&
26 + (process.release.name.search(/node|io.js/) !== -1);
27 +
28 + // return (typeof require === 'function' && require.resolve);
29 +};
30 +
...@@ -11,7 +11,7 @@ module.exports = [ ...@@ -11,7 +11,7 @@ module.exports = [
11 }, 11 },
12 entry: { 12 entry: {
13 'arcs' : { 13 'arcs' : {
14 - import : './src/exports.js', 14 + import : './src/arcs.js',
15 }, 15 },
16 }, 16 },
17 mode: 'none', 17 mode: 'none',
...@@ -46,7 +46,7 @@ module.exports = [ ...@@ -46,7 +46,7 @@ module.exports = [
46 }, 46 },
47 entry: { 47 entry: {
48 'arcs' : { 48 'arcs' : {
49 - import : './src/exports.js', 49 + import : './src/arcs.js',
50 }, 50 },
51 }, 51 },
52 mode: 'production', 52 mode: 'production',
...@@ -163,20 +163,6 @@ module.exports = [ ...@@ -163,20 +163,6 @@ module.exports = [
163 163
164 /*** parts of gruntfile not processed yet 164 /*** parts of gruntfile not processed yet
165 165
166 - - minification with probably some custom targets
167 -
168 - files: {
169 - 'build/arcs.min.js': [
170 - 'build/arcs.js'
171 - ],
172 - 'build/arcs_browser.min.js': [
173 - 'src/arcs_browser.js'
174 - ],
175 - 'build/arcseditor.min.js': [
176 - 'build/arcseditor.js'
177 - ]
178 - }
179 -
180 - editor (to rebuild from scratch) 166 - editor (to rebuild from scratch)
181 167
182 editor : { 168 editor : {
......