Jean-Yves Didier

added linter as well as cleaner documentation generation

......@@ -5,55 +5,6 @@ module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
copy: {
dist: {
files:[
{src: 'src/arcs_browser.js', dest: 'build/arcs_browser.js'},
{src: 'src/arcs_node.mjs', dest: 'build/arcs_node.mjs'}
]
}
},
jsdoc: {
dist: {
src: ['src/*.js', 'docs/Readme.md'], //, 'components/*.js'],
options: {
/*verbose: true,
access: 'all',
private: true,*/
destination: 'docs/engine',
template: 'docs/arcs',
configure: 'docs/jsdoc.conf.json'
}
},
components : {
src: ['components/*.js', 'deps/surf/surf.js', 'deps/pose/posit_gen.js'],
options: {
verbose: true,
destination: 'docs/components',
template: 'docs/arcs',
configure: 'docs/jsdoc.conf.json'
}
}
},
jslint: {
dist: {
src: ['*.js'],
exclude: ['require.js', 'text.js'],
directives: {
node: true,
sloppy: true,
plusplus: true,
forin: true,
devel: true,
white: true,
predef: ['define', 'arcs_module', 'document']
//browser: true,
}
}
},
terser: {
build: {
files: {
......@@ -114,23 +65,6 @@ module.exports = function (grunt) {
}
},
concat: {
dist: {
src: [
'src/arcs.js', *
'src/component.js', *
'src/context.js', *
'src/invocation.js', *
'src/connection.js', *
'src/sheet.js',
'src/eventlogicparser.js', *
'src/tokenevent.js', *
'src/transitionnetwork.js', *
'src/statemachine.js', *
'src/application.js',
'src/exports.js' *
],
dest: 'build/arcs.js'
},
editor : {
src: [
'utils/editor/arcseditor.js',
......
......@@ -1260,7 +1260,7 @@ let Context = function( ctx ) {
}
var loadDataFile =async function(fileName) {
var loadDataFile = async function(fileName) {
var dataPromise ;
if ((0,_arcs_js__WEBPACK_IMPORTED_MODULE_1__.default)()) {
......
......@@ -308,10 +308,6 @@ ARViewer = ARCS.Component.create(
}
},
<<<<<<< HEAD
[ 'deps/three.js/index','deps/three.js/frustumcamera']
);
=======
/** @lends ARViewer.slots */
[
'setWidgets','setFocal','viewAll','setSize','addScene',
......@@ -324,4 +320,3 @@ ARViewer = ARCS.Component.create(
export default {ARViewer: ARViewer};
>>>>>>> modules
......
{
"plugins": ["sigslot.js"],
"source" : {
"include" : [ "../components", "Readme.md", "../deps/surf/surf.js", "../deps/pose/posit_gen.js" ]
},
"opts" : {
"template": "arcs",
"destination": "components"
}
}
{
"plugins": ["sigslot.js"],
"source" : {
"include" : [ "../src", "Readme.md" ]
},
"opts" : {
"template": "arcs",
"destination": "engine"
}
}
{
"plugins": ["docs/sigslot.js"]
}
{
"name": "ARCS",
"version": "0.1.0",
"version": "0.9.0",
"description": "Augmented Reality Component System in web browser and node environment",
"main": "build/arcs.js",
"scripts": {
......@@ -10,6 +10,18 @@
"Augmented",
"Reality"
],
"eslintConfig": {
"env": {
"browser": true,
"es2021": true
},
"parserOptions": {
"sourceType": "module"
},
"rules": {
"func-style": "off"
}
},
"author": "Jean-Yves Didier",
"license": "GPL-3.0-or-later",
"dependencies": {
......@@ -19,15 +31,8 @@
"codemirror": ">=5.62"
},
"devDependencies": {
"bower": ">=1.3.9",
"grunt": ">=0.4.5",
"grunt-jslint": ">=1.1.12",
"grunt-terser": "*",
"grunt-jsdoc": ">=0.5.6",
"grunt-bower-task": ">=0.4.0",
"grunt-contrib-concat": ">=0.5.0",
"grunt-contrib-copy": ">=1.0.0",
"grunt-file-append": ">=0.0.7",
"grunt-string-replace": ">=1.3.1"
"copy-webpack-plugin": "^9.0.1",
"eslint-webpack-plugin": "^3.0.1",
"jsdoc-webpack-plugin": "^0.3.0"
}
}
......
......@@ -7,8 +7,8 @@
"use strict";
// basically, here we start by importing the module ARCS
import ARCS from './exports.js';
//import ARCS from './exports.js';
import ARCS from "./arcs.js";
console.log("[ARCS] Bootstrapping...");
......
......@@ -43,7 +43,7 @@ let Context = function( ctx ) {
}
var loadDataFile =async function(fileName) {
var loadDataFile = async function(fileName) {
var dataPromise ;
if (isInNode()) {
......
const path = require('path');
const jsdoc = require('jsdoc-webpack-plugin');
const copy = require('copy-webpack-plugin');
const eslint = require('eslint-webpack-plugin');
module.exports = {
experiments : {
......@@ -8,10 +11,6 @@ module.exports = {
'arcs' : {
import : './src/exports.js',
},
'arcs_browser' : {
import : './src/arcs_browser.js'
//dependOn : ['arcs']
}
},
mode: 'none',
output: {
......@@ -27,5 +26,26 @@ module.exports = {
commonjsMagicComments: true
}
}
}
},
plugins: [
new jsdoc({
conf: 'docs/engine.conf.json',
destination: 'docs/engine',
template: 'docs/arcs',
}),
new jsdoc({
conf: 'docs/components.conf.json',
destination: 'docs/components',
template: 'docs/arcs',
}),
new copy({
patterns: [
{ from : 'src/arcs_browser.js', to: 'arcs_browser.js'},
{ from: 'src/arcs_node.mjs', to: 'arcs_node.mjs'}
// TODO put here also files for dep directory.
// can also prepend content and replace strings using the transform property!
]
}),
new eslint({})
]
};
......