lincd-cli 0.1.7 → 0.1.10
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/{src/cli.js → cli.js} +2 -2
- package/config-generator.js +568 -0
- package/defaults/app/Gruntfile.js +13 -0
- package/defaults/app/tsconfig-es5.json +18 -0
- package/defaults/app/tsconfig.json +18 -0
- package/defaults/module/.npmignore +6 -0
- package/defaults/module/Gruntfile.js +16 -0
- package/defaults/module/package.json +14 -6
- package/defaults/module/src/components/ExampleComponent.tsx +12 -10
- package/defaults/module/src/data/example-ontology.json +3 -3
- package/defaults/module/src/index.ts +1 -1
- package/defaults/module/src/module.ts +1 -1
- package/defaults/module/src/ontologies/example-ontology.ts +19 -14
- package/defaults/module/src/shapes/ExampleShapeClass.ts +5 -5
- package/defaults/module/tsconfig-es5.json +18 -0
- package/defaults/module/tsconfig.json +18 -0
- package/defaults/shape.ts +8 -0
- package/{src/index.js → index.js} +9 -5
- package/lib/cli.js +537 -472
- package/lib/config-webpack.js +3 -2
- package/lib/utils.js +6 -3
- package/package.json +9 -9
- package/{src/plugins → plugins}/declaration-plugin.js +0 -0
- package/{src/plugins → plugins}/externalise-modules.js +0 -0
- package/{src/plugins → plugins}/watch-run.js +0 -0
- package/utils.js +39 -0
- package/defaults/create_migration.js +0 -155
- package/defaults/create_migration.ts +0 -7
- package/defaults/defaultModule/Index.js +0 -30
- package/defaults/defaultModule/Index.scss +0 -19
- package/defaults/defaultModule/Index.tsx +0 -32
- package/defaults/defaultModule/data.json +0 -56
- package/defaults/defaultModule/defaultOntology.json +0 -23
- package/defaults/defaultModule/index.ts +0 -16
- package/defaults/defaultModule/ontology.js +0 -21
- package/defaults/defaultModule/ontology.ts +0 -19
- package/defaults/gitignorefile +0 -4
- package/defaults/index.ts +0 -17
- package/defaults/ontology.ts +0 -19
- package/defaults/package.json +0 -28
- package/defaults/providers.ts +0 -1
- package/defaults/site/package.json +0 -40
- package/defaults/site/storage/filestores/settings-production-template.jsonld +0 -129
- package/defaults/site/web/.htaccess +0 -19
- package/defaults/site/web/favicon.png +0 -0
- package/defaults/site/web/img/placeholder.jpg +0 -0
- package/src/config-grunt.js +0 -263
- package/src/config-webpack.js +0 -281
- package/src/interfaces.js +0 -2
- package/src/plugins/shapes-plugin.js +0 -69
- package/src/utils.js +0 -127
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"@context": {
|
|
3
|
-
"owl": "http://www.w3.org/2002/07/owl#",
|
|
4
|
-
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
|
|
5
|
-
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
|
|
6
|
-
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
7
|
-
"core": "http://data.dacore.org/ontologies/core/",
|
|
8
|
-
"module": "http://data.dacore.org/ontologies/module/",
|
|
9
|
-
"storage": "http://data.dacore.org/ontologies/storage/",
|
|
10
|
-
"rdf4j": "http://data.dacore.org/ontologies/rdf4j/",
|
|
11
|
-
"node-core": "http://data.dacore.org/ontologies/node-core/",
|
|
12
|
-
"server-core": "http://data.dacore.org/ontologies/server-core/",
|
|
13
|
-
"browser-core": "http://data.dacore.org/ontologies/browser-core/"
|
|
14
|
-
},
|
|
15
|
-
"@graph": [
|
|
16
|
-
{
|
|
17
|
-
"@id": "dacore://store/main",
|
|
18
|
-
"@type": [
|
|
19
|
-
"rdf4j:RDF4JStore"
|
|
20
|
-
],
|
|
21
|
-
"storage:publicEndPoint": [
|
|
22
|
-
{
|
|
23
|
-
"@value": "http://127.0.0.1:7200/repositories/${repositoryName}"
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"@id": "dacore://system",
|
|
29
|
-
"@type": "server-core:ServerCore",
|
|
30
|
-
"rdfs:label" : "${projectName}",
|
|
31
|
-
"server-core:serves": {
|
|
32
|
-
"@id": "${uriBase}"
|
|
33
|
-
},
|
|
34
|
-
"server-core:port": "${port}",
|
|
35
|
-
"core:uriBase": "${uriBase}",
|
|
36
|
-
"storage:defaultStore": {
|
|
37
|
-
"@id": "dacore://store/main"
|
|
38
|
-
},
|
|
39
|
-
"node-core:includeAtStartup": [
|
|
40
|
-
"@dacore/node-core",
|
|
41
|
-
"@dacore/rdf4j"
|
|
42
|
-
],
|
|
43
|
-
"core:adminEmail": "${email}",
|
|
44
|
-
"core:deployment": "development",
|
|
45
|
-
"core:requiresSetup": {
|
|
46
|
-
"@type": "xsd:boolean",
|
|
47
|
-
"@value": "true"
|
|
48
|
-
},
|
|
49
|
-
"core:defaultModule": {
|
|
50
|
-
"@id": "${defaultModuleUri}"
|
|
51
|
-
},
|
|
52
|
-
"core:defaultOntology": {
|
|
53
|
-
"@id": "${defaultOntologyUri}"
|
|
54
|
-
},
|
|
55
|
-
"module:maintainsModule": [
|
|
56
|
-
{
|
|
57
|
-
"@id": "${defaultModuleUri}"
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
"module:installedModule": [
|
|
61
|
-
{
|
|
62
|
-
"@id": "http://data.dacore.org/module/core"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"@id": "http://data.dacore.org/module/browser-core"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"@id": "http://data.dacore.org/module/core-editors"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"@id": "http://data.dacore.org/module/coreviews"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"@id": "http://data.dacore.org/module/icons"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"@id": "http://data.dacore.org/module/website"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"@id": "http://data.dacore.org/module/bootstrap"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"@id": "http://data.dacore.org/module/core-ui"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"@id": "http://data.dacore.org/module/forms"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"@id": "http://data.dacore.org/module/dcterms"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"@id": "http://data.dacore.org/module/html"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"@id": "http://data.dacore.org/module/rdf4j"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"@id": "http://data.dacore.org/module/sparql"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"@id": "http://data.dacore.org/module/typescript"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"@id": "http://data.dacore.org/module/cli"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"@id": "http://data.dacore.org/module/dacode"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"@id": "http://data.dacore.org/module/server-core"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"@id": "http://data.dacore.org/module/node-core"
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"@id": "http://data.dacore.org/module/admin"
|
|
117
|
-
}
|
|
118
|
-
]
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"@id": "${uriBase}",
|
|
122
|
-
"@type": "browser-core:BrowserCore",
|
|
123
|
-
"core:uriBase": "${uriBase}",
|
|
124
|
-
"core:deployment": "development",
|
|
125
|
-
"browser-core:publicRoot": "${publicRoot}",
|
|
126
|
-
"browser-core:browserTitle": "${projectName}"
|
|
127
|
-
}
|
|
128
|
-
]
|
|
129
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# enable symbolic links
|
|
2
|
-
Options +FollowSymLinks
|
|
3
|
-
|
|
4
|
-
RewriteEngine On
|
|
5
|
-
#RewriteLogLevel 8
|
|
6
|
-
|
|
7
|
-
RewriteCond %{REQUEST_FILENAME} !-f
|
|
8
|
-
RewriteCond %{REQUEST_FILENAME} !-d
|
|
9
|
-
RewriteCond %{REQUEST_FILENAME} !-l
|
|
10
|
-
|
|
11
|
-
#rewrite bundle urls to the actual files in node_modules
|
|
12
|
-
RewriteRule ^js/modules/dacore.([\w\-\_]+).(.[\w.]*) node_modules/@dacore/$1/builds/dacore.$1.$2 [NC]
|
|
13
|
-
RewriteRule ^css/modules/dacore.([\w\-\_]+).(.[\w.]*) node_modules/@dacore/$1/builds/dacore.$1.$2 [NC]
|
|
14
|
-
RewriteRule ^js/modules/@dacore/([\w\-\_]+)/(.*) node_modules/@dacore/$1/includes/$2 [NC]
|
|
15
|
-
RewriteRule ^css/modules/@dacore/([\w\-\_]+)/(.*) node_modules/@dacore/$1/includes/$2 [NC]
|
|
16
|
-
|
|
17
|
-
#rewrite sourcemap URLS whichCon do not really exist to the actual files
|
|
18
|
-
RewriteRule ^js/modules/(.*)\.(tsx|jsx|ts|js) node_modules/@dacore/$1.$2 [ENV=JS:true]
|
|
19
|
-
Header set Content-Type "application/javascript" env=JS
|
|
Binary file
|
|
Binary file
|
package/src/config-grunt.js
DELETED
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
-
if (ar || !(i in from)) {
|
|
5
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
-
ar[i] = from[i];
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
-
};
|
|
11
|
-
exports.__esModule = true;
|
|
12
|
-
exports.setupGrunt = void 0;
|
|
13
|
-
var config_webpack_1 = require("./config-webpack");
|
|
14
|
-
var fs = require('fs');
|
|
15
|
-
var chalk = require('chalk');
|
|
16
|
-
var path = require('path');
|
|
17
|
-
var utils_1 = require("./utils");
|
|
18
|
-
function generateGruntConfig(moduleName, config) {
|
|
19
|
-
if (config === void 0) { config = {}; }
|
|
20
|
-
return function (grunt) {
|
|
21
|
-
setupGrunt(grunt, moduleName, config);
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
exports["default"] = generateGruntConfig;
|
|
25
|
-
function setupGrunt(grunt, moduleName, config) {
|
|
26
|
-
var buildServer = !config.environment || config.environment == 'server';
|
|
27
|
-
var buildFrontend = !config.environment || config.environment == 'frontend';
|
|
28
|
-
//when not specified and we ARe building frontend OR we are compiling the server for es5.. or if simply specified, then es5 is targeted
|
|
29
|
-
var targetES5 = (!config.target && (buildFrontend || config.es5Server)) ||
|
|
30
|
-
config.target == 'es5';
|
|
31
|
-
var targetES6 = !config.target || config.target == 'es6';
|
|
32
|
-
var targets = [];
|
|
33
|
-
if (targetES5)
|
|
34
|
-
targets.push('es5');
|
|
35
|
-
if (targetES6)
|
|
36
|
-
targets.push('es6');
|
|
37
|
-
var targetLog = 'building ' + targets.join(', ');
|
|
38
|
-
if (buildServer && !buildFrontend) {
|
|
39
|
-
(0, utils_1.log)(targetLog + ' lib only');
|
|
40
|
-
}
|
|
41
|
-
else if (!buildServer && buildFrontend) {
|
|
42
|
-
(0, utils_1.log)(targetLog + ' dist bundles only');
|
|
43
|
-
}
|
|
44
|
-
else if (buildServer && buildFrontend) {
|
|
45
|
-
if (config.es5Server) {
|
|
46
|
-
(0, utils_1.log)(targetLog + ' lib files & dist bundles');
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
(0, utils_1.log)(targetLog + ' dist bundles and es6 lib files');
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
(0, utils_1.log)('invalid configuration combination');
|
|
54
|
-
}
|
|
55
|
-
require('load-grunt-tasks')(grunt);
|
|
56
|
-
//defaults
|
|
57
|
-
grunt.registerTask('default', ['prepare-build', 'concurrent:dev']);
|
|
58
|
-
grunt.registerTask('dev', targetES6 ? ['prepare-build', 'dev-es6'] : ['prepare-build', 'dev-es5']);
|
|
59
|
-
grunt.registerTask('build', targets.map(function (target) { return 'build-' + target; }));
|
|
60
|
-
if (buildFrontend) {
|
|
61
|
-
grunt.registerTask('build-frontend', __spreadArray([
|
|
62
|
-
'prepare-build'
|
|
63
|
-
], targets.map(function (target) { return 'webpack:build-' + target; }), true));
|
|
64
|
-
}
|
|
65
|
-
grunt.registerTask('build-production', (0, utils_1.flatten)([
|
|
66
|
-
'clean:lib',
|
|
67
|
-
'prepare-build',
|
|
68
|
-
buildFrontend ? targets.map(function (target) { return 'webpack:prod-' + target; }) : null,
|
|
69
|
-
buildServer ? ['exec:build-lib'] : null,
|
|
70
|
-
]));
|
|
71
|
-
var prepareBuild = ['postcss:cssjson'];
|
|
72
|
-
if (config.beforeBuildCommand) {
|
|
73
|
-
prepareBuild.push('exec:beforeBuildCommand');
|
|
74
|
-
}
|
|
75
|
-
//specific tasks
|
|
76
|
-
grunt.registerTask('prepare-build', prepareBuild);
|
|
77
|
-
grunt.registerTask('dev-es6-production', [
|
|
78
|
-
'prepare-build',
|
|
79
|
-
'concurrent:dev-prod',
|
|
80
|
-
]);
|
|
81
|
-
grunt.registerTask('dev-es6', ['prepare-build', 'concurrent:dev']);
|
|
82
|
-
grunt.registerTask('dev-es5', ['prepare-build', 'concurrent:dev-es5']);
|
|
83
|
-
//build-es5 is by default just the frontend because the server is es6
|
|
84
|
-
//however some specific modules (like @dacore/module) require the typescript compiler ('build-lib') to run for es5
|
|
85
|
-
//so that core-es5 or browser-core-es5 can internalise its files
|
|
86
|
-
//this can by triggered with es5Server
|
|
87
|
-
grunt.registerTask('build-es5', (0, utils_1.flatten)([
|
|
88
|
-
'postcss',
|
|
89
|
-
buildFrontend ? 'webpack:build-es5' : null,
|
|
90
|
-
config.es5Server ? ['exec:build-lib-es5', 'copy:lib'] : null,
|
|
91
|
-
]));
|
|
92
|
-
grunt.registerTask('build-es6', (0, utils_1.flatten)([
|
|
93
|
-
'prepare-build',
|
|
94
|
-
buildFrontend ? 'webpack:build-es6' : null,
|
|
95
|
-
buildServer ? ['clean:lib', 'exec:build-lib'] : null,
|
|
96
|
-
// 'exec:shapes',
|
|
97
|
-
]));
|
|
98
|
-
grunt.registerTask('build-lib', [
|
|
99
|
-
'prepare-build',
|
|
100
|
-
'exec:build-lib',
|
|
101
|
-
'copy:lib',
|
|
102
|
-
]);
|
|
103
|
-
grunt.registerTask('build-production-es5', [
|
|
104
|
-
'prepare-build',
|
|
105
|
-
'webpack:prod-es5',
|
|
106
|
-
// 'exec:shapes',
|
|
107
|
-
]);
|
|
108
|
-
grunt.registerTask('build-production-es6', [
|
|
109
|
-
'prepare-build',
|
|
110
|
-
'webpack:prod-es6',
|
|
111
|
-
// 'exec:shapes',
|
|
112
|
-
]);
|
|
113
|
-
// log('setting grunt config');
|
|
114
|
-
grunt.initConfig({
|
|
115
|
-
exec: {
|
|
116
|
-
'build-lib': 'tsc --pretty',
|
|
117
|
-
'build-lib-es5': 'tsc --pretty -p tsconfig-es5.json',
|
|
118
|
-
beforeBuildCommand: config.beforeBuildCommand,
|
|
119
|
-
'server-dev': 'tsc -w',
|
|
120
|
-
test: 'tsc -w',
|
|
121
|
-
// shapes: 'lincd shapes',
|
|
122
|
-
'css-declarations': 'tcm -p **/*.scss',
|
|
123
|
-
'postcss-modules': 'yarn postcss --use postcss-import postcss-cssnext postcss-nested postcss-modules -o build/draft.css -i scss/*'
|
|
124
|
-
},
|
|
125
|
-
copy: {
|
|
126
|
-
lib: {
|
|
127
|
-
files: [
|
|
128
|
-
// copy json files in src over to lib
|
|
129
|
-
{
|
|
130
|
-
expand: true,
|
|
131
|
-
src: ['**/*.json', '**/*.json.d.ts'],
|
|
132
|
-
dest: 'lib/',
|
|
133
|
-
cwd: 'src/',
|
|
134
|
-
filter: 'isFile'
|
|
135
|
-
},
|
|
136
|
-
]
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
postcss: {
|
|
140
|
-
options: {
|
|
141
|
-
map: true,
|
|
142
|
-
processors: [require('postcss-modules')({ generateScopedName: utils_1.generateScopedName })],
|
|
143
|
-
syntax: require('postcss-scss'),
|
|
144
|
-
writeDest: false
|
|
145
|
-
},
|
|
146
|
-
cssjson: {
|
|
147
|
-
src: 'src/**/*.scss'
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
clean: {
|
|
151
|
-
lib: ['lib/']
|
|
152
|
-
},
|
|
153
|
-
concurrent: {
|
|
154
|
-
dev: (0, utils_1.flatten)([
|
|
155
|
-
buildFrontend ? 'webpack:dev' : null,
|
|
156
|
-
buildServer ? 'exec:server-dev' : null,
|
|
157
|
-
// buildServer ? 'watch:css-module-transforms' : null,
|
|
158
|
-
// 'exec:css-declarations-watch'
|
|
159
|
-
]),
|
|
160
|
-
'dev-prod': (0, utils_1.flatten)([
|
|
161
|
-
buildFrontend ? 'webpack:dev-prod' : null,
|
|
162
|
-
buildServer ? 'exec:server-dev' : null,
|
|
163
|
-
// buildServer ? 'watch:css-module-transforms' : null,
|
|
164
|
-
// 'exec:css-declarations-watch'
|
|
165
|
-
]),
|
|
166
|
-
'dev-es5': (0, utils_1.flatten)([
|
|
167
|
-
buildFrontend ? 'webpack:dev-es5' : null,
|
|
168
|
-
buildServer ? 'exec:server-dev' : null,
|
|
169
|
-
// buildServer ? 'watch:css-module-transforms' : null,
|
|
170
|
-
// 'exec:css-declarations-watch'
|
|
171
|
-
]),
|
|
172
|
-
options: {
|
|
173
|
-
logConcurrentOutput: true,
|
|
174
|
-
logTaskName: 3,
|
|
175
|
-
logBlacklist: []
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
webpack: {
|
|
179
|
-
options: {
|
|
180
|
-
stats: {
|
|
181
|
-
chunks: false,
|
|
182
|
-
version: false,
|
|
183
|
-
warningsFilter: function (warning) {
|
|
184
|
-
return warning.indexOf('There are multiple modules') !== -1;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
dev: (0, config_webpack_1.generateWebpackConfig)('dev', moduleName, Object.assign({
|
|
189
|
-
target: 'es6',
|
|
190
|
-
watch: true
|
|
191
|
-
}, config, config.es6, config.dev)),
|
|
192
|
-
'dev-prod': (0, config_webpack_1.generateWebpackConfig)('dev', moduleName, Object.assign({
|
|
193
|
-
target: 'es6',
|
|
194
|
-
watch: true,
|
|
195
|
-
productionMode: true
|
|
196
|
-
}, config, config.es6, config.prod)),
|
|
197
|
-
'dev-es5': (0, config_webpack_1.generateWebpackConfig)('dev-es5', moduleName, Object.assign({
|
|
198
|
-
target: 'es5',
|
|
199
|
-
watch: true
|
|
200
|
-
}, config, config.es5, config.dev)),
|
|
201
|
-
'build-es6': (0, config_webpack_1.generateWebpackConfig)('build-es6', moduleName, Object.assign({
|
|
202
|
-
target: 'es6',
|
|
203
|
-
watch: false
|
|
204
|
-
}, config, config.es6, config.dev)),
|
|
205
|
-
'build-es5': (0, config_webpack_1.generateWebpackConfig)('build-es5', moduleName, Object.assign({
|
|
206
|
-
target: 'es5',
|
|
207
|
-
watch: false
|
|
208
|
-
}, config, config.es5, config.dev)),
|
|
209
|
-
'prod-es5': (0, config_webpack_1.generateWebpackConfig)('prod-es5', moduleName, Object.assign({
|
|
210
|
-
target: 'es5',
|
|
211
|
-
watch: false,
|
|
212
|
-
productionMode: true
|
|
213
|
-
}, config, config.es5, config.prod)),
|
|
214
|
-
'prod-es6': (0, config_webpack_1.generateWebpackConfig)('prod-es6', moduleName, Object.assign({
|
|
215
|
-
target: 'es6',
|
|
216
|
-
watch: false,
|
|
217
|
-
productionMode: true
|
|
218
|
-
}, config, config.es6, config.prod))
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
grunt.config.init.exec = {
|
|
222
|
-
test: 'echo "yey"'
|
|
223
|
-
};
|
|
224
|
-
//load the npm grunt task modules
|
|
225
|
-
[
|
|
226
|
-
'grunt-webpack',
|
|
227
|
-
'grunt-exec',
|
|
228
|
-
'grunt-concurrent',
|
|
229
|
-
'grunt-contrib-clean',
|
|
230
|
-
'grunt-contrib-copy',
|
|
231
|
-
'@lodder/grunt-postcss',
|
|
232
|
-
].forEach(function (taskName) {
|
|
233
|
-
(0, utils_1.debug)(config, 'loading grunt task ' + taskName);
|
|
234
|
-
var localPath = path.resolve(__dirname, 'node_modules', taskName, 'tasks');
|
|
235
|
-
var localPath2 = path.resolve(__dirname, '..', 'node_modules', taskName, 'tasks');
|
|
236
|
-
var workspacePath = path.resolve(__dirname, '..', '..', 'node_modules', taskName, 'tasks');
|
|
237
|
-
var nestedWorkspacePath = path.resolve(__dirname, '..', '..', '..', 'node_modules', taskName, 'tasks');
|
|
238
|
-
if (fs.existsSync(localPath)) {
|
|
239
|
-
// grunt.loadNpmTasks(taskName);
|
|
240
|
-
(0, utils_1.debug)('Loading from ' + localPath);
|
|
241
|
-
grunt.task.loadTasks(localPath);
|
|
242
|
-
}
|
|
243
|
-
else if (fs.existsSync(localPath2)) {
|
|
244
|
-
// grunt.loadNpmTasks(taskName);
|
|
245
|
-
(0, utils_1.debug)('Loading from ' + localPath2);
|
|
246
|
-
grunt.task.loadTasks(localPath2);
|
|
247
|
-
}
|
|
248
|
-
else if (fs.existsSync(workspacePath)) {
|
|
249
|
-
//windows, so it seems
|
|
250
|
-
(0, utils_1.debug)('Loading from ' + workspacePath);
|
|
251
|
-
grunt.task.loadTasks(workspacePath);
|
|
252
|
-
}
|
|
253
|
-
else if (fs.existsSync(nestedWorkspacePath)) {
|
|
254
|
-
//mac / linux
|
|
255
|
-
(0, utils_1.debug)('Loading from ' + nestedWorkspacePath);
|
|
256
|
-
grunt.task.loadTasks(nestedWorkspacePath);
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
-
(0, utils_1.warn)("Could not load grunt task module ".concat(taskName, "\nCould not find task at any of these paths:\n").concat(localPath, "\n").concat(localPath2, "\n").concat(workspacePath, "\n").concat(nestedWorkspacePath));
|
|
260
|
-
}
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
exports.setupGrunt = setupGrunt;
|