innetjs 2.2.13 → 2.2.15

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 (4) hide show
  1. package/bin/innet +25 -13
  2. package/index.js +25 -13
  3. package/index.mjs +25 -13
  4. package/package.json +2 -2
package/bin/innet CHANGED
@@ -275,31 +275,37 @@ class InnetJS {
275
275
  }
276
276
  yield logger__default["default"].start('Remove build', () => fs__default["default"].remove(this.buildFolder));
277
277
  const pkg = node && (yield this.getPackage());
278
- const inputOptions = {
278
+ const options = {
279
279
  input,
280
280
  preserveEntrySignatures: 'strict',
281
281
  plugins: [
282
282
  commonjs__default["default"](),
283
283
  json__default["default"](),
284
- typescript__default["default"](),
284
+ typescript__default["default"]({
285
+ tsconfigOverride: {
286
+ compilerOptions: {
287
+ declaration: false,
288
+ },
289
+ },
290
+ }),
285
291
  jsx__default["default"](),
286
292
  ],
287
293
  };
288
- this.withLint(inputOptions);
294
+ this.withLint(options);
289
295
  const outputOptions = {
290
296
  dir: this.buildFolder,
291
297
  sourcemap: this.sourcemap,
292
298
  };
293
299
  if (node) {
294
300
  outputOptions.format = 'cjs';
295
- inputOptions.external = Object.keys((pkg === null || pkg === void 0 ? void 0 : pkg.dependencies) || {});
296
- inputOptions.plugins.push(string({
301
+ options.external = Object.keys((pkg === null || pkg === void 0 ? void 0 : pkg.dependencies) || {});
302
+ options.plugins.push(string({
297
303
  include: '**/*.*',
298
304
  exclude: stringExcludeNode,
299
305
  }));
300
306
  }
301
307
  else {
302
- inputOptions.plugins.push(pluginNodeResolve.nodeResolve({
308
+ options.plugins.push(pluginNodeResolve.nodeResolve({
303
309
  browser: true,
304
310
  }), polyfill__default["default"](), image__default["default"](), styles__default["default"]({
305
311
  mode: this.cssInJs ? 'inject' : 'extract',
@@ -320,9 +326,9 @@ class InnetJS {
320
326
  }),
321
327
  ];
322
328
  }
323
- this.withEnv(inputOptions);
329
+ this.withEnv(options);
324
330
  yield logger__default["default"].start('Build production bundle', () => tslib.__awaiter(this, void 0, void 0, function* () {
325
- const bundle = yield rollup__default["default"].rollup(inputOptions);
331
+ const bundle = yield rollup__default["default"].rollup(options);
326
332
  yield bundle.write(outputOptions);
327
333
  yield bundle.close();
328
334
  if (!node) {
@@ -369,6 +375,7 @@ class InnetJS {
369
375
  typescript__default["default"]({
370
376
  tsconfigOverride: {
371
377
  compilerOptions: {
378
+ declaration: false,
372
379
  sourceMap: true,
373
380
  },
374
381
  },
@@ -757,11 +764,16 @@ class InnetJS {
757
764
  }
758
765
  }
759
766
 
760
- if (typeof process === 'undefined') {
761
- process = { env: {"__INNETJS__PACKAGE_VERSION":"2.2.12"} };
762
- } else {
763
- Object.assign(process.env, {"__INNETJS__PACKAGE_VERSION":"2.2.12"});
764
- }
767
+ (function () {
768
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.2.15"};
769
+ if (typeof process === 'undefined') {
770
+ process = { env };
771
+ } else if (process.env) {
772
+ Object.assign(process.env, env);
773
+ } else {
774
+ process.env = env;
775
+ }
776
+ })();
765
777
  updateDotenv();
766
778
  const innetJS = new InnetJS();
767
779
  const errorOption = new commander.Option('-e, --error', 'Show error details');
package/index.js CHANGED
@@ -70,11 +70,16 @@ var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
70
70
  var typescript__default = /*#__PURE__*/_interopDefaultLegacy(typescript);
71
71
  var tmp__default = /*#__PURE__*/_interopDefaultLegacy(tmp);
72
72
 
73
- if (typeof process === 'undefined') {
74
- process = { env: {"__INNETJS__PACKAGE_VERSION":"2.2.12"} };
75
- } else {
76
- Object.assign(process.env, {"__INNETJS__PACKAGE_VERSION":"2.2.12"});
77
- }
73
+ (function () {
74
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.2.15"};
75
+ if (typeof process === 'undefined') {
76
+ process = { env };
77
+ } else if (process.env) {
78
+ Object.assign(process.env, env);
79
+ } else {
80
+ process.env = env;
81
+ }
82
+ })();
78
83
  const livereload = require('rollup-plugin-livereload');
79
84
  const { string } = require('rollup-plugin-string');
80
85
  const { exec, spawn } = require('child_process');
@@ -169,31 +174,37 @@ class InnetJS {
169
174
  }
170
175
  yield logger__default["default"].start('Remove build', () => fs__default["default"].remove(this.buildFolder));
171
176
  const pkg = node && (yield this.getPackage());
172
- const inputOptions = {
177
+ const options = {
173
178
  input,
174
179
  preserveEntrySignatures: 'strict',
175
180
  plugins: [
176
181
  commonjs__default["default"](),
177
182
  json__default["default"](),
178
- typescript__default["default"](),
183
+ typescript__default["default"]({
184
+ tsconfigOverride: {
185
+ compilerOptions: {
186
+ declaration: false,
187
+ },
188
+ },
189
+ }),
179
190
  jsx__default["default"](),
180
191
  ],
181
192
  };
182
- this.withLint(inputOptions);
193
+ this.withLint(options);
183
194
  const outputOptions = {
184
195
  dir: this.buildFolder,
185
196
  sourcemap: this.sourcemap,
186
197
  };
187
198
  if (node) {
188
199
  outputOptions.format = 'cjs';
189
- inputOptions.external = Object.keys((pkg === null || pkg === void 0 ? void 0 : pkg.dependencies) || {});
190
- inputOptions.plugins.push(string({
200
+ options.external = Object.keys((pkg === null || pkg === void 0 ? void 0 : pkg.dependencies) || {});
201
+ options.plugins.push(string({
191
202
  include: '**/*.*',
192
203
  exclude: constants.stringExcludeNode,
193
204
  }));
194
205
  }
195
206
  else {
196
- inputOptions.plugins.push(pluginNodeResolve.nodeResolve({
207
+ options.plugins.push(pluginNodeResolve.nodeResolve({
197
208
  browser: true,
198
209
  }), polyfill__default["default"](), image__default["default"](), styles__default["default"]({
199
210
  mode: this.cssInJs ? 'inject' : 'extract',
@@ -214,9 +225,9 @@ class InnetJS {
214
225
  }),
215
226
  ];
216
227
  }
217
- this.withEnv(inputOptions);
228
+ this.withEnv(options);
218
229
  yield logger__default["default"].start('Build production bundle', () => tslib.__awaiter(this, void 0, void 0, function* () {
219
- const bundle = yield rollup__default["default"].rollup(inputOptions);
230
+ const bundle = yield rollup__default["default"].rollup(options);
220
231
  yield bundle.write(outputOptions);
221
232
  yield bundle.close();
222
233
  if (!node) {
@@ -263,6 +274,7 @@ class InnetJS {
263
274
  typescript__default["default"]({
264
275
  tsconfigOverride: {
265
276
  compilerOptions: {
277
+ declaration: false,
266
278
  sourceMap: true,
267
279
  },
268
280
  },
package/index.mjs CHANGED
@@ -36,11 +36,16 @@ import { Extract } from './extract.mjs';
36
36
  import { reporter, convertIndexFile, getFile } from './helpers.mjs';
37
37
  import { updateDotenv } from './updateDotenv.mjs';
38
38
 
39
- if (typeof process === 'undefined') {
40
- process = { env: {"__INNETJS__PACKAGE_VERSION":"2.2.12"} };
41
- } else {
42
- Object.assign(process.env, {"__INNETJS__PACKAGE_VERSION":"2.2.12"});
43
- }
39
+ (function () {
40
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.2.15"};
41
+ if (typeof process === 'undefined') {
42
+ process = { env };
43
+ } else if (process.env) {
44
+ Object.assign(process.env, env);
45
+ } else {
46
+ process.env = env;
47
+ }
48
+ })();
44
49
  const livereload = require('rollup-plugin-livereload');
45
50
  const { string } = require('rollup-plugin-string');
46
51
  const { exec, spawn } = require('child_process');
@@ -135,31 +140,37 @@ class InnetJS {
135
140
  }
136
141
  yield logger.start('Remove build', () => fs.remove(this.buildFolder));
137
142
  const pkg = node && (yield this.getPackage());
138
- const inputOptions = {
143
+ const options = {
139
144
  input,
140
145
  preserveEntrySignatures: 'strict',
141
146
  plugins: [
142
147
  commonjs(),
143
148
  json(),
144
- typescript(),
149
+ typescript({
150
+ tsconfigOverride: {
151
+ compilerOptions: {
152
+ declaration: false,
153
+ },
154
+ },
155
+ }),
145
156
  jsx(),
146
157
  ],
147
158
  };
148
- this.withLint(inputOptions);
159
+ this.withLint(options);
149
160
  const outputOptions = {
150
161
  dir: this.buildFolder,
151
162
  sourcemap: this.sourcemap,
152
163
  };
153
164
  if (node) {
154
165
  outputOptions.format = 'cjs';
155
- inputOptions.external = Object.keys((pkg === null || pkg === void 0 ? void 0 : pkg.dependencies) || {});
156
- inputOptions.plugins.push(string({
166
+ options.external = Object.keys((pkg === null || pkg === void 0 ? void 0 : pkg.dependencies) || {});
167
+ options.plugins.push(string({
157
168
  include: '**/*.*',
158
169
  exclude: stringExcludeNode,
159
170
  }));
160
171
  }
161
172
  else {
162
- inputOptions.plugins.push(nodeResolve({
173
+ options.plugins.push(nodeResolve({
163
174
  browser: true,
164
175
  }), polyfill(), image(), styles({
165
176
  mode: this.cssInJs ? 'inject' : 'extract',
@@ -180,9 +191,9 @@ class InnetJS {
180
191
  }),
181
192
  ];
182
193
  }
183
- this.withEnv(inputOptions);
194
+ this.withEnv(options);
184
195
  yield logger.start('Build production bundle', () => __awaiter(this, void 0, void 0, function* () {
185
- const bundle = yield rollup.rollup(inputOptions);
196
+ const bundle = yield rollup.rollup(options);
186
197
  yield bundle.write(outputOptions);
187
198
  yield bundle.close();
188
199
  if (!node) {
@@ -229,6 +240,7 @@ class InnetJS {
229
240
  typescript({
230
241
  tsconfigOverride: {
231
242
  compilerOptions: {
243
+ declaration: false,
232
244
  sourceMap: true,
233
245
  },
234
246
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "innetjs",
3
- "version": "2.2.13",
3
+ "version": "2.2.15",
4
4
  "description": "CLI for innet boilerplate",
5
5
  "homepage": "https://github.com/d8corp/innetjs",
6
6
  "author": "Mikhail Lysikov <d8corp@mail.ru>",
@@ -72,7 +72,7 @@
72
72
  "prompts": "^2.4.2",
73
73
  "rollup": "^2.79.1",
74
74
  "rollup-plugin-filesize": "^9.1.2",
75
- "rollup-plugin-process-env": "^1.0.0",
75
+ "rollup-plugin-process-env": "^1.0.3",
76
76
  "rollup-plugin-innet-jsx": "^1.3.2",
77
77
  "rollup-plugin-livereload": "^2.0.5",
78
78
  "rollup-plugin-node-externals": "^5.0.2",