@_linked/cli 1.25.2 → 1.26.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/lib/esm/cli-methods.d.ts +0 -2
  3. package/lib/esm/cli-methods.d.ts.map +1 -1
  4. package/lib/esm/cli-methods.js +0 -110
  5. package/lib/esm/cli-methods.js.map +1 -1
  6. package/lib/esm/cli.d.ts.map +1 -1
  7. package/lib/esm/cli.js +13 -29
  8. package/lib/esm/cli.js.map +1 -1
  9. package/lib/esm/commands/build-app.d.ts +5 -9
  10. package/lib/esm/commands/build-app.d.ts.map +1 -1
  11. package/lib/esm/commands/build-app.js +10 -13
  12. package/lib/esm/commands/build-app.js.map +1 -1
  13. package/lib/esm/commands/start.d.ts +1 -1
  14. package/lib/esm/commands/start.js +4 -4
  15. package/lib/esm/commands/start.js.map +1 -1
  16. package/lib/esm/index.d.ts +1 -5
  17. package/lib/esm/index.d.ts.map +1 -1
  18. package/lib/esm/index.js +0 -8
  19. package/lib/esm/index.js.map +1 -1
  20. package/lib/esm/interfaces.d.ts +1 -40
  21. package/lib/esm/interfaces.d.ts.map +1 -1
  22. package/lib/esm/lifecycle.d.ts +1 -1
  23. package/lib/esm/lifecycle.js +2 -2
  24. package/lib/esm/lifecycle.js.map +1 -1
  25. package/lib/esm/utils.js +1 -1
  26. package/lib/esm/utils.js.map +1 -1
  27. package/lib/esm/vite-config.js +3 -3
  28. package/lib/esm/vite-config.js.map +1 -1
  29. package/package.json +5 -25
  30. package/lib/esm/config-webpack-app.d.ts +0 -112
  31. package/lib/esm/config-webpack-app.d.ts.map +0 -1
  32. package/lib/esm/config-webpack-app.js +0 -392
  33. package/lib/esm/config-webpack-app.js.map +0 -1
  34. package/lib/esm/config-webpack.d.ts +0 -55
  35. package/lib/esm/config-webpack.d.ts.map +0 -1
  36. package/lib/esm/config-webpack.js +0 -374
  37. package/lib/esm/config-webpack.js.map +0 -1
  38. package/lib/esm/plugins/check-imports.d.ts +0 -2
  39. package/lib/esm/plugins/check-imports.d.ts.map +0 -1
  40. package/lib/esm/plugins/check-imports.js +0 -65
  41. package/lib/esm/plugins/check-imports.js.map +0 -1
  42. package/lib/esm/plugins/declaration-plugin.d.ts +0 -15
  43. package/lib/esm/plugins/declaration-plugin.d.ts.map +0 -1
  44. package/lib/esm/plugins/declaration-plugin.js +0 -246
  45. package/lib/esm/plugins/declaration-plugin.js.map +0 -1
  46. package/lib/esm/plugins/externalise-modules.d.ts +0 -7
  47. package/lib/esm/plugins/externalise-modules.d.ts.map +0 -1
  48. package/lib/esm/plugins/externalise-modules.js +0 -185
  49. package/lib/esm/plugins/externalise-modules.js.map +0 -1
  50. package/lib/esm/plugins/watch-run.d.ts +0 -5
  51. package/lib/esm/plugins/watch-run.d.ts.map +0 -1
  52. package/lib/esm/plugins/watch-run.js +0 -44
  53. package/lib/esm/plugins/watch-run.js.map +0 -1
