innetjs 2.4.0-alpha.12 → 2.4.0-alpha.14

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.0-alpha.12"};
4
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.4.0-alpha.14"};
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.0-alpha.12"};
2
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.4.0-alpha.14"};
3
3
  if (typeof process === 'undefined') {
4
4
  globalThis.process = { env: env };
5
5
  } else if (process.env) {
package/bin/innet CHANGED
@@ -75,26 +75,23 @@ const lintInclude = [
75
75
  '**/*.js',
76
76
  '**/*.jsx',
77
77
  ];
78
- const stringExcludeDom = [
79
- '**/*.ts',
80
- '**/*.tsx',
81
- '**/*.js',
82
- '**/*.jsx',
83
- '**/*.json',
84
- '**/*.css',
85
- '**/*.scss',
86
- '**/*.webp',
78
+ const imageInclude = [
87
79
  '**/*.gif',
88
80
  '**/*.png',
89
81
  '**/*.jpeg',
90
82
  '**/*.jpg',
91
83
  '**/*.svg',
92
84
  ];
85
+ const stringExcludeDom = [
86
+ ...lintInclude,
87
+ '**/*.json',
88
+ '**/*.css',
89
+ '**/*.scss',
90
+ '**/*.webp',
91
+ ...imageInclude,
92
+ ];
93
93
  const stringExcludeNode = [
94
- '**/*.ts',
95
- '**/*.tsx',
96
- '**/*.js',
97
- '**/*.jsx',
94
+ ...lintInclude,
98
95
  '**/*.json',
99
96
  ];
100
97
 
@@ -414,12 +411,11 @@ class InnetJS {
414
411
  : undefined;
415
412
  // @ts-expect-error
416
413
  options.output.format = 'es';
417
- options.plugins.push(pluginNodeResolve.nodeResolve({
414
+ options.plugins.push(staticImport__default["default"]({
415
+ include: imageInclude.map(img => `src/${img}`),
416
+ }), pluginNodeResolve.nodeResolve({
418
417
  browser: true,
419
- }), polyfill__default["default"](), staticImport__default["default"]({
420
- include: ['**/*.webp', '**/*.gif', '**/*.png', '**/*.jpeg', '**/*.jpg', '**/*.svg'],
421
- exclude: ['**/node_modules/**'],
422
- }), styles__default["default"]({
418
+ }), polyfill__default["default"](), styles__default["default"]({
423
419
  mode: this.cssInJs ? 'inject' : 'extract',
424
420
  url: true,
425
421
  plugins: [autoprefixer__default["default"]()],
@@ -782,7 +778,7 @@ class InnetJS {
782
778
  }
783
779
 
784
780
  (function () {
785
- const env = {"__INNETJS__PACKAGE_VERSION":"2.4.0-alpha.12"};
781
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.4.0-alpha.14"};
786
782
  if (typeof process === 'undefined') {
787
783
  globalThis.process = { env: env };
788
784
  } else if (process.env) {
package/constants.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export declare const lintInclude: string[];
2
+ export declare const imageInclude: string[];
2
3
  export declare const stringExcludeDom: string[];
3
4
  export declare const stringExcludeNode: string[];
package/constants.js CHANGED
@@ -8,29 +8,27 @@ const lintInclude = [
8
8
  '**/*.js',
9
9
  '**/*.jsx',
10
10
  ];
11
- const stringExcludeDom = [
12
- '**/*.ts',
13
- '**/*.tsx',
14
- '**/*.js',
15
- '**/*.jsx',
16
- '**/*.json',
17
- '**/*.css',
18
- '**/*.scss',
19
- '**/*.webp',
11
+ const imageInclude = [
20
12
  '**/*.gif',
21
13
  '**/*.png',
22
14
  '**/*.jpeg',
23
15
  '**/*.jpg',
24
16
  '**/*.svg',
25
17
  ];
18
+ const stringExcludeDom = [
19
+ ...lintInclude,
20
+ '**/*.json',
21
+ '**/*.css',
22
+ '**/*.scss',
23
+ '**/*.webp',
24
+ ...imageInclude,
25
+ ];
26
26
  const stringExcludeNode = [
27
- '**/*.ts',
28
- '**/*.tsx',
29
- '**/*.js',
30
- '**/*.jsx',
27
+ ...lintInclude,
31
28
  '**/*.json',
32
29
  ];
33
30
 
31
+ exports.imageInclude = imageInclude;
34
32
  exports.lintInclude = lintInclude;
35
33
  exports.stringExcludeDom = stringExcludeDom;
36
34
  exports.stringExcludeNode = stringExcludeNode;
package/constants.mjs CHANGED
@@ -4,27 +4,24 @@ const lintInclude = [
4
4
  '**/*.js',
5
5
  '**/*.jsx',
6
6
  ];
7
- const stringExcludeDom = [
8
- '**/*.ts',
9
- '**/*.tsx',
10
- '**/*.js',
11
- '**/*.jsx',
12
- '**/*.json',
13
- '**/*.css',
14
- '**/*.scss',
15
- '**/*.webp',
7
+ const imageInclude = [
16
8
  '**/*.gif',
17
9
  '**/*.png',
18
10
  '**/*.jpeg',
19
11
  '**/*.jpg',
20
12
  '**/*.svg',
21
13
  ];
14
+ const stringExcludeDom = [
15
+ ...lintInclude,
16
+ '**/*.json',
17
+ '**/*.css',
18
+ '**/*.scss',
19
+ '**/*.webp',
20
+ ...imageInclude,
21
+ ];
22
22
  const stringExcludeNode = [
23
- '**/*.ts',
24
- '**/*.tsx',
25
- '**/*.js',
26
- '**/*.jsx',
23
+ ...lintInclude,
27
24
  '**/*.json',
28
25
  ];
29
26
 
30
- export { lintInclude, stringExcludeDom, stringExcludeNode };
27
+ export { imageInclude, lintInclude, stringExcludeDom, stringExcludeNode };
package/index.js CHANGED
@@ -302,12 +302,11 @@ class InnetJS {
302
302
  : undefined;
303
303
  // @ts-expect-error
304
304
  options.output.format = 'es';
305
- options.plugins.push(pluginNodeResolve.nodeResolve({
305
+ options.plugins.push(staticImport__default["default"]({
306
+ include: constants.imageInclude.map(img => `src/${img}`),
307
+ }), pluginNodeResolve.nodeResolve({
306
308
  browser: true,
307
- }), polyfill__default["default"](), staticImport__default["default"]({
308
- include: ['**/*.webp', '**/*.gif', '**/*.png', '**/*.jpeg', '**/*.jpg', '**/*.svg'],
309
- exclude: ['**/node_modules/**'],
310
- }), styles__default["default"]({
309
+ }), polyfill__default["default"](), styles__default["default"]({
311
310
  mode: this.cssInJs ? 'inject' : 'extract',
312
311
  url: true,
313
312
  plugins: [autoprefixer__default["default"]()],
package/index.mjs CHANGED
@@ -33,7 +33,7 @@ import { terser } from 'rollup-plugin-terser';
33
33
  import typescript from 'rollup-plugin-typescript2';
34
34
  import tmp from 'tmp';
35
35
  import { promisify } from 'node:util';
36
- import { stringExcludeNode, stringExcludeDom, lintInclude } from './constants.mjs';
36
+ import { stringExcludeNode, stringExcludeDom, imageInclude, lintInclude } from './constants.mjs';
37
37
  import { Extract } from './extract.mjs';
38
38
  import { reporter, convertIndexFile, getFile } from './helpers.mjs';
39
39
  import { updateDotenv } from './updateDotenv.mjs';
@@ -267,12 +267,11 @@ class InnetJS {
267
267
  : undefined;
268
268
  // @ts-expect-error
269
269
  options.output.format = 'es';
270
- options.plugins.push(nodeResolve({
270
+ options.plugins.push(staticImport({
271
+ include: imageInclude.map(img => `src/${img}`),
272
+ }), nodeResolve({
271
273
  browser: true,
272
- }), polyfill(), staticImport({
273
- include: ['**/*.webp', '**/*.gif', '**/*.png', '**/*.jpeg', '**/*.jpg', '**/*.svg'],
274
- exclude: ['**/node_modules/**'],
275
- }), styles({
274
+ }), polyfill(), styles({
276
275
  mode: this.cssInJs ? 'inject' : 'extract',
277
276
  url: true,
278
277
  plugins: [autoprefixer()],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "innetjs",
3
- "version": "2.4.0-alpha.12",
3
+ "version": "2.4.0-alpha.14",
4
4
  "description": "CLI for innet boilerplate",
5
5
  "homepage": "https://github.com/d8corp/innetjs",
6
6
  "author": "Mikhail Lysikov <d8corp@mail.ru>",