innetjs 2.4.1 → 2.4.3

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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  ;(function () {
4
- const env = {"__INNETJS__PACKAGE_VERSION":"2.4.1"};
4
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.4.3"};
5
5
  if (typeof process === 'undefined') {
6
6
  globalThis.process = { env: env };
7
7
  } else if (process.env) {
@@ -1,5 +1,5 @@
1
1
  ;(function () {
2
- const env = {"__INNETJS__PACKAGE_VERSION":"2.4.1"};
2
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.4.3"};
3
3
  if (typeof process === 'undefined') {
4
4
  globalThis.process = { env: env };
5
5
  } else if (process.env) {
package/bin/innet CHANGED
@@ -297,6 +297,11 @@ class InnetJS {
297
297
  }),
298
298
  jsx__default["default"](),
299
299
  ],
300
+ onwarn(warning, warn) {
301
+ if (warning.code === 'THIS_IS_UNDEFINED' || warning.code === 'SOURCEMAP_ERROR')
302
+ return;
303
+ warn(warning);
304
+ },
300
305
  };
301
306
  this.withLint(options, true);
302
307
  const outputOptions = {
@@ -319,7 +324,10 @@ class InnetJS {
319
324
  publicPath: this.baseUrl,
320
325
  }), styles__default["default"]({
321
326
  mode: this.cssInJs ? 'inject' : 'extract',
322
- url: true,
327
+ url: {
328
+ inline: false,
329
+ publicPath: `${this.baseUrl}assets`,
330
+ },
323
331
  plugins: [autoprefixer__default["default"]()],
324
332
  autoModules: this.cssModules ? (id) => !id.includes('.global.') : true,
325
333
  sourceMap: this.sourcemap,
@@ -345,7 +353,7 @@ class InnetJS {
345
353
  yield copyFiles(this.publicFolder, this.buildFolder);
346
354
  const data = yield fs.promises.readFile(this.publicIndexFile);
347
355
  const pkg = yield this.getPackage();
348
- yield fs.promises.writeFile(this.buildIndexFile, yield convertIndexFile(data, pkg.version, this.baseUrl, index));
356
+ yield fs.promises.writeFile(this.buildIndexFile, yield convertIndexFile(data, pkg.version, this.baseUrl, path__default["default"].parse(input[0]).name));
349
357
  }
350
358
  }));
351
359
  if (pkg) {
@@ -392,6 +400,11 @@ class InnetJS {
392
400
  }),
393
401
  jsx__default["default"](),
394
402
  ],
403
+ onwarn(warning, warn) {
404
+ if (warning.code === 'THIS_IS_UNDEFINED' || warning.code === 'SOURCEMAP_ERROR')
405
+ return;
406
+ warn(warning);
407
+ },
395
408
  };
396
409
  this.withLint(options);
397
410
  if (node) {
@@ -423,14 +436,17 @@ class InnetJS {
423
436
  publicPath: this.baseUrl,
424
437
  }), styles__default["default"]({
425
438
  mode: this.cssInJs ? 'inject' : 'extract',
426
- url: true,
439
+ url: {
440
+ inline: false,
441
+ publicPath: `${this.baseUrl}assets`,
442
+ },
427
443
  plugins: [autoprefixer__default["default"]()],
428
444
  autoModules: this.cssModules ? (id) => !id.includes('.global.') : true,
429
445
  sourceMap: true,
430
446
  }), string({
431
447
  include: '**/*.*',
432
448
  exclude: stringExcludeDom,
433
- }), this.createClient(key, cert, pkg, index), livereload(Object.assign({ exts: ['html', 'css', 'js', 'png', 'svg', 'webp', 'gif', 'jpg', 'json'], watch: [this.devBuildFolder, this.publicFolder], verbose: false }, (key && cert ? { https: { key, cert } } : {}))));
449
+ }), this.createClient(key, cert, pkg, path__default["default"].parse(input[0]).name), livereload(Object.assign({ exts: ['html', 'css', 'js', 'png', 'svg', 'webp', 'gif', 'jpg', 'json'], watch: [this.devBuildFolder, this.publicFolder], verbose: false }, (key && cert ? { https: { key, cert } } : {}))));
434
450
  }