@@ -1,246 +0,0 @@
1
- /// <reference path="colors.d.ts" />
2
- import colors from 'colors';
3
- import * as path from 'path';
4
- import webpack from 'webpack';
5
- import * as process from 'process';
6
- import fs from 'fs';
7
- const { Compilation } = webpack;
8
- export default class DeclarationPlugin {
9
- constructor(options = {}) {
10
- this.logMessages = true;
11
- this.exportRoot = '/lib';
12
- this.options = options;
13
- this.options['out'] = options.out
14
- ? options.out
15
- : './builds/declarations.d.ts';
16
- this.options['config'] = options.config
17
- ? options.config
18
- : process.cwd() + '/daconfig.js';
19
- //var moduleConfig = this.getModuleConfig();
20
- this.options['root'] = options.root || this.exportRoot; //'/lib'
21
- this.logMessages = options.debug ? options.debug : false;
22
- //load package.json with fs
23
- this.modulePackageInfo = JSON.parse(fs.readFileSync(process.cwd() + '/package.json', 'utf8'));
24
- // this.modulePackageInfo = await import(process.cwd() + '/package.json');
25
- // this.debug('found package name: '+this.modulePackageInfo.name);
26
- }
27
- // apply(compiler) {
28
- // // Specify the event hook to attach to
29
- // compiler.hooks.emit.tapAsync(
30
- // 'MyExampleWebpackPlugin',
31
- // (compilation, callback) => {
32
- //
33
- // }
34
- apply(compiler) {
35
- this.debug('applying ');
36
- //when the compiler is ready to emit files
37
- // compiler.plugin('emit', (compilation,callback) =>
38
- compiler.hooks.compilation.tap('DeclarationPlugin', (compilation) => {
39
- //NOTE: even though the stage comes from the processAssets hook and not the afterProcessAssets hook
40
- // somehow this only works WITH the stage defined
41
- compilation.hooks.afterProcessAssets.tap({
42
- stage: Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE,
43
- name: 'DeclarationPlugin',
44
- }, () => {
45
- // this.debug('indexing and removing declaration assets');
46
- //collect all generated declaration files
47
- //and remove them from the assets that will be emitted
48
- //NOTE: at some point we decided to overwrite declaration files between emits because sometimes only one new declaration file is emitted
49
- //this may cause issues when you remove a file during the continuous building process, but better than the other way around for now
50
- if (!this.declarationFiles) {
51
- this.declarationFiles = {};
52
- }
53
- compilation.getAssets().forEach((asset, key) => {
54
- // this.debug('key '+key.toString())
55
- // this.debug('value '+Object.getOwnPropertyNames(asset).join(", "))
56
- // this.debug('asset: ' + asset.name);
57
- if (asset.name.indexOf('.d.ts') !== -1) {
58
- if (this.declarationFiles[asset.name]) {
59
- this.debug('overwriting ' + asset.name);
60
- }
61
- this.declarationFiles[asset.name] = asset;
62
- this.debug('indexed and removed asset: ' + colors.green(asset.name));
63
- compilation.deleteAsset(asset.name);
64
- }
65
- });
66
- if (Object.keys(this.declarationFiles).length == 0) {
67
- this.debug("Didn't build .d.ts file because no declaration assets were emitted during build process."
68
- .yellow);
69
- this.debug('This is likely because webpack is using cache.'.yellow);
70
- this.debug('In watch mode, declaration assets will be emitted once you change a ts(x) source file'
71
- .yellow);
72
- // this.log('Make sure to run '.yellow + 'tsc'.blue + ' before running webpack'.yellow);
73
- // this.log(
74
- // 'Make sure to test for '.yellow +
75
- // '/(?!.*.d.ts).ts(x?)$/'.blue.bold['underline'] +
76
- // ' in the ts-loader in webpack.config.json'.yellow,
77
- // );
78
- // this.log(('Assets: ' + Object.keys(compilation.assets).toString()).yellow);
79
- // callback();
80
- return;
81
- }
82
- //combine them into one declaration file
83
- var combinedDeclaration = this.generateCombinedDeclaration(this.declarationFiles); //moduleConfig
84
- //and insert that back into the assets
85
- // compilation.assets[this.options.out] = {
86
- // source: function() {
87
- // return combinedDeclaration;
88
- // },
89
- // size: function() {
90
- // return combinedDeclaration.length;
91
- // },
92
- // };
93
- // As suggested by @JonWallsten here: https://github.com/TypeStrong/ts-loader/pull/1251#issuecomment-800032753
94
- compilation.emitAsset(this.options.out, new webpack.sources.RawSource(combinedDeclaration));
95
- //get meta data from module exports
96
- /*var metaRdfJson = this.generateMetaRdfJson(compilation,moduleConfig);
97
- //and insert that back into the assets as [module_name].meta.json
98
- compilation.assets[this.options.out.replace(".d.ts",".meta.rdf.json")] = {
99
- source: function() {
100
- return metaRdfJson;
101
- },
102
- size: function() {
103
- return metaRdfJson.length;
104
- }
105
- };*/
106
- //}
107
- });
108
- });
109
- }
110
- debug(...msgs) {
111
- msgs.unshift('declarations:');
112
- if (this.logMessages) {
113
- console.log.apply(null, msgs);
114
- }
115
- }
116
- log(...msgs) {
117
- msgs.unshift('declarations:');
118
- console.log.apply(null, msgs);
119
- }
120
- generateCombinedDeclaration(declarationFiles) {
121
- this.debug('generating combined declaration');
122
- var declarations = '';
123
- //this.debug("daCore: using config ",moduleConfig);
124
- //this.debug("Combining these files:"+Object.keys(declarationFiles).toString());
125
- //get current directory that webpack is run from (base of project), and replace backward slashes by forward ones to compare
126
- var basePath = process.cwd().replace(/\\/g, '/') + '/';
127
- this.debug('Base path:', colors.blue(basePath));
128
- var npmModuleName = this.modulePackageInfo.name;
129
- // let moduleName = npmModuleName.replace(/\@\w+\//, '');
130
- var importMap = {};
131
- for (var declarationFileName in declarationFiles) {
132
- //this.debug("Parsing "+declarationFileName);
133
- var declarationFile = declarationFiles[declarationFileName];
134
- var data = declarationFile.source.source();
135
- if (!data.split) {
136
- console.warn(typeof data, declarationFileName +
137
- ' - cannot split declaration contents. Not a string?');
138
- continue;
139
- }
140
- var lines = data.split('\n');
141
- var i = lines.length;
142
- while (i--) {
143
- var line = lines[i];
144
- //exclude empty lines
145
- var excludeLine = line == '';
146
- //if importing something, or re-exporting something
147
- if (/import ([a-z0-9A-Z_\-\*\{\}\s,]+)/.test(line) ||
148
- /export ([a-z0-9A-Z_-\{\}\s,\*]+) from/.test(line)) {
149
- var fileImports = line.indexOf('"') !== -1
150
- ? line.match(/\"([^\"]+)\"/)
151
- : line.match(/\'([^\']+)\'/);
152
- if (fileImports && fileImports.length > 1) {
153
- var importPath = fileImports[1];
154
- //if it is importing a relative path and it is a new one
155
- if ((importPath.substr(0, 2) == './' ||
156
- importPath.substr(0, 3) == '../') &&
157
- !importMap[importPath]) {
158
- //we will replace it with the local npm module later, calc and save the absolute path for now
159
- //we parse from builds, because now TS-LOADER gives paths relative to its output folder
160
- let parsed = path.parse('./builds/' + declarationFileName);
161
- let fileDirectory = parsed.dir;
162
- var absoluteImportPath = path.resolve(fileDirectory, importPath);
163
- // this.debug('declarationfilename '+declarationFileName);
164
- // this.debug('filedir '+fileDirectory);
165
- this.debug('import ' + colors.blue(importPath), ' -> ' + colors.green(absoluteImportPath));
166
- importMap[importPath] = absoluteImportPath;
167
- }
168
- }
169
- }
170
- //exclude re-exports
171
- //excludeLine = excludeLine || (/export ([a-z0-9A-Z_-\{\}\s,\*]+) from/).test(line);
172
- //exclude unnamed local imports like: import "./some.scss" or import "./someFile"t
173
- excludeLine =
174
- excludeLine || /import ["'][a-z0-9A-Z_\-.\/\\]+["']/.test(line);
175
- //if defined, check for excluded references
176
- if (!excludeLine &&
177
- this.excludedReferences &&
178
- line.indexOf('<reference') !== -1) {
179
- excludeLine = this.excludedReferences.some((reference) => line.indexOf(reference) !== -1);
180
- }
181
- if (excludeLine) {
182
- this.debug('Excluding line ' + i + ': ' + line);
183
- lines.splice(i, 1);
184
- }
185
- else {
186
- if (line.indexOf('declare ') !== -1) {
187
- lines[i] = line.replace('declare ', '');
188
- }
189
- //add tab
190
- lines[i] = lines[i];
191
- }
192
- }
193
- //TS Loader now uses paths relative to output dir. so here we remove a single ../ from the path (which is in there because /builds is the output dir and /lib is the relative path of the file)
194
- let fixedDeclarationPath = declarationFileName
195
- .replace(/\\/g, '/')
196
- .replace('../', '')
197
- .replace('.d.ts', '');
198
- var moduleDeclaration = npmModuleName + '/' + fixedDeclarationPath;
199
- //this.debug('basePath:'+basePath);
200
- declarations +=
201
- "declare module '" +
202
- moduleDeclaration +
203
- "' {\n\t" +
204
- lines.join('\n\t') +
205
- '\n}\n\n';
206
- this.debug('Defining module ' +
207
- colors.yellow(moduleDeclaration) +
208
- ' from ' +
209
- colors.blue(declarationFileName));
210
- }
211
- for (var relativeImportPath in importMap) {
212
- let absoluteImportPath = importMap[relativeImportPath];
213
- let npmImportModule = npmModuleName +
214
- '/' +
215
- absoluteImportPath
216
- .substr(basePath.length)
217
- .replace('.d.ts', '')
218
- .replace(/\\/g, '/');
219
- this.debug('Replacing ' +
220
- colors.blue(relativeImportPath) +
221
- ' with ' +
222
- colors.yellow(npmImportModule));
223
- //wrap in quotes to omit problems with replacing partials and having to fix order of replacements
224
- declarations = declarations.replace(new RegExp('(\'|")' + relativeImportPath + '(\'|")', 'g'), '"' + npmImportModule + '"');
225
- }
226
- let indexModulePath = this.modulePackageInfo.name + this.exportRoot + '/index';
227
- this.debug('Replacing index ' +
228
- colors.yellow(indexModulePath) +
229
- ' with ' +
230
- colors.yellow(this.modulePackageInfo.name));
231
- declarations = declarations.replace("'" + indexModulePath + "'", "'" + this.modulePackageInfo.name + "'");
232
- //replace alias
233
- if (this.options.alias) {
234
- for (let aliasKey in this.options.alias) {
235
- //declarations = declarations.replace(aliasKey,this.options.alias[aliasKey]);
236
- this.debug('Replacing alias ' +
237
- aliasKey +
238
- ' with ' +
239
- this.options.alias[aliasKey]);
240
- declarations = declarations.replace(new RegExp(aliasKey, 'g'), this.options.alias[aliasKey]);
241
- }
242
- }
243
- return declarations;
244
- }
245
- }
246
- //# sourceMappingURL=declaration-plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"declaration-plugin.js","sourceRoot":"","sources":["../../../src/plugins/declaration-plugin.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,MAAM,EAAC,WAAW,EAAC,GAAG,OAAO,CAAC;AAC9B,MAAM,CAAC,OAAO,OAAO,iBAAiB;IASpC,YAAY,UAAe,EAAE;QAL7B,gBAAW,GAAY,IAAI,CAAC;QAGpB,eAAU,GAAW,MAAM,CAAC;QAGlC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,GAAG;YAC/B,CAAC,CAAC,OAAO,CAAC,GAAG;YACb,CAAC,CAAC,4BAA4B,CAAC;QACjC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,MAAM;YACrC,CAAC,CAAC,OAAO,CAAC,MAAM;YAChB,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,cAAc,CAAC;QAEnC,4CAA4C;QAC5C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ;QAChE,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;QAEzD,2BAA2B;QAC3B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,GA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C7C,CAAC;QACF,YAAY,GAAG,YAAY,CAAC,OAAO,CACjC,GAAG,GAAG,eAAe,GAAG,GAAG,EAC3B,GAAG,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,GAAG,GAAG,CACxC,CAAC;QAEF,eAAe;QACf,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YACvB,KAAK,IAAI,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;gBACxC,6EAA6E;gBAC7E,IAAI,CAAC,KAAK,CACR,kBAAkB;oBAChB,QAAQ;oBACR,QAAQ;oBACR,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAC/B,CAAC;gBACF,YAAY,GAAG,YAAY,CAAC,OAAO,CACjC,IAAI,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,EACzB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAC7B,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,YAAY,CAAC;IACtB,CAAC;CACF"}
@@ -1,7 +0,0 @@
1
- declare var externaliseModules: (config: any, es5: any) => ({ context, request, contextInfo }: {
2
- context: any;
3
- request: any;
4
- contextInfo: any;
5
- }, callback: any) => any;
6
- export default externaliseModules;
7
- //# sourceMappingURL=externalise-modules.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"externalise-modules.d.ts","sourceRoot":"","sources":["../../../src/plugins/externalise-modules.ts"],"names":[],"mappings":"AAeA,QAAA,IAAI,kBAAkB,GAAa,WAAM,EAAE,QAAG,MAiB3B;;;;CAA+B,EAAE,aAAQ,QAkK3D,CAAC;AAmBF,eAAe,kBAAkB,CAAC"}
@@ -1,185 +0,0 @@
1
- /// <reference path="colors.d.ts" />
2
- import colors from 'colors';
3
- import fs from 'fs';
4
- var exportRoot = '/lib';
5
- var libraryName = 'lincd';
6
- var lincdModules = new Map();
7
- var excluded = new Set();
8
- var includedInternals = new Set();
9
- var excludedExternals = new Set();
10
- var includedLincdModules = new Set();
11
- //This function determines which modules that are requested by the module being built are external
12
- //it basically turns every import from a lincd module into a lookup for that class/object in the global lincd object
13
- //See also: https://webpack.js.org/configuration/externals/
14
- var externaliseModules = function (config, es5) {
15
- function debug(...msgs) {
16
- msgs.unshift('externals: ');
17
- if (config && config.debug) {
18
- console.log.apply(null, msgs);
19
- }
20
- }
21
- function log(...msgs) {
22
- msgs.unshift('externals: ');
23
- console.log.apply(null, msgs);
24
- }
25
- // let externalKeys: string[] = config.externals ? Object.keys(config.externals) : [];
26
- //return the function that is handed to webpack in the 'externals' option.
27
- //it determines for each request what is external and what is not
28
- return function ({ context, request, contextInfo }, callback) {
29
- // debug('checking '+request);
30
- // debug('imported by '+contextInfo.issuer);
31
- if (config.externals && config.externals[request]) {
32
- if (!excludedExternals.has(request)) {
33
- excludedExternals.add(request);
34
- // debug(colors.magenta('Excluding request as defined in Gruntfile: ' + request));
35
- debug(colors.red(request) + ' is defined as external --> excluded');
36
- }
37
- // return callback(config.externals[request]);
38
- return callback(null, 'var ' + config.externals[request]);
39
- }
40
- //solution to a problem that turned out not to need a solution.
41
- // But if sub requests of externalized modules go wrong at some point, use this!
42
- /*let rootRequest = request.substring(0, request.indexOf('/'));
43
- if (externalKeys.indexOf(rootRequest) !== -1) {
44
- let key = rootRequest;
45
- let rest = request.substring(key.length).replace(/\//g, '.');
46
- // return callback(config.externals[request]);
47
- debug(
48
- colors.magenta(
49
- 'Excluding sub request as defined in Gruntfile: ' +
50
- request +
51
- ' -> ' +
52
- config.externals[key] +
53
- rest,
54
- ),
55
- );
56
- return callback(null, 'var ' + config.externals[request] + rest);
57
- }*/
58
- //log(colors.gray(request));
59
- //"@dacore/core/foo" => "daCore.core.foo"
60
- // if (/^\@dacore\//.test(request)) {
61
- //remove @dacore/
62
- // if (request.indexOf('@dacore') !== 0) {
63
- // console.warn(
64
- // colors.red('this plugin currently works with @dacore modules only'),
65
- // );
66
- // return;
67
- // }
68
- // debug(colors.green('request: ' + request));
69
- if (request.substr(0, 1) == '.' || request.substr(0, 1) == '/') {
70
- // debug('skipping local');
71
- callback();
72
- return;
73
- }
74
- if (request.indexOf('lincd/') === 0 && es5) {
75
- // var result = request.replace("@dacore/core/","@dacore/core-es5/");
76
- // debug('Requested ES6 for ES5 target: '+colors.yellow(request) + ' => ' + colors.cyan(result));
77
- debug('Requested ES6 for ES5 target: ' + colors.yellow(request));
78
- // return callback(null, 'commonjs '+result);
79
- }
80
- //get module name without @dacore
81
- // var transformed = request.substr(8);
82
- //find @scope and the next part between 2 slashes after
83
- //so @dacore/some-mod/lib/file.js
84
- // --> match[0] = @dacore/some-mod
85
- // --> match[1] = @dacore
86
- // --> match[2] = some-mod
87
- let [packageName, scope, cleanPackageName] = request.match(/(@[\w\-]+\/)?([\w\-]+)/);
88
- //if this module is listed as internal module in the config (or if we internalize all modules with '*')
89
- if (config &&
90
- config.internals &&
91
- (config.internals.indexOf(packageName) !== -1 || config.internals === '*')) {
92
- //then don't exclude and don't continue this function
93
- //only log once
94
- if (!includedInternals.has(packageName)) {
95
- includedInternals.add(packageName);
96
- debug(colors.blue(request) + ' marked internal --> included');
97
- }
98
- return callback();
99
- }
100
- //check if this module is a lincd module
101
- let isLincd = isLincdModule(debug, packageName);
102
- if (isLincd) {
103
- if (!includedLincdModules.has(packageName)) {
104
- includedLincdModules.add(packageName);
105
- debug(colors.magenta(packageName +
106
- ' is a lincd module, imports will be excluded from this bundle and refer to a global variable instead'));
107
- }
108
- }
109
- else {
110
- //avoid duplicate messages
111
- if (!excluded.has(packageName)) {
112
- excluded.add(packageName);
113
- debug(colors.green(packageName) + ' --> included');
114
- }
115
- return callback();
116
- }
117
- //remove export root path (for example with lincd/models: the module has lib/ as root, so to get to the exported path lincd.models we need to remove it)
118
- let cleanRequest = request.replace(exportRoot, '');
119
- let targetVariable;
120
- //expects a flat export / global tree with all the modules classes
121
- //replace - by _ and remove es5, because both es6 and es5 modules will be listed under the bare module name in the global treemap
122
- let firstSlash = cleanRequest.indexOf('/');
123
- //if importing {x} from "lincd" (so directly from library without any paths)
124
- if (firstSlash === -1 && cleanRequest == libraryName) {
125
- //then we refer straight to the global object
126
- targetVariable = libraryName;
127
- }
128
- else {
129
- //for all other cases, there is slash, so lets split module before the first slash and classname after the last slash
130
- // let module = cleanRequest
131
- // .substr(0, firstSlash)
132
- // .replace(/-/g, '_')
133
- // .replace('_es5', '');
134
- if (packageName == libraryName) {
135
- //the library itself should directly expose the main class of each file for clean variable names
136
- targetVariable = libraryName;
137
- //targetVariable = libraryName + '.' + className;
138
- }
139
- else {
140
- //reading this back I'm not sure why module would be empty?
141
- //Note: we don't include className here anymore, since all linked Components/Utils register themselves as libraryName._modules.moduleName.ComponentName
142
- //and we don't do default exports, so the import would be `import {ComponentName} from 'foo'` OR `import {ComponentName} from 'foo/lib/components/ComponentName'`
143
- //Typescript then translates `ComponentName` to `ComponentName_1.ComponentName` in the javascript output
144
- //And when we build the tree, we put each individual exports of linked components directly under `lincd._modules.moduleName`
145
- //so here we return the entire module as the result of such imports
146
- //and ComponentName_1 will contain all things linked/exported by the module
147
- //and ComponentName_1.ComponentName resolves to the desired class/function
148
- targetVariable =
149
- libraryName + "._modules['" + packageName.replace(/\-/g, '_') + "']";
150
- //import {PersonView} from 'lincd-test/lib/PersonView';
151
- //lincd._modules.lincd_test
152
- //PersonView_1
153
- //PersonView_1.PersonView --> lincd._modules.lincd_test.PersonView
154
- // targetVariable =
155
- // libraryName +
156
- // '.' +
157
- // (module ? '_modules.' + module + '.' : '') +
158
- // className;
159
- }
160
- }
161
- debug(colors.yellow(request) + ' => ' + colors.cyan(targetVariable));
162
- //See also: https://webpack.js.org/configuration/externals/
163
- return callback(null, 'var ' + targetVariable);
164
- // }
165
- };
166
- };
167
- function isLincdModule(debug, packageName) {
168
- if (!lincdModules.has(packageName)) {
169
- // debug(colors.green('checking ' + moduleName + '/package.json'));
170
- let isLincdModule;
171
- let modulePackage;
172
- try {
173
- modulePackage = JSON.parse(fs.readFileSync(packageName + '/package.json', 'utf8'));
174
- }
175
- catch (e) {
176
- debug(colors.red(packageName + '/package.json' + ' does not exist'));
177
- // return callback();
178
- }
179
- isLincdModule = modulePackage && modulePackage.lincd && true;
180
- lincdModules.set(packageName, isLincdModule);
181
- }
182
- return lincdModules.get(packageName);
183
- }
184
- export default externaliseModules;
185
- //# sourceMappingURL=externalise-modules.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"externalise-modules.js","sourceRoot":"","sources":["../../../src/plugins/externalise-modules.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,IAAI,UAAU,GAAG,MAAM,CAAC;AACxB,IAAI,WAAW,GAAG,OAAO,CAAC;AAC1B,IAAI,YAAY,GAAG,IAAI,GAAG,EAAmB,CAAC;AAE9C,IAAI,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;AACzB,IAAI,iBAAiB,GAAG,IAAI,GAAG,EAAE,CAAC;AAClC,IAAI,iBAAiB,GAAG,IAAI,GAAG,EAAE,CAAC;AAClC,IAAI,oBAAoB,GAAG,IAAI,GAAG,EAAE,CAAC;AACrC,kGAAkG;AAClG,oHAAoH;AACpH,2DAA2D;AAC3D,IAAI,kBAAkB,GAAG,UAAU,MAAM,EAAE,GAAG;IAC5C,SAAS,KAAK,CAAC,GAAG,IAAI;QACpB,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC5B,IAAI,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YAC3B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;IAED,SAAS,GAAG,CAAC,GAAG,IAAI;QAClB,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAC5B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,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I,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC;QAC/C,IAAI;IACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,aAAa,CAAC,KAAK,EAAE,WAAmB;IAC/C,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;QACnC,mEAAmE;QACnE,IAAI,aAAsB,CAAC;QAC3B,IAAI,aAAa,CAAC;QAClB,IAAI,CAAC;YACH,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,WAAW,GAAG,eAAe,EAAC,MAAM,CAAC,CAAC,CAAC;QACpF,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,GAAG,eAAe,GAAG,iBAAiB,CAAC,CAAC,CAAC;YACrE,qBAAqB;QACvB,CAAC;QACD,aAAa,GAAG,aAAa,IAAI,aAAa,CAAC,KAAK,IAAI,IAAI,CAAC;QAC7D,YAAY,CAAC,GAAG,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AACvC,CAAC;AAED,eAAe,kBAAkB,CAAC"}
@@ -1,5 +0,0 @@
1
- declare class WatchRunPlugin {
2
- apply(compiler: any): void;
3
- }
4
- export default WatchRunPlugin;
5
- //# sourceMappingURL=watch-run.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"watch-run.d.ts","sourceRoot":"","sources":["../../../src/plugins/watch-run.ts"],"names":[],"mappings":"AAOA,cAAM,cAAc;IAClB,KAAK,CAAC,QAAQ,KAAA;CAaf;AAwBD,eAAe,cAAc,CAAC"}
@@ -1,44 +0,0 @@
1
- // WebpackWatchRunPlugin.js
2
- /*
3
- * This simple webpack plugin helps to identify the list of file changes, that
4
- * triggered webpack re-compilation/re-build
5
- */
6
- 'use strict';
7
- class WatchRunPlugin {
8
- apply(compiler) {
9
- compiler.hooks.watchRun.tap('WatchRun', (comp) => {
10
- const changedTimes = comp.watchFileSystem.watcher.mtimes;
11
- const changedFiles = Object.keys(changedTimes)
12
- .map((file) => `\n ${file}`)
13
- .join('');
14
- if (changedFiles.length) {
15
- console.log('====================================');
16
- console.log('NEW BUILD FILES CHANGED:', changedFiles);
17
- console.log('====================================');
18
- }
19
- });
20
- }
21
- }
22
- /*class WebpackWatchRunPlugin {
23
- constructor(options?) {
24
- if (typeof options !== "object") options = {};
25
- this['options'] = options;
26
- }
27
-
28
- apply(compiler) {
29
- const options = this['options'];
30
- compiler.plugin("watch-run",
31
- function (watching, done) {
32
- const changedTimes = watching.compiler.watchFileSystem.watcher.mtimes;
33
- const changedFiles = Object.keys(changedTimes)
34
- .map(file => `\n ${file}`)
35
- .join("");
36
- if (changedFiles.length) {
37
- console.log("Files modified:", changedFiles);
38
- }
39
- done();
40
- });
41
- }
42
- }*/
43
- export default WatchRunPlugin;
44
- //# sourceMappingURL=watch-run.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"watch-run.js","sourceRoot":"","sources":["../../../src/plugins/watch-run.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B;;;GAGG;AACH,YAAY,CAAC;AAEb,MAAM,cAAc;IAClB,KAAK,CAAC,QAAQ;QACZ,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YAC/C,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC;YACzD,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC;iBAC3C,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC;iBAC5B,IAAI,CAAC,EAAE,CAAC,CAAC;YACZ,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;gBACxB,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;gBACpD,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,YAAY,CAAC,CAAC;gBACtD,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;YACtD,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,eAAe,cAAc,CAAC"}