lincd-cli 0.1.0

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.
@@ -0,0 +1,155 @@
1
+ 'use strict';
2
+ var __awaiter =
3
+ (this && this.__awaiter) ||
4
+ function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) {
6
+ return value instanceof P
7
+ ? value
8
+ : new P(function (resolve) {
9
+ resolve(value);
10
+ });
11
+ }
12
+ return new (P || (P = Promise))(function (resolve, reject) {
13
+ function fulfilled(value) {
14
+ try {
15
+ step(generator.next(value));
16
+ } catch (e) {
17
+ reject(e);
18
+ }
19
+ }
20
+ function rejected(value) {
21
+ try {
22
+ step(generator['throw'](value));
23
+ } catch (e) {
24
+ reject(e);
25
+ }
26
+ }
27
+ function step(result) {
28
+ result.done
29
+ ? resolve(result.value)
30
+ : adopt(result.value).then(fulfilled, rejected);
31
+ }
32
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
33
+ });
34
+ };
35
+ var __generator =
36
+ (this && this.__generator) ||
37
+ function (thisArg, body) {
38
+ var _ = {
39
+ label: 0,
40
+ sent: function () {
41
+ if (t[0] & 1) throw t[1];
42
+ return t[1];
43
+ },
44
+ trys: [],
45
+ ops: [],
46
+ },
47
+ f,
48
+ y,
49
+ t,
50
+ g;
51
+ return (
52
+ (g = {next: verb(0), throw: verb(1), return: verb(2)}),
53
+ typeof Symbol === 'function' &&
54
+ (g[Symbol.iterator] = function () {
55
+ return this;
56
+ }),
57
+ g
58
+ );
59
+ function verb(n) {
60
+ return function (v) {
61
+ return step([n, v]);
62
+ };
63
+ }
64
+ function step(op) {
65
+ if (f) throw new TypeError('Generator is already executing.');
66
+ while (_)
67
+ try {
68
+ if (
69
+ ((f = 1),
70
+ y &&
71
+ (t =
72
+ op[0] & 2
73
+ ? y['return']
74
+ : op[0]
75
+ ? y['throw'] || ((t = y['return']) && t.call(y), 0)
76
+ : y.next) &&
77
+ !(t = t.call(y, op[1])).done)
78
+ )
79
+ return t;
80
+ if (((y = 0), t)) op = [op[0] & 2, t.value];
81
+ switch (op[0]) {
82
+ case 0:
83
+ case 1:
84
+ t = op;
85
+ break;
86
+ case 4:
87
+ _.label++;
88
+ return {value: op[1], done: false};
89
+ case 5:
90
+ _.label++;
91
+ y = op[1];
92
+ op = [0];
93
+ continue;
94
+ case 7:
95
+ op = _.ops.pop();
96
+ _.trys.pop();
97
+ continue;
98
+ default:
99
+ if (
100
+ !((t = _.trys), (t = t.length > 0 && t[t.length - 1])) &&
101
+ (op[0] === 6 || op[0] === 2)
102
+ ) {
103
+ _ = 0;
104
+ continue;
105
+ }
106
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
107
+ _.label = op[1];
108
+ break;
109
+ }
110
+ if (op[0] === 6 && _.label < t[1]) {
111
+ _.label = t[1];
112
+ t = op;
113
+ break;
114
+ }
115
+ if (t && _.label < t[2]) {
116
+ _.label = t[2];
117
+ _.ops.push(op);
118
+ break;
119
+ }
120
+ if (t[2]) _.ops.pop();
121
+ _.trys.pop();
122
+ continue;
123
+ }
124
+ op = body.call(thisArg, _);
125
+ } catch (e) {
126
+ op = [6, e];
127
+ y = 0;
128
+ } finally {
129
+ f = t = 0;
130
+ }
131
+ if (op[0] & 5) throw op[1];
132
+ return {value: op[0] ? op[1] : void 0, done: true};
133
+ }
134
+ };
135
+ exports.__esModule = true;
136
+ var $name = /** @class */ (function () {
137
+ function $name() {}
138
+ $name.apply = function () {
139
+ return __awaiter(this, void 0, void 0, function () {
140
+ return __generator(this, function (_a) {
141
+ return [2 /*return*/];
142
+ });
143
+ });
144
+ };
145
+ $name.undo = function () {
146
+ return __awaiter(this, void 0, void 0, function () {
147
+ return __generator(this, function (_a) {
148
+ return [2 /*return*/];
149
+ });
150
+ });
151
+ };
152
+ $name.migration_name = '$shortName';
153
+ return $name;
154
+ })();
155
+ exports['default'] = $name;
@@ -0,0 +1,7 @@
1
+ export default class $name {
2
+ static migration_name: string = '$shortName';
3
+
4
+ static async apply() {}
5
+
6
+ static async undo() {}
7
+ }
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+ exports.__esModule = true;
3
+ exports.$ = void 0;
4
+ var Core_1 = require('@dacore/core/lib/types/Core');
5
+ var UriResource_1 = require('@dacore/core/lib/models/UriResource');
6
+ var JSONLD_1 = require('@dacore/core/lib/utils/JSONLD');
7
+ var $ = require();
8
+ exports.$ = $;
9
+ from;
10
+ ('./ontologies/${ontology_name}');
11
+ var Index = require('./views/Index');
12
+ var _dataPromise = JSONLD_1.JSONLD.parse(
13
+ require('../data/data.json'),
14
+ true,
15
+ true,
16
+ );
17
+ var moduleResource = UriResource_1.UriResource.getOrCreate(
18
+ '${uri_base}/module/${module_name}',
19
+ );
20
+ Core_1.Core.app().registerModule(
21
+ '${module_name}',
22
+ this,
23
+ moduleResource,
24
+ _dataPromise,
25
+ [$, {underscore_ontology_name: underscore_ontology_name}._parsePromise],
26
+ );
27
+ {
28
+ underscore_ontology_name;
29
+ }
30
+ Index;
@@ -0,0 +1,19 @@
1
+ .Index {
2
+ width: 80%;
3
+ max-width: 44rem;
4
+ padding: 7rem 4rem 3rem;
5
+ margin: 58px auto !important;
6
+ box-shadow: 0px 0px 36px #50625055;
7
+ border-radius: 10px;
8
+ font-family: monospace;
9
+ font-size: 15px;
10
+ background: url(https://www.dacore.org/img/logo@2x.png) top right no-repeat;
11
+ background-size: 240px;
12
+ background-position-y: 26px;
13
+ background-position-x: center;
14
+
15
+ code {
16
+ padding: 2px 4px;
17
+ background-color: #eee;
18
+ }
19
+ }
@@ -0,0 +1,25 @@
1
+ import {React,ReactComponent} from "@dacore/core/lib/shapes/ReactComponent";
2
+ import {UriResource} from "@dacore/core/lib/models/UriResource";
3
+ import ${projectName} from "../ontologies/${projectName}";
4
+ import "./Index.scss";
5
+ import style from "./Index.scss.json";
6
+ export default class Index extends ReactComponent<any,any>
7
+ {
8
+ static viewType: UriResource = ${projectName}.Index;
9
+
10
+ render()
11
+ {
12
+ return <div className={style.Index}>
13
+ <hr />
14
+ <p>Welcome to your new LINCD setup!</p>
15
+ <p>
16
+ To start coding:
17
+ <ul>
18
+ <li>Go to <code>/modules/${browserTitle}</code> and run <code>yarn lincd dev</code> to start developing your module</li>
19
+ <li>Open <code>modules/${browserTitle}/src/views/Index.tsx</code> to edit this page.</li>
20
+ <li>For pages rendered on the initial page request you currently have to restart the server and refresh the page to see the results (for others you can simply refresh)</li>
21
+ </ul>
22
+ </p>
23
+ </div>
24
+ }
25
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "@context": {
3
+ "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
4
+ "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
5
+ "module": "http://data.dacore.org/ontologies/module/",
6
+ "core": "http://data.dacore.org/ontologies/core/",
7
+ "oc": "http://data.dacore.org/ontologies/oc/",
8
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
9
+ "router": "http://data.dacore.org/ontologies/router/",
10
+ "node-core": "http://data.dacore.org/ontologies/node-core/",
11
+ "mysite": "http://data.mysite.com/ontology/mysite/",
12
+ "admin": "http://data.dacore.org/ontologies/admin/",
13
+ "html": "http://data.dacore.org/ontologies/html/"
14
+ },
15
+ "@graph": [
16
+ {
17
+ "@id": "${defaultModuleUri}",
18
+ "@type": "module:Module",
19
+ "module:maintainsOntology": {
20
+ "@id": "${defaultOntologyUri}"
21
+ },
22
+ "module:npmPath": "@dacore/${projectName}",
23
+ "rdfs:label": "${projectName}"
24
+ },
25
+ {
26
+ "@id": "${uriBase}/moduledatastore/${projectName}",
27
+ "@type": "node-core:ModuleDataStore",
28
+ "module:module": {
29
+ "@id": "${defaultModuleUri}"
30
+ }
31
+ },
32
+ {
33
+ "@id": "${uriBase}/route//",
34
+ "@type": "router:Route",
35
+ "core:viewType": {
36
+ "@id": "${defaultOntologyUri}Index"
37
+ },
38
+ "router:exact": {
39
+ "@type": "xsd:boolean",
40
+ "@value": "true"
41
+ },
42
+ "router:path": "/"
43
+ },
44
+ {
45
+ "@id": "${uriBase}/route//console",
46
+ "@type": "router:Route",
47
+ "core:viewType": {
48
+ "@id": "admin:AdminOverview"
49
+ },
50
+ "router:layout": {
51
+ "@id": "admin:AdminOverview"
52
+ },
53
+ "router:path": "/console"
54
+ }
55
+ ]
56
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "@context": {
3
+ "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
4
+ "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
5
+ "core": "http://data.dacore.org/ontologies/core/",
6
+ "${projectName}": "${defaultOntologyUri}"
7
+ },
8
+ "@graph": [
9
+ {
10
+ "@id": "${defaultOntologyUri}",
11
+ "@type": "http://www.w3.org/2002/07/owl#Ontology",
12
+ "core:suggestedPrefix": "${projectName}"
13
+ },
14
+ {
15
+ "@id": "${projectName}:Index",
16
+ "@type": "core:ViewType",
17
+ "rdfs:isDefinedBy": {
18
+ "@id": "${defaultOntologyUri}"
19
+ },
20
+ "rdfs:label": "Index"
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,12 @@
1
+ import {Core} from "@dacore/core/lib/shapes/Core";
2
+ import {UriResource} from "@dacore/core/lib/models/UriResource";
3
+ import {JSONLD} from "@dacore/core/lib/utils/JSONLD";
4
+ import * as ${underscore_ontology_name} from "./ontologies/${ontology_name}"
5
+ import * as Index from "./views/Index"
6
+
7
+ declare var require: any;
8
+ var _dataPromise = JSONLD.parse(require('../data/data.json'),true,true) as Promise<any>;
9
+
10
+ var moduleResource: UriResource = UriResource.getOrCreate("${uri_base}/module/${module_name}");
11
+ Core.app().registerModule("${module_name}",this,moduleResource,_dataPromise,[${underscore_ontology_name}._parsePromise]);
12
+ export {${underscore_ontology_name},Index};
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+ exports.__esModule = true;
3
+ exports.Index = exports._parsePromise = exports._ontologyResource = void 0;
4
+ var UriResource_1 = require('@dacore/core/lib/models/UriResource');
5
+ var JSONLD_1 = require('@dacore/core/lib/utils/JSONLD');
6
+ var base = '${uri_base}/ontology/${ontology_name}/';
7
+ exports._ontologyResource = UriResource_1.UriResource.getOrCreate(base);
8
+ var json = require('../../data/ontologies/${ontology_name}.json');
9
+ exports._parsePromise = [
10
+ exports._ontologyResource,
11
+ JSONLD_1.JSONLD.parse(json, true, true),
12
+ ];
13
+ //add your ontology resources here
14
+ exports.Index = UriResource_1.UriResource.getOrCreate(base + 'Index');
15
+ //make sure every resource is also exported here
16
+ var $,
17
+ camel_ontology_name = {Index: exports.Index}.camel_ontology_name;
18
+ exports['default'] = $;
19
+ {
20
+ camel_ontology_name;
21
+ }
@@ -0,0 +1,16 @@
1
+ import {UriResource} from "@dacore/core/lib/models/UriResource";
2
+
3
+ declare var require:any;
4
+ import {JSONLD} from "@dacore/core/lib/utils/JSONLD";
5
+ var base:string = "${uri_base}/ontology/${ontology_name}/";
6
+ export var _ontologyResource:UriResource = UriResource.getOrCreate(base);
7
+
8
+ var json = require('../../data/ontologies/${ontology_name}.json');
9
+ export var _parsePromise:[UriResource,Promise<any>] = [_ontologyResource,JSONLD.parse(json,true,true) as Promise<any>];
10
+
11
+ //add your ontology resources here
12
+ export var Index:UriResource = UriResource.getOrCreate(base+"Index");
13
+
14
+ //make sure every node is also exported here
15
+ var ${camel_ontology_name} = {Index};
16
+ export default ${camel_ontology_name};
@@ -0,0 +1,4 @@
1
+ **/node_modules
2
+ .idea
3
+ lib
4
+ builds
@@ -0,0 +1,13 @@
1
+ import {Core} from "@dacore/core/lib/shapes/Core";
2
+ import {UriResource} from "@dacore/core/lib/models/UriResource";
3
+ import {JSONLD} from "@dacore/core/lib/utils/JSONLD";
4
+ import * as ${underscore_ontology_name} from "./ontologies/${ontology_name}"
5
+ //import * as viewName from "./views/viewName"
6
+ //import * as typeName from "./shapes/typeName"
7
+
8
+ declare var require:any;
9
+ var _dataPromise = JSONLD.parse(require('../data/data.json'),true,true) as Promise<any>;
10
+
11
+ var moduleResource:UriResource = UriResource.getOrCreate("${uri_base}/module/${module_name}");
12
+ Core.app().registerModule("${module_name}",this,moduleResource,_dataPromise,[${underscore_ontology_name}._parsePromise]);
13
+ export {${underscore_ontology_name}};
@@ -0,0 +1,16 @@
1
+ import {UriResource} from "@dacore/core/lib/models/UriResource";
2
+
3
+ declare var require:any;
4
+ import {JSONLD} from "@dacore/core/lib/utils/JSONLD";
5
+ var base:string = "${uri_base}/ontology/${ontology_name}/";
6
+ export var _ontologyResource:UriResource = UriResource.getOrCreate(base);
7
+
8
+ var json = require('../../data/ontologies/${ontology_name}.json');
9
+ export var _parsePromise:[UriResource,Promise<any>] = [_ontologyResource,JSONLD.parse(json,true,true) as Promise<any>];
10
+
11
+ //add your ontology resources here
12
+ // export var node:UriResource = UriResource.getOrCreate(base+"node");
13
+
14
+ //make sure every node is also exported here
15
+ var ${camel_ontology_name} = {};
16
+ export default ${camel_ontology_name};
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@dacore/",
3
+ "license": "UNLICENSED",
4
+ "version": "0.1.0",
5
+ "description": "",
6
+ "main": "lib/index.js",
7
+ "scripts": {
8
+ "build": "dacore build"
9
+ },
10
+ "keywords": [
11
+ "dacore",
12
+ "semantu",
13
+ "semantic",
14
+ "web"
15
+ ],
16
+ "author": "",
17
+ "license": "ISC",
18
+ "dependencies": {
19
+ "@dacore/core": "1.x"
20
+ },
21
+ "devDependencies": {
22
+ "@dacore/build-tools": "1.x"
23
+ }
24
+ }
@@ -0,0 +1 @@
1
+ //export {default as SomeProvider} from './shapes/SomeProvider';
@@ -0,0 +1,19 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "commonjs",
4
+ "sourceMap": true,
5
+ "target": "ES5",
6
+ "jsx": "react",
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true,
9
+ "resolveJsonModule": true,
10
+ "downlevelIteration": true,
11
+ "lib": ["es2017", "dom"],
12
+ "baseUrl": "./",
13
+ "rootDir": "src",
14
+ "paths": {
15
+ "*": ["node_modules/@types/*", "../../node_modules/@types/*", "*"]
16
+ }
17
+ },
18
+ "files": ["./src/index.ts"]
19
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "commonjs",
4
+ "sourceMap": true,
5
+ "target": "es6",
6
+ "outDir": "lib",
7
+ "declaration": true,
8
+ "esModuleInterop": true,
9
+ "downlevelIteration": true,
10
+ "skipLibCheck": true,
11
+ "resolveJsonModule": true,
12
+ "jsx": "react",
13
+ "baseUrl": "./",
14
+ "rootDir": "src",
15
+ "paths": {
16
+ "*": ["node_modules/@types/*", "../../node_modules/@types/*", "*"]
17
+ }
18
+ },
19
+ "include": ["./src/data/migrations/*"],
20
+ "files": ["./src/index.ts", "./src/providers.ts"]
21
+ }
package/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ exports.__esModule = true;
10
+ exports.generateWebpackConfig = exports.generateGruntConfig = exports.externaliseModules = exports.DeclarationPlugin = void 0;
11
+ var declaration_plugin_1 = require("./plugins/declaration-plugin");
12
+ __createBinding(exports, declaration_plugin_1, "default", "DeclarationPlugin");
13
+ var externalise_modules_1 = require("./plugins/externalise-modules");
14
+ __createBinding(exports, externalise_modules_1, "default", "externaliseModules");
15
+ var config_generator_1 = require("./config-generator");
16
+ __createBinding(exports, config_generator_1, "default", "generateGruntConfig");
17
+ var config_generator_2 = require("./config-generator");
18
+ exports.generateWebpackConfig = config_generator_2.generateWebpackConfig;
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "lincd-cli",
3
+ "version": "0.1.0",
4
+ "description": "Command line tools for the lincd.js library",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "publish-build-tools": "tsc && npm version patch && npm publish",
8
+ "build": "tsc"
9
+ },
10
+ "keywords": [
11
+ "lincd",
12
+ "cli",
13
+ "build",
14
+ "tools"
15
+ ],
16
+ "author": {
17
+ "name": "René Verheij",
18
+ "email": "rpwverheij@gmail.com"
19
+ },
20
+ "license": "MPL-2.0",
21
+ "bin": {
22
+ "lincd": "cli.js"
23
+ },
24
+ "dependencies": {
25
+ "@lodder/grunt-postcss": "^3.0.0",
26
+ "@types/node": "^14.14.13",
27
+ "chalk": "4.1.0",
28
+ "lincd": "*",
29
+ "lincd-cli": "*",
30
+ "child-process-promise": "^2.2.1",
31
+ "colors": "^1.4.0",
32
+ "commander": "^6.2.0",
33
+ "css-loader": "^5.0.1",
34
+ "extract-text-webpack-plugin": "^4.0.0-beta.0",
35
+ "fs-extra": "^9.0.1",
36
+ "glob": "^7.1.6",
37
+ "grunt": "^1.3.0",
38
+ "grunt-concurrent": "^3.0.0",
39
+ "grunt-contrib-clean": "^2.0.0",
40
+ "grunt-exec": "^3.0.0",
41
+ "grunt-ts": "^6.0.0-beta.17",
42
+ "grunt-webpack": "^4.0.2",
43
+ "load-grunt-tasks": "^5.1.0",
44
+ "mini-css-extract-plugin": "^1.3.3",
45
+ "postcss": "^8.2.1",
46
+ "postcss-cssnext": "^3.1.0",
47
+ "postcss-import": "^13.0.0",
48
+ "postcss-loader": "^4.1.0",
49
+ "postcss-modules": "^4.2.2",
50
+ "postcss-nested": "^5.0.3",
51
+ "postcss-scss": "^3.0.4",
52
+ "postcss-strip-inline-comments": "^0.1.5",
53
+ "sass": "^1.3.0",
54
+ "sass-loader": "10.1.0",
55
+ "source-map-loader": "^1.1.3",
56
+ "tailwindcss": "^2.0.2",
57
+ "terser-webpack-plugin": "^4.0.0",
58
+ "ts-loader": "^8.0.12",
59
+ "tsconfig-paths-webpack-plugin": "^3.3.0",
60
+ "typescript": "4.2.2",
61
+ "webpack": "^4.0.0",
62
+ "webpack-bundle-analyzer": "^3.0.0"
63
+ },
64
+ "devDependencies": {
65
+ "optimize-css-assets-webpack-plugin": "^5.0.4"
66
+ },
67
+ "peerDepencencies": {}
68
+ }