435
451
  this.withEnv(options, true);
436
452
  const watcher = rollup__default["default"].watch(options);
@@ -785,7 +801,7 @@ class InnetJS {
785
801
  }
786
802
 
787
803
  (function () {
788
- const env = {"__INNETJS__PACKAGE_VERSION":"2.4.1"};
804
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.4.3"};
789
805
  if (typeof process === 'undefined') {
790
806
  globalThis.process = { env: env };
791
807
  } else if (process.env) {
package/index.js CHANGED
@@ -187,6 +187,11 @@ class InnetJS {
187
187
  }),
188
188
  jsx__default["default"](),
189
189
  ],
190
+ onwarn(warning, warn) {
191
+ if (warning.code === 'THIS_IS_UNDEFINED' || warning.code === 'SOURCEMAP_ERROR')
192
+ return;
193
+ warn(warning);
194
+ },
190
195
  };
191
196
  this.withLint(options, true);
192
197
  const outputOptions = {
@@ -209,7 +214,10 @@ class InnetJS {
209
214
  publicPath: this.baseUrl,
210
215
  }), styles__default["default"]({
211
216
  mode: this.cssInJs ? 'inject' : 'extract',
212
- url: true,
217
+ url: {
218
+ inline: false,
219
+ publicPath: `${this.baseUrl}assets`,
220
+ },
213
221
  plugins: [autoprefixer__default["default"]()],
214
222
  autoModules: this.cssModules ? (id) => !id.includes('.global.') : true,
215
223
  sourceMap: this.sourcemap,
@@ -235,7 +243,7 @@ class InnetJS {
235
243
  yield copyFiles(this.publicFolder, this.buildFolder);
236
244
  const data = yield fs.promises.readFile(this.publicIndexFile);
237
245
  const pkg = yield this.getPackage();
238
- yield fs.promises.writeFile(this.buildIndexFile, yield helpers.convertIndexFile(data, pkg.version, this.baseUrl, index));
246
+ yield fs.promises.writeFile(this.buildIndexFile, yield helpers.convertIndexFile(data, pkg.version, this.baseUrl, path__default["default"].parse(input[0]).name));
239
247
  }
240
248
  }));
241
249
  if (pkg) {
@@ -282,6 +290,11 @@ class InnetJS {
282
290
  }),
283
291
  jsx__default["default"](),
284
292
  ],
293
+ onwarn(warning, warn) {
294
+ if (warning.code === 'THIS_IS_UNDEFINED' || warning.code === 'SOURCEMAP_ERROR')
295
+ return;
296
+ warn(warning);
297
+ },
285
298
  };
286
299
  this.withLint(options);
287
300
  if (node) {
@@ -313,14 +326,17 @@ class InnetJS {
313
326
  publicPath: this.baseUrl,
314
327
  }), styles__default["default"]({
315
328
  mode: this.cssInJs ? 'inject' : 'extract',
316
- url: true,
329
+ url: {
330
+ inline: false,
331
+ publicPath: `${this.baseUrl}assets`,
332
+ },
317
333
  plugins: [autoprefixer__default["default"]()],
318
334
  autoModules: this.cssModules ? (id) => !id.includes('.global.') : true,
319
335
  sourceMap: true,
320
336
  }), string({
321
337
  include: '**/*.*',
322
338
  exclude: constants.stringExcludeDom,
323
- }), this.createClient(key, cert, pkg, index), livereload(Object.assign({ exts: ['html', 'css', 'js', 'png', 'svg', 'webp', 'gif', 'jpg', 'json'], watch: [this.devBuildFolder, this.publicFolder], verbose: false }, (key && cert ? { https: { key, cert } } : {}))));
339
+ }), this.createClient(key, cert, pkg, path__default["default"].parse(input[0]).name), livereload(Object.assign({ exts: ['html', 'css', 'js', 'png', 'svg', 'webp', 'gif', 'jpg', 'json'], watch: [this.devBuildFolder, this.publicFolder], verbose: false }, (key && cert ? { https: { key, cert } } : {}))));
324
340
  }
