lincd-cli 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/defaults/app/Gruntfile.js +2 -10
- package/defaults/app/package.json +1 -1
- package/defaults/app2/frontend/scripts/build.js +100 -0
- package/defaults/app2/frontend/web/favicon.ico +0 -0
- package/defaults/app2/package.json +71 -0
- package/defaults/app2/tailwind.config.js +3 -0
- package/defaults/app3/.env-cmdrc +12 -0
- package/defaults/app3/backend/server.js +5 -0
- package/defaults/app3/frontend/scripts/build.js +34 -0
- package/defaults/app3/frontend/scripts/webpack-config.js +121 -0
- package/defaults/app3/frontend/web/favicon.ico +0 -0
- package/defaults/app3/package.json +77 -0
- package/defaults/app3/tailwind.config.js +3 -0
- package/defaults/module/package.json +1 -1
- package/lib/cli.js +21 -25
- package/lib/config-grunt.js +2 -2
- package/lib/config-webpack.js +19 -7
- package/lib/utils.js +1 -1
- package/package.json +4 -3
- package/cli.js +0 -1209
- package/config-generator.js +0 -568
- package/defaults/app/src/App.tsx +0 -5
- package/defaults/app/src/index.tsx +0 -10
- package/defaults/app/tsconfig.json +0 -18
- package/defaults/module/Gruntfile.js +0 -16
- package/defaults/module/src/components/ExampleComponent.tsx +0 -20
- package/defaults/module/src/data/example-ontology.json +0 -20
- package/defaults/module/src/data/example-ontology.json.d.ts +0 -1
- package/defaults/module/src/index.ts +0 -7
- package/defaults/module/src/module.ts +0 -4
- package/defaults/module/src/ontologies/example-ontology.ts +0 -36
- package/defaults/module/src/shapes/ExampleShapeClass.ts +0 -29
- package/defaults/module/tsconfig-es5.json +0 -18
- package/defaults/module/tsconfig.json +0 -18
- package/index.js +0 -26
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {NamedNode} from 'lincd/lib/models';
|
|
2
|
-
import {JSONLD} from 'lincd-jsonld/lib/JSONLD';
|
|
3
|
-
import {createNameSpace} from 'lincd/lib/utils/NameSpace';
|
|
4
|
-
import {linkedOntology} from '../module';
|
|
5
|
-
//import all the exports of this file as one variable called _this (we need this at the end)
|
|
6
|
-
import * as _this from './${hyphen_name}';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Load the data of this ontology into memory, thus adding the properties of the entities of this ontology to the local graph.
|
|
10
|
-
*/
|
|
11
|
-
export var loadData = () => {
|
|
12
|
-
return import('../data/${hyphen_name}.json').then((data) => JSONLD.parse(data));
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* The namespace of this ontology, which can be used to create NamedNodes with URI's not listed in this file
|
|
17
|
-
*/
|
|
18
|
-
export var ns = createNameSpace('${uri_base}');
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* The NamedNode of the ontology itself
|
|
22
|
-
*/
|
|
23
|
-
export var _self: NamedNode = ns('');
|
|
24
|
-
|
|
25
|
-
//A list of all the entities (Classes & Properties) of this ontology, each exported as a NamedNode
|
|
26
|
-
export var ExampleClass: NamedNode = ns('ExampleClass');
|
|
27
|
-
export var exampleProperty: NamedNode = ns('exampleProperty');
|
|
28
|
-
|
|
29
|
-
//An extra grouping object so all the entities can be accessed from the prefix/name
|
|
30
|
-
export const ${camel_name} = {
|
|
31
|
-
ExampleClass,
|
|
32
|
-
exampleProperty,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
//Registers this ontology to LINCD.JS, so that data loading can be automated amongst other things
|
|
36
|
-
linkedOntology(_this, ns, '${hyphen_name}', loadData, '../data/${hyphen_name}.json');
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {Shape} from 'lincd/lib/shapes/Shape';
|
|
2
|
-
import {Literal, NamedNode} from 'lincd/lib/models';
|
|
3
|
-
import {linkedShape} from '../module';
|
|
4
|
-
import {literalProperty} from 'lincd/lib/utils/ShapeDecorators';
|
|
5
|
-
import {${camel_name}} from '../ontologies/${hyphen_name}';
|
|
6
|
-
|
|
7
|
-
@linkedShape
|
|
8
|
-
export class ExampleShapeClass extends Shape {
|
|
9
|
-
/**
|
|
10
|
-
* indicates that instances of this shape need to have this rdf.type
|
|
11
|
-
*/
|
|
12
|
-
static targetClass: NamedNode = ${camel_name}.ExampleClass;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* instances of this shape need to have exactly one value defined for the given property
|
|
16
|
-
*/
|
|
17
|
-
@literalProperty({
|
|
18
|
-
path: ${camel_name}.exampleProperty,
|
|
19
|
-
required: true,
|
|
20
|
-
maxCount: 1,
|
|
21
|
-
})
|
|
22
|
-
get name() {
|
|
23
|
-
return this.getValue(${camel_name}.exampleProperty);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
set name(val: string) {
|
|
27
|
-
this.overwrite(${camel_name}.exampleProperty, new Literal(val));
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"sourceMap": true,
|
|
5
|
-
"target": "es5",
|
|
6
|
-
"outDir": "lib",
|
|
7
|
-
"declaration": false,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"resolveJsonModule": true,
|
|
10
|
-
"downlevelIteration": true,
|
|
11
|
-
"experimentalDecorators": true,
|
|
12
|
-
"skipLibCheck": true,
|
|
13
|
-
"jsx": "react",
|
|
14
|
-
"baseUrl": "./",
|
|
15
|
-
"rootDir": "src"
|
|
16
|
-
},
|
|
17
|
-
"files": ["./src/index.ts"]
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"module": "commonjs",
|
|
4
|
-
"sourceMap": true,
|
|
5
|
-
"target": "es6",
|
|
6
|
-
"outDir": "lib",
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"resolveJsonModule": true,
|
|
10
|
-
"downlevelIteration": true,
|
|
11
|
-
"experimentalDecorators": true,
|
|
12
|
-
"skipLibCheck": true,
|
|
13
|
-
"jsx": "react",
|
|
14
|
-
"baseUrl": "./",
|
|
15
|
-
"rootDir": "src"
|
|
16
|
-
},
|
|
17
|
-
"files": ["./src/index.ts"]
|
|
18
|
-
}
|
package/index.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
exports.__esModule = true;
|
|
17
|
-
exports.generateWebpackConfig = exports.generateGruntConfig = exports.externaliseModules = exports.DeclarationPlugin = void 0;
|
|
18
|
-
var declaration_plugin_1 = require("./plugins/declaration-plugin");
|
|
19
|
-
__createBinding(exports, declaration_plugin_1, "default", "DeclarationPlugin");
|
|
20
|
-
var externalise_modules_1 = require("./plugins/externalise-modules");
|
|
21
|
-
__createBinding(exports, externalise_modules_1, "default", "externaliseModules");
|
|
22
|
-
var config_generator_1 = require("./config-generator");
|
|
23
|
-
__createBinding(exports, config_generator_1, "default", "generateGruntConfig");
|
|
24
|
-
var config_generator_2 = require("./config-generator");
|
|
25
|
-
exports.generateWebpackConfig = config_generator_2.generateWebpackConfig;
|
|
26
|
-
__exportStar(require("./utils"), exports);
|