@raisenow/tamaro-cli 1.1.2 → 1.1.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.
package/dist/cli.js CHANGED
@@ -208,7 +208,7 @@ var assertOptionsValid = (options) => {
208
208
  assertEnvValid(env);
209
209
  };
210
210
  var prepareFlags2 = (flags, options) => {
211
- const { localCore, analyze, https } = options;
211
+ const { localCore, analyze, https, nolint } = options;
212
212
  if (localCore) {
213
213
  flags.push("--env localCore");
214
214
  }
@@ -218,6 +218,9 @@ var prepareFlags2 = (flags, options) => {
218
218
  if (https) {
219
219
  flags.push("--env https");
220
220
  }
221
+ if (nolint) {
222
+ flags.push("--env nolint");
223
+ }
221
224
  return flags;
222
225
  };
223
226
 
@@ -417,7 +420,7 @@ var assertOptionsValid3 = (options) => {
417
420
  assertEnvValid(env);
418
421
  };
419
422
  var prepareFlags3 = async (flags, options) => {
420
- const { localCore, port: defaultPort, https } = options;
423
+ const { localCore, port: defaultPort, https, nolint } = options;
421
424
  const port = await getPortPromise({ port: Number(defaultPort) });
422
425
  if (localCore) {
423
426
  flags.push("--env localCore");
@@ -426,6 +429,9 @@ var prepareFlags3 = async (flags, options) => {
426
429
  if (https) {
427
430
  flags.push("--env https");
428
431
  }
432
+ if (nolint) {
433
+ flags.push("--env nolint");
434
+ }
429
435
  return flags;
430
436
  };
431
437
 
@@ -532,7 +538,7 @@ var prepareFlags4 = async (flags, options) => {
532
538
  // package.json
533
539
  var package_default = {
534
540
  name: "@raisenow/tamaro-cli",
535
- version: "1.1.2",
541
+ version: "1.1.3",
536
542
  author: {
537
543
  name: "RaiseNow",
538
544
  email: "development@raisenow.com"
@@ -653,7 +659,7 @@ cli.command("dev").description(
653
659
  "--https",
654
660
  "Let local web server serve Tamaro with SSL encryption",
655
661
  false
656
- ).option("--port <port>", "Web server port", `${DEFAULT_PORT}`).option("--env <env>", "Environment (dev, stage, prod)").action(async (options) => {
662
+ ).option("--port <port>", "Web server port", `${DEFAULT_PORT}`).option("--env <env>", "Environment (dev, stage, prod)").option("--nolint", "Disable ESLint", false).action(async (options) => {
657
663
  await dev(options);
658
664
  });
659
665
  cli.command("build").description(
@@ -674,7 +680,7 @@ cli.command("build").description(
674
680
  "--tag <tag>",
675
681
  "Tag which should be used for the deployment of the bundle",
676
682
  DEFAULT_TAG
677
- ).action(async (options) => {
683
+ ).option("--nolint", "Disable ESLint", false).action(async (options) => {
678
684
  await build(options);
679
685
  if (options.serve) {
680
686
  await serve(options);
@@ -75,6 +75,7 @@ var getWebpackConfig = (env) => {
75
75
  const appEnvFiles = globSync(paths.appEnv);
76
76
  const envVars = getEnvVars(appEnvFiles, ifMin, ifCore, ifLocalCore, ifHttps);
77
77
  const { ifHmr } = getIfUtils({ hmr: process.env.HMR_ENABLED === "true" }, ["hmr"]);
78
+ const { ifNolint } = getIfUtils(env, ["nolint"]);
78
79
  const useTailwind = ifCore() && paths.appTailwindConfig && existsSync(paths.appTailwindConfig);
79
80
  logTitle("Paths:");
80
81
  logDataTable(getRelativePaths(paths));
@@ -321,12 +322,15 @@ var getWebpackConfig = (env) => {
321
322
  },
322
323
  plugins: removeEmpty([
323
324
  new webpack.ProgressPlugin(),
324
- new ESLintPlugin({
325
- extensions: moduleFileExtensions,
326
- eslintPath: require2.resolve("eslint"),
327
- cwd: paths.app,
328
- resolvePluginsRelativeTo: paths.app
329
- }),
325
+ ifNolint(
326
+ false,
327
+ new ESLintPlugin({
328
+ extensions: moduleFileExtensions,
329
+ eslintPath: require2.resolve("eslint"),
330
+ cwd: paths.app,
331
+ resolvePluginsRelativeTo: paths.app
332
+ })
333
+ ),
330
334
  ifMin(
331
335
  new CleanWebpackPlugin({
332
336
  // verbose: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raisenow/tamaro-cli",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "author": {
5
5
  "name": "RaiseNow",
6
6
  "email": "development@raisenow.com"
package/src/cli.ts CHANGED
@@ -51,6 +51,7 @@ cli
51
51
  )
52
52
  .option('--port <port>', 'Web server port', `${DEFAULT_PORT}`)
53
53
  .option('--env <env>', 'Environment (dev, stage, prod)')
54
+ .option('--nolint', 'Disable ESLint', false)
54
55
  .action(async (options: DevOptions) => {
55
56
  await dev(options)
56
57
  })
@@ -85,6 +86,7 @@ cli
85
86
  'Tag which should be used for the deployment of the bundle',
86
87
  DEFAULT_TAG,
87
88
  )
89
+ .option('--nolint', 'Disable ESLint', false)
88
90
  .action(async (options: BuildOptions & ServeOptions & DeployOptions) => {
89
91
  await build(options)
90
92
 
@@ -23,6 +23,7 @@ export type BuildOptions = {
23
23
  serve: boolean
24
24
  deploy: boolean
25
25
  env?: string
26
+ nolint: boolean
26
27
  }
27
28
 
28
29
  ///////////////////////////////////////////////////////////////////////////////
@@ -102,7 +103,7 @@ const assertOptionsValid = (options: BuildOptions & DeployOptions) => {
102
103
  ///////////////////////////////////////////////////////////////////////////////
103
104
 
104
105
  const prepareFlags = (flags: string[], options: BuildOptions): string[] => {
105
- const {localCore, analyze, https} = options
106
+ const {localCore, analyze, https, nolint} = options
106
107
 
107
108
  if (localCore) {
108
109
  flags.push('--env localCore')
@@ -116,5 +117,9 @@ const prepareFlags = (flags: string[], options: BuildOptions): string[] => {
116
117
  flags.push('--env https')
117
118
  }
118
119
 
120
+ if (nolint) {
121
+ flags.push('--env nolint')
122
+ }
123
+
119
124
  return flags
120
125
  }
@@ -12,6 +12,7 @@ export type DevOptions = {
12
12
  https: boolean
13
13
  port: string
14
14
  env?: string
15
+ nolint: boolean
15
16
  }
16
17
 
17
18
  ///////////////////////////////////////////////////////////////////////////////
@@ -68,7 +69,7 @@ const prepareFlags = async (
68
69
  flags: string[],
69
70
  options: DevOptions,
70
71
  ): Promise<string[]> => {
71
- const {localCore, port: defaultPort, https} = options
72
+ const {localCore, port: defaultPort, https, nolint} = options
72
73
  const port = await getPortPromise({port: Number(defaultPort)})
73
74
 
74
75
  if (localCore) {
@@ -81,5 +82,9 @@ const prepareFlags = async (
81
82
  flags.push('--env https')
82
83
  }
83
84
 
85
+ if (nolint) {
86
+ flags.push('--env nolint')
87
+ }
88
+
84
89
  return flags
85
90
  }
@@ -50,6 +50,7 @@ const getWebpackConfig = (env: any): Configuration => {
50
50
  const appEnvFiles = globSync(paths.appEnv)
51
51
  const envVars = getEnvVars(appEnvFiles, ifMin, ifCore, ifLocalCore, ifHttps)
52
52
  const {ifHmr} = getIfUtils({hmr: process.env.HMR_ENABLED === 'true'}, ['hmr'])
53
+ const {ifNolint} = getIfUtils(env, ['nolint'])
53
54
  const useTailwind =
54
55
  ifCore() && paths.appTailwindConfig && existsSync(paths.appTailwindConfig)
55
56
 
@@ -315,12 +316,15 @@ const getWebpackConfig = (env: any): Configuration => {
315
316
 
316
317
  plugins: removeEmpty([
317
318
  new webpack.ProgressPlugin(),
318
- new ESLintPlugin({
319
- extensions: moduleFileExtensions,
320
- eslintPath: require.resolve('eslint'),
321
- cwd: paths.app,
322
- resolvePluginsRelativeTo: paths.app,
323
- }),
319
+ ifNolint(
320
+ false,
321
+ new ESLintPlugin({
322
+ extensions: moduleFileExtensions,
323
+ eslintPath: require.resolve('eslint'),
324
+ cwd: paths.app,
325
+ resolvePluginsRelativeTo: paths.app,
326
+ }),
327
+ ),
324
328
  ifMin(
325
329
  new CleanWebpackPlugin({
326
330
  // verbose: true,