325
341
  this.withEnv(options, true);
326
342
  const watcher = rollup__default["default"].watch(options);
package/index.mjs CHANGED
@@ -152,6 +152,11 @@ class InnetJS {
152
152
  }),
153
153
  jsx(),
154
154
  ],
155
+ onwarn(warning, warn) {
156
+ if (warning.code === 'THIS_IS_UNDEFINED' || warning.code === 'SOURCEMAP_ERROR')
157
+ return;
158
+ warn(warning);
159
+ },
155
160
  };
156
161
  this.withLint(options, true);
157
162
  const outputOptions = {
@@ -174,7 +179,10 @@ class InnetJS {
174
179
  publicPath: this.baseUrl,
175
180
  }), styles({
176
181
  mode: this.cssInJs ? 'inject' : 'extract',
177
- url: true,
182
+ url: {
183
+ inline: false,
184
+ publicPath: `${this.baseUrl}assets`,
185
+ },
178
186
  plugins: [autoprefixer()],
179
187
  autoModules: this.cssModules ? (id) => !id.includes('.global.') : true,
180
188
  sourceMap: this.sourcemap,
@@ -200,7 +208,7 @@ class InnetJS {
200
208
  yield copyFiles(this.publicFolder, this.buildFolder);
201
209
  const data = yield promises.readFile(this.publicIndexFile);
202
210
  const pkg = yield this.getPackage();
203
- yield promises.writeFile(this.buildIndexFile, yield convertIndexFile(data, pkg.version, this.baseUrl, index));
211
+ yield promises.writeFile(this.buildIndexFile, yield convertIndexFile(data, pkg.version, this.baseUrl, path.parse(input[0]).name));
204
212
  }
205
213
  }));
206
214
  if (pkg) {
@@ -247,6 +255,11 @@ class InnetJS {
247
255
  }),
248
256
  jsx(),
249
257
  ],
258
+ onwarn(warning, warn) {
259
+ if (warning.code === 'THIS_IS_UNDEFINED' || warning.code === 'SOURCEMAP_ERROR')
260
+ return;
261
+ warn(warning);
262
+ },
250
263
  };
251
264
  this.withLint(options);
252
265
  if (node) {
@@ -278,14 +291,17 @@ class InnetJS {
278
291
  publicPath: this.baseUrl,
279
292
  }), styles({
280
293
  mode: this.cssInJs ? 'inject' : 'extract',
281
- url: true,
294
+ url: {
295
+ inline: false,
296
+ publicPath: `${this.baseUrl}assets`,
297
+ },
282
298
  plugins: [autoprefixer()],
283
299
  autoModules: this.cssModules ? (id) => !id.includes('.global.') : true,
284
300
  sourceMap: true,
285
301
  }), string({
286
302
  include: '**/*.*',
287
303
  exclude: stringExcludeDom,
288
- }), this.createClient(key, cert, pkg, index), livereload(Object.assign({ exts: ['html', 'css', 'js', 'png', 'svg', 'webp', 'gif', 'jpg', 'json'], watch: [this.devBuildFolder, this.publicFolder], verbose: false }, (key && cert ? { https: { key, cert } } : {}))));
304
+ }), this.createClient(key, cert, pkg, path.parse(input[0]).name), livereload(Object.assign({ exts: ['html', 'css', 'js', 'png', 'svg', 'webp', 'gif', 'jpg', 'json'], watch: [this.devBuildFolder, this.publicFolder], verbose: false }, (key && cert ? { https: { key, cert } } : {}))));
289
305
  }
290
306
  this.withEnv(options, true);
291
307
  const watcher = rollup.watch(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "innetjs",
3
- "version": "2.4.1",
3
+ "version": "2.4.3",
4
4
  "description": "CLI for innet boilerplate",
5
5
  "homepage": "https://github.com/d8corp/innetjs",
6
6
  "author": "Mikhail Lysikov <d8corp@mail.ru>",