@zohodesk/react-cli 0.0.1-exp.166.2 → 0.0.1-exp.168.1

Sign up to get free protection for your applications and to get access to all the features.
package/.prettierrc ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "trailingComma": "none",
3
+ "singleQuote": true,
4
+ "jsxSingleQuote": true
5
+ }
package/README.md CHANGED
@@ -2,12 +2,55 @@
2
2
 
3
3
  A CLI tool for build modern web application and libraries
4
4
 
5
+ # 0.0.1-exp.168.1
6
+
7
+ Changes:-
8
+
9
+ 1. `cliRootPath` option removed `react-cli.app.cliRootPath` in `package.json`
10
+ Due to the reason we updated our logic to find package's executable path.
11
+ 2. `--efc_output_file=efc-sdk-[version].js` option added to modify efc output file by terminal
12
+ 3. added logic to print error message during command run, Previously when executable not found error messages not printed
13
+
14
+ # 0.0.1-beta.168
15
+
16
+ Changes:-
17
+
18
+ 1. `enableChunkHash` option enabled for dev mode, use it as `react-cli.app.enableChunkHash` in `package.json`
19
+ 2. `--enable_efc=true` option added to enable efc by terminal
20
+ 3. unwanted pem files removed
21
+
22
+ # 0.0.1-beta.167
23
+
24
+ SSL certificate update
25
+ this version has same as `0.0.1-exp.166.1`, `0.0.1-exp.166.2` and below and some minor changes
26
+ Features:-
27
+
28
+ - `--shallow_clone` option to `react-cli clone` this option will be usefull for shallow cloning repos in build time we don't need commit messages it will be 2x fast this way
29
+ - Example `react-cli clone --clone_type=git --clone_url=https://some.url --shallow_clone`
30
+ - `cliRootPath` option added for npm workspace related path problems
31
+ - Usage `package.json` , "react-cli" => "cliRootPath" stright key
32
+ - `unstableDepsInverse` option added for use app need library first priority over react-cli packages
33
+ - Usage `package.json` , "react-cli" => "unstableDepsInverse" stright key
34
+
35
+ Issue Fix :-
36
+
37
+ - In devmode initial html not recived after second rebuild issue fix.
38
+ - typo fix `devBulid` to `devBuild`.
39
+ - `disableES5Transpile` option missed in docs now added.
40
+ - docs libAlias not work as app for example in app we always take `es` folder to build for treshaking and reasons,
41
+ But that option not enabled in docs. now it is enabled.
42
+ - In `react-cli devbuild` command options not working properly,
43
+ when above command run via terminal not via npm run script options not working
44
+ So we send that options to webpack then it works as expected.
45
+ this behaviour need to check across os and need to be cross check with other commends as well for now we only fixed this
46
+
5
47
  # 0.0.1-exp.166.2
6
48
 
7
49
  Changes:-
8
50
 
9
51
  - `-w` option (watch option) added for `react-cli rtl`
10
52
  - Example `react-cli rtl ./src ./lib -w`
53
+ <!-- need to handle `react-cli rtl` options correctly -->
11
54
  - disableES5Transpile option libAlias added for docs
12
55
 
13
56
  # 0.0.1-exp.166.1
@@ -25,7 +68,7 @@ this version has same as `# 0.0.1-exp.164.1`, `# 0.0.1-exp.164.2` and below and
25
68
 
26
69
  # 0.0.1-beta.165
27
70
 
28
- - `valueReplacer` option added in shemas for font name replace related issue handling, for more [details](./docs/ValueReplacer.md)
71
+ - `valueReplacer` option added in shemas for font name replace related issue handling, for more [details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/2.0.0/docs/ValueReplacer.md)
29
72
  - `valuereplacer` option added in react-cli it takes three
30
73
  1. sourceDir
31
74
  2. distDir
@@ -33,7 +76,7 @@ this version has same as `# 0.0.1-exp.164.1`, `# 0.0.1-exp.164.2` and below and
33
76
 
34
77
  # 0.0.1-exp.164.1
35
78
 
36
- - extra features in custom chunks reffer [this](./docs/CustomChunks.md)
79
+ - extra features in custom chunks reffer [this](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/2.0.0/docs/CustomChunks.md)
37
80
 
38
81
  # 0.0.1-exp.164.2
39
82
 
@@ -123,7 +166,7 @@ this version has same as `# 0.0.1-exp.164.1`, `# 0.0.1-exp.164.2` and below and
123
166
 
124
167
  # 0.0.1-exp.159
125
168
 
126
- - isse fix:-
169
+ - issue fix:-
127
170
  - when rtl ltr css split enable manifest json css filename keys comes with hash .
128
171
 
129
172
  # 0.0.1-beta.158
package/bin/cli.js CHANGED
@@ -1,16 +1,24 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  const path = require('path');
4
- const os = require('os');
5
4
  const { existsSync } = require('fs');
6
- const { spawnSync, spawn } = require('child_process');
5
+ const { spawnSync: _spawnSync, spawn } = require('child_process');
7
6
  const { getOptions } = require('../lib/utils/index.js');
8
7
 
9
8
  const { log } = require('../lib/utils');
9
+ const { getCliPath } = require('../lib/servers/getCliPath.js');
10
10
  //initPreCommitHook();
11
11
 
12
12
  const options = getOptions();
13
13
 
14
+ function spawnSync(...args) {
15
+ const result = _spawnSync(...args);
16
+ if (result.error) {
17
+ console.error(result.error);
18
+ }
19
+ return result;
20
+ }
21
+
14
22
  const { esLint: esLintOptions } = options || {};
15
23
  const { preprocess } = options;
16
24
  const {
@@ -20,23 +28,10 @@ const {
20
28
  reportPath: reportPath
21
29
  } = esLintOptions || {};
22
30
 
23
- const isWindows = os.platform().toLowerCase() === 'win32';
24
-
25
31
  const [, , option] = process.argv;
26
32
  const args = process.argv.slice(3);
27
33
  const appPath = process.cwd();
28
34
 
29
- const isNodeModuleUnderAppFolder = __dirname.indexOf(appPath) !== -1;
30
-
31
- const _getCliPath = !isNodeModuleUnderAppFolder
32
- ? libName => path.join(__dirname, '..', 'node_modules', '.bin', libName)
33
- : libName => libName;
34
- const suffixExt = isWindows ? '.cmd' : '';
35
-
36
- function getCliPath(libName) {
37
- return _getCliPath(libName) + suffixExt;
38
- }
39
-
40
35
  const webpack = getCliPath('webpack');
41
36
 
42
37
  const nodemon = getCliPath('nodemon');
@@ -0,0 +1,37 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIGXjCCBUagAwIBAgIRAMKJgToWlDYncIf54wIl/K4wDQYJKoZIhvcNAQELBQAw
3
+ gY8xCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
4
+ BgNVBAcTB1NhbGZvcmQxGDAWBgNVBAoTD1NlY3RpZ28gTGltaXRlZDE3MDUGA1UE
5
+ AxMuU2VjdGlnbyBSU0EgRG9tYWluIFZhbGlkYXRpb24gU2VjdXJlIFNlcnZlci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Ac2GFPs+uyzzU8yRxeqO3gicvXC1sApaca9uv8Vp3WDacnlsu
18
+ shVM+RXKLEi8/JHrcr9BCvSlycvZy8t+QUp6LicCgYBE1ocBJ1bTQEESlHfbj2OL
19
+ eYEBzXCkW4Il5fbmoT3keMr/gzOLgPGDGYY3cuD0IBQzPor5jsd5wnTMVHujwlNS
20
+ TtOtN0kCY6m+tLeiRMLyeO/8rq5/BrOrB17qQS0XhggVAq5FIMNKtYof3bEUCMSz
21
+ fVR6Zk9APZvMt9CXiSuz4QKBgFHDMMrCpUd2KLrOKaubbrjJSUv2Hrv0GyJKXrPc
22
+ m20Il8uA5s1trAWDwQIOmqn58iBayQeqYIOAVETLgwrcp49d6OUjRgmGsheLIjkD
23
+ /wVLuBfeAwQ+TeGKNN21kNlzqj6R/sOktk/Q+7x9ETb6/cDgnpOa3fZMY5mxFt44
24
+ fZ7pAoGBAN8ep49qQWxChYfqu75d3dkCcbF6UeWS+mDZ1QDkiJ5hGlDWDAC7EUma
25
+ jf7c56wBydih+2XKFq2BWxyFcfzzxKJrNeMhGANi/yJ1QrECyrwVWnhP+OFfG5vR
26
+ O+PzUCwZGet0PHG6r6IuvpGMCdZDYCt+fZSvIRJtmvIrtZWGKQly
27
+ -----END RSA PRIVATE KEY-----
@@ -0,0 +1,18 @@
1
+ # DevServer Start
2
+
3
+ ## command
4
+
5
+ > `react-cli start`
6
+
7
+ ## Options
8
+
9
+ we have to typs of options command line arguments and package.json option specifying
10
+
11
+ ### First package.json option specifying
12
+
13
+ 1. `react-cli.app.context`
14
+ 1. `react-cli.app.server`
15
+ 1. `react-cli.app.server`
16
+ 1. `react-cli.app.server`
17
+ 1. `react-cli.app.server`
18
+ 1. `react-cli.app.server`
@@ -0,0 +1,28 @@
1
+ ### Step 1: Update APT index
2
+
3
+ Run the apt update command on your Ubuntu Linux to update package repository contents database.
4
+
5
+ > sudo apt update
6
+
7
+ ### Step 2: Install Node.js 14 on Ubuntu 22.04|20.04|18.04
8
+
9
+ After system update, install Node.js 14 on Ubuntu 22.04|20.04|18.04 by first installing the required repository.
10
+
11
+ > curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
12
+
13
+ The script above will create apt sources list file for the NodeSource Node.js 14.x repo:
14
+
15
+ > \# Ubuntu 20.04 example
16
+ >
17
+ > $ cat /etc/apt/sources.list.d/nodesource.list
18
+ > deb https://deb.nodesource.com/node_14.x focal main
19
+ > deb-src https://deb.nodesource.com/node_14.x focal main
20
+
21
+ Once the repository is added, you can begin the installation of Node.js 14 on Ubuntu Linux:
22
+
23
+ > sudo apt -y install nodejs
24
+
25
+ Verify the version of Node.js installed.
26
+
27
+ > $ node -v
28
+ > v14.17.5
@@ -12,10 +12,13 @@ var _loaderUtils = require("../loaderUtils");
12
12
 
13
13
  var _libAlias = require("./libAlias");
14
14
 
15
+ var _configsAssetsLoaders = require("../loaderUtils/configsAssetsLoaders");
16
+
15
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
18
 
17
19
  let options = (0, _utils.getOptions)();
18
20
  let {
21
+ unstableDepsInverse,
19
22
  app: {
20
23
  folder,
21
24
  context,
@@ -26,6 +29,8 @@ let {
26
29
  cssUniqueness,
27
30
  seperateCssModules,
28
31
  changeRuntimeChunkChar,
32
+ // we are going to use this for fonts file name collide in issue in devmode
33
+ enableChunkHash,
29
34
  cssHashSelectors,
30
35
  classNamePrefix,
31
36
  selectorReplace,
@@ -48,6 +53,7 @@ let output = {
48
53
  publicPath: `${[serverUrl, contextURL].filter(a => a).join('/')}/`,
49
54
  jsonpFunction: `${context}Jsonp`
50
55
  };
56
+ const nameTemplate = (0, _configsAssetsLoaders.createNameTemplate)(enableChunkHash);
51
57
 
52
58
  if (crossorigin) {
53
59
  output.crossOriginLoading = 'anonymous';
@@ -96,19 +102,7 @@ module.exports = {
96
102
  } : null, {
97
103
  test: seperateCssModules ? /\.module\.css$/ : /(\.module)?\.css$/,
98
104
  use: (0, _loaderUtils.getCSSLoaders)(hasRTL, rtlExclude, null, cssUniqueness, selectorReplace, cssHashSelectors, classNamePrefix)
99
- }, {
100
- test: /\.jpe?g$|\.gif$|\.png$/,
101
- use: ['url-loader?limit=1000&name=./images/[name].[ext]']
102
- }, {
103
- test: /\.woff2|\.woff$|\.ttf$|\.eot$/,
104
- use: ['url-loader?limit=1000&name=./fonts/[name].[ext]']
105
- }, {
106
- test: /\.svg$/,
107
- use: ['url-loader?limit=1&name=./fonts/[name].[ext]']
108
- }, {
109
- test: /\.ogg$/,
110
- use: ['file-loader?name=./fonts/[name].[ext]']
111
- }, {
105
+ }, (0, _configsAssetsLoaders.configImageLoader)(nameTemplate), (0, _configsAssetsLoaders.configFontLoader)(nameTemplate), (0, _configsAssetsLoaders.configSVGLoader)(nameTemplate), (0, _configsAssetsLoaders.configAudioLoader)(nameTemplate), {
112
106
  test: /\.tmpl$/,
113
107
  use: [{
114
108
  loader: 'html-loader',
@@ -131,10 +125,10 @@ module.exports = {
131
125
  ZC: '$ZC'
132
126
  },
133
127
  resolve: {
134
- modules: [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules'],
128
+ modules: unstableDepsInverse ? ['node_modules', _path.default.resolve(__dirname, '..', '..', 'node_modules')] : [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules'],
135
129
  alias: disableES5Transpile ? _libAlias.libAlias : {}
136
130
  },
137
131
  resolveLoader: {
138
- modules: [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules']
132
+ modules: unstableDepsInverse ? ['node_modules', _path.default.resolve(__dirname, '..', '..', 'node_modules')] : [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules']
139
133
  }
140
134
  };
@@ -10,13 +10,17 @@ var _loaderUtils = require("../loaderUtils");
10
10
 
11
11
  var _libAlias = require("./libAlias");
12
12
 
13
+ var _configsAssetsLoaders = require("../loaderUtils/configsAssetsLoaders");
14
+
13
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
16
 
15
17
  let options = (0, _utils.getOptions)();
16
18
  let {
19
+ unstableDepsInverse,
17
20
  docs: {
18
21
  componentFolder,
19
22
  disableES5Transpile,
23
+ enableChunkHash,
20
24
  cssUniqueness,
21
25
  hasRTL,
22
26
  rtlExclude,
@@ -28,6 +32,7 @@ let {
28
32
  }
29
33
  } = options;
30
34
  let appPath = process.cwd();
35
+ const nameTemplate = (0, _configsAssetsLoaders.createNameTemplate)(enableChunkHash);
31
36
 
32
37
  module.exports = isSSTest => ({
33
38
  entry: {
@@ -69,16 +74,7 @@ module.exports = isSSTest => ({
69
74
  }, {
70
75
  test: /(\.module)?\.css$/,
71
76
  use: (0, _loaderUtils.getCSSLoaders)(hasRTL, rtlExclude, false, cssUniqueness, null, cssHashSelectors, classNamePrefix)
72
- }, {
73
- test: /\.jpe?g$|\.gif$|\.png$/,
74
- use: ['url-loader?limit=1000&name=./images/[name].[ext]']
75
- }, {
76
- test: /\.woff2|\.woff$|\.ttf$|\.eot$/,
77
- use: ['url-loader?limit=1000&name=./fonts/[name].[ext]']
78
- }, {
79
- test: /\.svg$/,
80
- use: ['url-loader?limit=1&name=./fonts/[name].[ext]']
81
- }, {
77
+ }, (0, _configsAssetsLoaders.configImageLoader)(nameTemplate), (0, _configsAssetsLoaders.configFontLoader)(nameTemplate), (0, _configsAssetsLoaders.configSVGLoader)(nameTemplate), (0, _configsAssetsLoaders.configAudioLoader)(nameTemplate), {
82
78
  test: /\.html$/,
83
79
  use: {
84
80
  loader: 'html-loader',
@@ -87,9 +83,6 @@ module.exports = isSSTest => ({
87
83
  interpolate: 'require'
88
84
  }
89
85
  }
90
- }, {
91
- test: /\.ogg$/,
92
- use: ['file-loader?name=./fonts/[name].[ext]']
93
86
  }, {
94
87
  test: /\.tmpl$/,
95
88
  use: [{
@@ -110,10 +103,10 @@ module.exports = isSSTest => ({
110
103
  ZC: '$ZC'
111
104
  },
112
105
  resolve: {
113
- modules: [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules'],
106
+ modules: unstableDepsInverse ? ['node_modules', _path.default.resolve(__dirname, '..', '..', 'node_modules')] : [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules'],
114
107
  alias: disableES5Transpile ? _libAlias.libAlias : {}
115
108
  },
116
109
  resolveLoader: {
117
- modules: [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules']
110
+ modules: unstableDepsInverse ? ['node_modules', _path.default.resolve(__dirname, '..', '..', 'node_modules')] : [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules']
118
111
  }
119
112
  });
@@ -8,6 +8,8 @@ var _loaderUtils = require("../loaderUtils");
8
8
 
9
9
  var _getLibraryImactPlugins = _interopRequireDefault(require("../pluginUtils/getLibraryImactPlugins"));
10
10
 
11
+ var _configsAssetsLoaders = require("../loaderUtils/configsAssetsLoaders");
12
+
11
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
14
 
13
15
  let options = (0, _utils.getOptions)();
@@ -18,6 +20,7 @@ let {
18
20
  hasRTL,
19
21
  rtlExclude,
20
22
  cssHashSelectors,
23
+ enableChunkHash,
21
24
  classNamePrefix
22
25
  },
23
26
  app: {
@@ -25,6 +28,7 @@ let {
25
28
  }
26
29
  } = options;
27
30
  let appPath = process.cwd();
31
+ const nameTemplate = (0, _configsAssetsLoaders.createNameTemplate)(enableChunkHash);
28
32
  module.exports = {
29
33
  entry: {
30
34
  main: [_path.default.resolve(__dirname, '..', 'hooks', 'docsProptypeHook.js'), _path.default.join(appPath, componentFolder, 'index.js')],
@@ -65,16 +69,7 @@ module.exports = {
65
69
  }, {
66
70
  test: /(\.module)?\.css$/,
67
71
  use: (0, _loaderUtils.getCSSLoaders)(hasRTL, rtlExclude, false, cssUniqueness, null, cssHashSelectors, classNamePrefix)
68
- }, {
69
- test: /\.jpe?g$|\.gif$|\.png$/,
70
- use: ['url-loader?limit=1000&name=./images/[name].[ext]']
71
- }, {
72
- test: /\.woff2|\.woff$|\.ttf$|\.eot$/,
73
- use: ['url-loader?limit=1000&name=./fonts/[name].[ext]']
74
- }, {
75
- test: /\.svg$/,
76
- use: ['url-loader?limit=1&name=./fonts/[name].[ext]']
77
- }, {
72
+ }, (0, _configsAssetsLoaders.configImageLoader)(nameTemplate), (0, _configsAssetsLoaders.configFontLoader)(nameTemplate), (0, _configsAssetsLoaders.configSVGLoader)(nameTemplate), (0, _configsAssetsLoaders.configAudioLoader)(nameTemplate), {
78
73
  test: /\.html$/,
79
74
  use: {
80
75
  loader: 'html-loader',
@@ -83,9 +78,6 @@ module.exports = {
83
78
  interpolate: 'require'
84
79
  }
85
80
  }
86
- }, {
87
- test: /\.ogg$/,
88
- use: ['file-loader?name=./fonts/[name].[ext]']
89
81
  }, {
90
82
  test: /\.tmpl$/,
91
83
  use: [{
@@ -17,6 +17,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
17
17
  // import TerserPlugin from 'terser-webpack-plugin';
18
18
  let options = (0, _utils.getOptions)();
19
19
  let {
20
+ unstableDepsInverse,
20
21
  app: {
21
22
  folder,
22
23
  context,
@@ -80,7 +81,7 @@ module.exports = {
80
81
  concatenateModules: true,
81
82
  minimize: true,
82
83
  // by default if minimize: true in webpack minimize then webpack automaticaly add TerserPlugin,
83
- // So we are overrideing it.
84
+ // So we are overrideing it.
84
85
  // minimizer: [
85
86
  // new TerserPlugin({
86
87
  // cache: true,
@@ -208,10 +209,10 @@ module.exports = {
208
209
  ZC: '$ZC'
209
210
  },
210
211
  resolve: {
211
- modules: [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules'],
212
+ modules: unstableDepsInverse ? ['node_modules', _path.default.resolve(__dirname, '..', '..', 'node_modules')] : [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules'],
212
213
  alias: disableES5Transpile ? _libAlias.libAlias : {}
213
214
  },
214
215
  resolveLoader: {
215
- modules: [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules']
216
+ modules: unstableDepsInverse ? ['node_modules', _path.default.resolve(__dirname, '..', '..', 'node_modules')] : [_path.default.resolve(__dirname, '..', '..', 'node_modules'), 'node_modules']
216
217
  }
217
218
  };
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.configAudioLoader = configAudioLoader;
7
+ exports.configFontLoader = configFontLoader;
8
+ exports.configImageLoader = configImageLoader;
9
+ exports.configSVGLoader = configSVGLoader;
10
+ exports.createNameTemplate = createNameTemplate;
11
+ // function getLoaderOptionQueryString(params) {
12
+ const ImageExtRegex = /\.jpe?g$|\.gif$|\.png$/;
13
+ const FontExtRegex = /\.woff2|\.woff$|\.ttf$|\.eot$/;
14
+ const SVGExtRegex = /\.svg$/;
15
+ const AudioExtRegex = /\.ogg$/;
16
+
17
+ function createLoaderOptionQueryString(loaderName, nameTemplate, limit = 1000) {
18
+ return `${loaderName}?limit=${limit}&name=${nameTemplate}`;
19
+ }
20
+
21
+ function configImageLoader(nameTemplate) {
22
+ return {
23
+ test: ImageExtRegex,
24
+ use: createLoaderOptionQueryString('url-loader', `./images/${nameTemplate}`)
25
+ };
26
+ }
27
+
28
+ function configFontLoader(nameTemplate) {
29
+ return {
30
+ test: FontExtRegex,
31
+ use: createLoaderOptionQueryString('url-loader', `./fonts/${nameTemplate}`)
32
+ };
33
+ }
34
+
35
+ function configSVGLoader(nameTemplate) {
36
+ return {
37
+ test: SVGExtRegex,
38
+ use: createLoaderOptionQueryString('url-loader', `./fonts/${nameTemplate}`, 1)
39
+ };
40
+ }
41
+
42
+ function configAudioLoader(nameTemplate) {
43
+ return {
44
+ test: AudioExtRegex,
45
+ use: createLoaderOptionQueryString('file-loader', `./fonts/${nameTemplate}`, 1)
46
+ };
47
+ }
48
+
49
+ function createNameTemplate(enableChunkHash) {
50
+ const ext = `${enableChunkHash ? '.[hash:20]' : ''}.[ext]`;
51
+ return `[name]${ext}`;
52
+ }
53
+ /*
54
+ export function createImageAndFontsAndSVGLoaders(enableChunkHash) {
55
+ const nameTemplate = createNameTemplate(enableChunkHash);
56
+ return [
57
+ configImageLoader(nameTemplate),
58
+ configFontLoader(nameTemplate),
59
+ configSVGLoader(nameTemplate),
60
+ configAudioLoader(nameTemplate)
61
+ ];
62
+ }
63
+ */
64
+
65
+ /*
66
+ export function createLoaderOptionObject(
67
+ loaderName,
68
+ nameTemplate,
69
+ fallback,
70
+ limit = 1000
71
+ ) {
72
+ return {
73
+ loader: loaderName,
74
+ options: {
75
+ limit,
76
+ name: nameTemplate,
77
+ fallback
78
+ }
79
+ };
80
+ }
81
+
82
+ function configLoaderObject(filter, loaderAndOptions) {
83
+ return {
84
+ test: filter,
85
+ use: loaderAndOptions
86
+ };
87
+ }
88
+ */
@@ -14,6 +14,11 @@ var _getCurrentBranch = _interopRequireDefault(require("../utils/getCurrentBranc
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
16
  var _default = {
17
+ cliRootPath: null,
18
+ unstableDepsInverse: {
19
+ value: false,
20
+ cli: 'unstable_deps_inverse'
21
+ },
17
22
  sslCertURL: {
18
23
  value: null,
19
24
  cli: 'ssl_cert_url'
@@ -60,11 +65,17 @@ var _default = {
60
65
  dirVarName: 'document.dir'
61
66
  },
62
67
  efc: {
63
- hasEFC: false,
68
+ hasEFC: {
69
+ value: false,
70
+ cli: 'enable_efc'
71
+ },
64
72
  createSDkFile: false,
65
73
  nameScope: 'ZOHODESK',
66
74
  version: 'default',
67
- outputFile: 'zohodesk-efc-sdk-[version].js',
75
+ outputFile: {
76
+ value: 'efc-sdk-[version].js',
77
+ cli: 'efc_output_file'
78
+ },
68
79
  templateFilePath: '',
69
80
  localeAttr: 'data-efc-locale',
70
81
  localeDefaultValue: 'en_US',
@@ -148,7 +159,10 @@ var _default = {
148
159
  disableES5Transpile: false,
149
160
  isReactMig: false,
150
161
  hasWidget: false,
151
- hasEFC: false,
162
+ hasEFC: {
163
+ value: false,
164
+ cli: 'enable_efc'
165
+ },
152
166
  enableChunkHash: {
153
167
  value: false,
154
168
  cli: 'hash_enable'
@@ -256,6 +270,7 @@ var _default = {
256
270
  value: true,
257
271
  cli: 'css_unique'
258
272
  },
273
+ enableChunkHash: false,
259
274
  folder: 'src',
260
275
  disableES5Transpile: false,
261
276
  hasRTL: false,
@@ -554,6 +569,10 @@ var _default = {
554
569
  value: null,
555
570
  cli: 'clone_revision'
556
571
  },
572
+ shallowClone: {
573
+ value: false,
574
+ cli: 'shallow_clone'
575
+ },
557
576
  projectName: {
558
577
  value: null,
559
578
  cli: 'clone_proj_name'
@@ -18,6 +18,9 @@ var _getCliPath = require("./getCliPath");
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
20
20
  const options = (0, _utils.getOptions)(); // const args = process.argv.slice(3);
21
+ // NOTE: need to discuss about in below codes,
22
+ // when we run webpack the usable options that comes for npm run not working as automatical
23
+ // we are use this option always --disable_watch=true reason for now no need for
21
24
 
22
25
  const {
23
26
  app: {
@@ -61,8 +64,9 @@ const startTime = Date.now(); // const result = spawnSync(
61
64
  // ),
62
65
  // { stdio: 'inherit' }
63
66
  // );
67
+ // --disable_watch=true
64
68
 
65
- const result = execSyncDefalut(`${webpack} --config ${require.resolve('../configs/webpack.dev.config.js')}`);
69
+ const result = execSyncDefalut(`${webpack} --config ${require.resolve('../configs/webpack.dev.config.js')} ${process.argv.slice(2).map(o => o.replace(/(.*?)=(.*)/, '$1="$2"')).join(' ')} `);
66
70
  result && console.log(result);
67
71
 
68
72
  if (result && result.stderr) {
@@ -83,8 +87,8 @@ if (zipname) {
83
87
  } else {
84
88
  console.log('zip file created', cssSelectorZipPath);
85
89
  }
86
- } // npm run start --app:domain=tsi --impact:cssbountry="{$@&&@$}" --disable-watch --dev-cache --cssselector_zip=css-source-map.zip
87
- // npm run start --app_domain=tsi --impact_cssbountry="{$@&&@$}" --disable-watch --dev-cache --cssselector_zip=css-source-map.zip
90
+ } // npm run start --app:domain=tsi --impact:cssbountry="{$@&&@$}" --disable-watch --dev-cache --cssselector_zip=css-source-map.zip
91
+ // npm run start --app_domain=tsi --impact_cssbountry="{$@&&@$}" --disable-watch --dev-cache --cssselector_zip=css-source-map.zip
88
92
 
89
93
 
90
94
  console.log(`compailation done in ${Date.now() - startTime}ms`);
@@ -9,16 +9,22 @@ var _path = _interopRequireDefault(require("path"));
9
9
 
10
10
  var _os = require("os");
11
11
 
12
+ var _fs = require("fs");
13
+
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
15
 
14
16
  let appPath = process.cwd();
15
17
  const isNodeModuleUnderAppFolder = __dirname.indexOf(appPath) !== -1;
16
18
  let isWindows = (0, _os.platform)().toLowerCase() === 'win32';
17
19
 
18
- const _getCliPath = !isNodeModuleUnderAppFolder ? libName => _path.default.join(__dirname, '..', '..', 'node_modules', '.bin', libName) : libName => libName;
20
+ const _getCliPath = !isNodeModuleUnderAppFolder ? libName => {
21
+ const cliPath = _path.default.join(__dirname, '..', '..', 'node_modules', '.bin', libName);
22
+
23
+ return (0, _fs.existsSync)(cliPath) ? cliPath : libName;
24
+ } : libName => libName;
19
25
 
20
26
  const suffixExt = isWindows ? '.cmd' : '';
21
27
 
22
28
  function getCliPath(libName) {
23
- return _getCliPath(libName) + suffixExt;
29
+ return _getCliPath(libName + suffixExt);
24
30
  }
@@ -12,8 +12,7 @@ var _path = _interopRequireDefault(require("path"));
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
14
14
  const httpsOptions = {
15
- key: _fs.default.readFileSync(_path.default.join(__dirname, '../../cert/key.pem')),
16
- cert: _fs.default.readFileSync(_path.default.join(__dirname, '../../cert/cert.pem')),
17
- passphrase: _fs.default.readFileSync(_path.default.join(__dirname, '../../cert/passphrase.pem')).toString()
15
+ key: _fs.default.readFileSync(_path.default.join(__dirname, '../../cert/Tsicsezwild-22-23.key')),
16
+ cert: _fs.default.readFileSync(_path.default.join(__dirname, '../../cert/Tsicsezwild-22-23.crt'))
18
17
  };
19
18
  exports.httpsOptions = httpsOptions;
@@ -14,7 +14,7 @@ var _utils = require("../utils");
14
14
 
15
15
  var _httpsOptions = require("./httpsOptions");
16
16
 
17
- var _devBulid = require("./devBulid");
17
+ var _devBuild = require("./devBuild");
18
18
 
19
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
20
 
@@ -42,7 +42,7 @@ const {
42
42
  zipname,
43
43
  cssSelectorZipPath,
44
44
  outputFolderLocation
45
- } = (0, _devBulid.getPaths)();
45
+ } = (0, _devBuild.getPaths)();
46
46
  const app = (0, _express.default)();
47
47
 
48
48
  if (hasMock) {
@@ -69,7 +69,8 @@ if (mode === 'prod') {
69
69
  config = require('../configs/webpack.dev.config');
70
70
  } else {
71
71
  throw new Error('You must configure valid option in mode');
72
- }
72
+ } // console.log({ contextURL });
73
+
73
74
 
74
75
  let compiler = (0, _webpack.default)(config);
75
76
  let webpackServerOptions = {
@@ -144,15 +145,22 @@ app.post('/wmsmockapi', (req, res) => {
144
145
  res.send('success');
145
146
  });
146
147
  let webpackCompilation;
148
+ let initalHTML;
147
149
  compiler.hooks.afterCompile.tap('ReactCLI', compilation => {
148
150
  webpackCompilation = compilation;
149
151
  });
152
+ compiler.hooks.done.tap('ReactCLI', () => {
153
+ const indexHtml = webpackCompilation.assets['index.html'];
154
+
155
+ if (indexHtml) {
156
+ initalHTML = indexHtml.source();
157
+ }
158
+ });
150
159
 
151
160
  if (contextURL) {
152
161
  app.use(contextURL, _express.default.static(context));
153
162
  app.use(`${contextURL}/*`, (req, res) => {
154
- let indexHtml = webpackCompilation.assets['index.html'];
155
- res.send(indexHtml && indexHtml.source());
163
+ res.send(initalHTML);
156
164
  });
157
165
  } else {
158
166
  app.use(_express.default.static(context));
@@ -28,6 +28,7 @@ let {
28
28
  branch,
29
29
  revision,
30
30
  projectName,
31
+ shallowClone,
31
32
  cacheDir,
32
33
  remoteName,
33
34
  shouldDelete
@@ -73,9 +74,11 @@ let cloneRepo = () => {
73
74
  }
74
75
  }
75
76
 
76
- (0, _index.log)(`Going to clone ${url} repo to ${cacheDir} path`); // this is for some time error will because of hg or git so we addid error log for this
77
+ (0, _index.log)(`Going to clone ${url} repo to ${cacheDir} path`); // this is for some time error will because of hg or git so we addid error log for this
77
78
 
78
- spawnSyncWithErrorLog(type, ['clone', url, revisionOrBranch, projectName], {
79
+ let oargs = ['clone', url, revisionOrBranch, projectName];
80
+ type === 'git' && shallowClone && oargs.push('--depth=1');
81
+ spawnSyncWithErrorLog(type, oargs, {
79
82
  cwd: cacheDir,
80
83
  stdio: 'inherit'
81
84
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/react-cli",
3
- "version": "0.0.1-exp.166.2",
3
+ "version": "0.0.1-exp.168.1",
4
4
  "description": "A CLI tool for build modern web application and libraries",
5
5
  "scripts": {
6
6
  "init": "node ./lib/utils/init.js",
@@ -10,6 +10,7 @@
10
10
  "build": "babel src -d lib --copy-files",
11
11
  "prepare": "npm run clean && npm run build",
12
12
  "lint": "eslint src ./bin/cli.js",
13
+ "postpublish": "node postpublish.js",
13
14
  "expublish": "npm publish --tag experimental-version"
14
15
  },
15
16
  "engines": {
package/postpublish.js ADDED
@@ -0,0 +1,6 @@
1
+ const { execSync } = require('child_process');
2
+ const { version } = require('./package.json');
3
+ console.log(`going to add git tag... v${version}`);
4
+
5
+ execSync(`git tag -a v${version}`, { stdio: 'inherit' });
6
+ execSync(`git push origin v${version}`, { stdio: 'inherit' });
package/DOTO.md DELETED
@@ -1,13 +0,0 @@
1
- Things that can be done
2
-
3
- 1. react-cli total revamp dependency packages version update (must for future (2-4 months) But not problem for now)
4
- 1. when we do revamp we may can to create a document with full detailed.
5
- 2. react-cli find the chain set for 0.0.1-alpha.113 version (must for future( 20 may 2022 ) But not problem for now) -- DONE
6
- 3. react version update 17 or 18 (must for future (until desk as efc or until get confilct with gc or some kind) But not problem for now)
7
- 1. if we move react 18, may be I can remove some hacks form virtualizer. we put hacks for batching since react 18 has auto batch we can remove that
8
- 2. same for react-dnd
9
- 4. react-cli package split (good to have)
10
- 5. efc unification (must for good future (2-4 months) But not problem for now)
11
- 6. i18n build as separate then client build I have some Ideas with some drawbacks (good to have)
12
- 7. react own implmention (good to have and also have a posiblity for Diamonds since it can lead as to some thing great for example preformance enforceing like always PureComponent , built in context optimazation, and issue fix we found in react reorder preformance problem. In my point of view react highly focus on declarative rather then preformance in some places may be there is reason but we may not have a use for that reason, and in some place I need to bend like hell to make what I want)
13
- 8. all repo links and build process and documention for steps
package/cert/cert.pem DELETED
@@ -1,37 +0,0 @@
1
- -----BEGIN CERTIFICATE-----
2
- MIIGXjCCBUagAwIBAgIQAtcYpsFFTaNHj+IMkHFT4TANBgkqhkiG9w0BAQsFADCB
3
- jzELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
4
- A1UEBxMHU2FsZm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTcwNQYDVQQD
5
- Ey5TZWN0aWdvIFJTQSBEb21haW4gVmFsaWRhdGlvbiBTZWN1cmUgU2VydmVyIENB
6
- MB4XDTIxMDUxOTAwMDAwMFoXDTIyMDUxOTIzNTk1OVowHjEcMBoGA1UEAxMTY3Nl
7
- ei56b2hvY29ycGluLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
8
- AKvOzaIzBQ3PDjQoiEUfNzhalfKGftg4R1D79dNV31RSGG6iIwr8LqPopHwzdlVv
9
- LOuJPJ1V3HSZs3GkfsTAp6/RBWvloth3Yd+ucGFzHqe9JObGZLTiRizUfRsZnk4B
10
- f88sSF97WPy7PD4YFXrrgn134UC92+I+Y+5vem4SBGqG4iJNkuJJG861S5XTrW+h
11
- cgUPohjOoLr3LgdqT/uNo6vnXMXI2ifk+18oZZUp9PSiOK8ZOXORCq+3knddvTM9
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FcoF5XmV6hkFsQIh
28
- AIDPMToawN4F3+7nhu4wNb8P6fxGjCyrNiRwxV6GcbstMEsGA1UdEQREMEKCE2Nz
29
- ZXouem9ob2NvcnBpbi5jb22CFSouY3Nlei56b2hvY29ycGluLmNvbYIUKi50c2ku
30
- em9ob2NvcnBpbi5jb20wDQYJKoZIhvcNAQELBQADggEBAJbJ8CSbGd6Vfiq7QatR
31
- iS58hDOrm3DnfLkbf0HjqMa/S3GQbpu59rb2dsXWAArBTqVSBBCaeshN1JyaosK2
32
- FCwb3ovkt6F5xOj2cRQ/CcUnDDBTZDrSx6FA+EToPuw+Hw+6VgH+WsT5csp6yzgD
33
- 3EjnYSDJ+UhepNhKu1GcbWlzRUK68T1gV+hIVx/SzrsT4f/pHDohjAQamQAWCg3O
34
- cJ2EU6GVwNSpfJkKizLBnmO6ghAeg5PTUqV7u6umrjXKkHoRSWajZm61ug2xOgHa
35
- 7ttiYVGrOhfw4k9byQhwrsGDxTMqJ5CoMs3nLJT9EK+xA9/bkMvKXMUJZkBjpJ1F
36
- XIE=
37
- -----END CERTIFICATE-----
package/cert/key.pem DELETED
@@ -1,27 +0,0 @@
1
- -----BEGIN RSA PRIVATE KEY-----
2
- MIIEpQIBAAKCAQEAq87NojMFDc8ONCiIRR83OFqV8oZ+2DhHUPv101XfVFIYbqIj
3
- Cvwuo+ikfDN2VW8s64k8nVXcdJmzcaR+xMCnr9EFa+Wi2Hdh365wYXMep70k5sZk
4
- tOJGLNR9GxmeTgF/zyxIX3tY/Ls8PhgVeuuCfXfhQL3b4j5j7m96bhIEaobiIk2S
5
- 4kkbzrVLldOtb6FyBQ+iGM6guvcuB2pP+42jq+dcxcjaJ+T7XyhllSn09KI4rxk5
6
- c5EKr7eSd129Mz157METIGdJGTh5AYWGkqY6JnOImTR6SHAtLkWS5m5DZXTWlvTa
7
- R8GoW0XSpFA1xF5dpB+KOdK5Z69C+RQ1S2//jQIDAQABAoIBAQCdu5d+umiBbP8V
8
- U8EH9Mi1rD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FDC6j
24
- PrJVzrECgYEAw2FfcfxLcsst6wPzGQScFo2c3ryf6QangNC2qg+QRJ7V4Yh3BJmr
25
- NMFEXguehX4gT6iQ0MN5/Yt67IAxlP0vlO9fChPeG6DFiyGH7gNuIY1WngI8hXwK
26
- ezMfJldH/sjKtawm6LyRk2VmUFe+HYiXO4eZxDuj4tRi/kgGnipYwlI=
27
- -----END RSA PRIVATE KEY-----
@@ -1 +0,0 @@
1
- Nb@$#3NGscc
package/eslint/NOTES.md DELETED
@@ -1,3 +0,0 @@
1
- Suggestions :
2
-
3
- 1. 'lint-setup', 'add-lint-scripts' not need to exposed
package/eslint/a23.c DELETED
@@ -1,16 +0,0 @@
1
- // Online C compiler to run C program online
2
- #include <stdio.h>
3
- // 23
4
-
5
- int main()
6
- {
7
- // Write C code here
8
- int i = 20, j = 22, k = 20, l = 10;
9
-
10
- for (int m = 0; m <= 10; m++)
11
- {
12
- l = ++i + ++j - k--;
13
- }
14
- printf("%d\n", l);
15
- return 0;
16
- }
package/eslint/a28.c DELETED
@@ -1,25 +0,0 @@
1
- // Online C compiler to run C program online
2
- #include <stdio.h>
3
- // 28
4
- int mark(int x)
5
- {
6
- if (x <= 0)
7
- {
8
- return 1;
9
- }
10
- return 0;
11
- }
12
-
13
- int main()
14
- {
15
- // Write C code here
16
- int x = 2345, t, a = 0;
17
- while (x > 0)
18
- {
19
- t = x % 10;
20
- a += mark(t);
21
- x /= 10;
22
- }
23
- printf("%d\n", a);
24
- return 0;
25
- }
package/eslint/a29.c DELETED
@@ -1,25 +0,0 @@
1
- // Online C compiler to run C program online
2
- #include <stdio.h>
3
- // 29
4
-
5
- int main()
6
- {
7
- // Write C code here
8
- int x = 777, y, s = 0, m, n, t, u;
9
- y = x;
10
- for (m = 0; y != 0; y /= 10)
11
- {
12
- u = y % 9;
13
- for (n = m, t = 1; n >= 0; n--)
14
- {
15
- t *= 9;
16
- }
17
- if (u < 5)
18
- {
19
- u += 3;
20
- }
21
- s = s * u + t;
22
- }
23
- printf("%d\n", s);
24
- return 0;
25
- }
package/eslint/a30.c DELETED
@@ -1,29 +0,0 @@
1
- // Online C compiler to run C program online
2
- #include <stdio.h>
3
- // 30
4
-
5
- int main()
6
- {
7
- // Write C code here
8
- int a[8] = {24, 27, 33, 27, 9, 43, 0, 3};
9
- int i, sum = 0;
10
- for (i = 0; i < 5; i = i + 1)
11
- {
12
- switch (a[i] % 3)
13
- {
14
- case 2:
15
- sum = sum * sum;
16
- break;
17
- case 1:
18
- sum += a[i];
19
- break;
20
- case 0:
21
- sum -= a[i];
22
- break;
23
- default:
24
- sum = sum * a[i];
25
- }
26
- }
27
- printf("%d\n", sum);
28
- return 0;
29
- }
package/eslint/a31.c DELETED
@@ -1,23 +0,0 @@
1
- // Online C compiler to run C program online
2
- #include <stdio.h>
3
- // 31
4
-
5
- int main()
6
- {
7
- // Write C code here
8
- int x = 16, y = 32, i = 0;
9
- do
10
- {
11
- if (x % 2 == 0)
12
- {
13
- y /= 2;
14
- }
15
- if (y % 2 < 1)
16
- {
17
- x /= 2;
18
- }
19
- i++;
20
- } while (x > 1);
21
- printf("%d\n", i);
22
- return 0;
23
- }
package/eslint/a35.c DELETED
@@ -1,23 +0,0 @@
1
- // Online C compiler to run C program online
2
- #include <stdio.h>
3
- // 34
4
- int compute(int a, int b)
5
- {
6
- if (b == 1)
7
- {
8
- return a;
9
- }
10
- else
11
- {
12
- return a + compute(a, --b);
13
- }
14
- }
15
-
16
- int main()
17
- {
18
- // Write C code here
19
- int a = 37, b = 26, result = 0;
20
- result = compute(a, b);
21
- printf("%d\n", result);
22
- return 0;
23
- }
package/eslint/a36.c DELETED
@@ -1,18 +0,0 @@
1
- // Online C compiler to run C program online
2
- #include <stdio.h>
3
- // 36
4
- int main()
5
- {
6
- // Write C code here
7
- char a[] = {'o', 'm', 'p', 'n', 'j', 'o'};
8
- for (int i = 1; i <= 6; i++)
9
- {
10
- a[i - 1] = a[i - 1] + i;
11
- }
12
- for (int i = 0; i < 6; i++)
13
- {
14
- printf("%c\n", a[i]);
15
- }
16
- // printf("%d\n", result);
17
- return 0;
18
- }
package/eslint/a37.c DELETED
@@ -1,25 +0,0 @@
1
- // Online C compiler to run C program online
2
- #include <stdio.h>
3
- // 37
4
- int main()
5
- {
6
- // Write C code here
7
- char name[] = {'o', 'h', 'o', 'z', 'p', 'r', 'o', 'c'};
8
- for (int i = 0, j = 7; i <= 7; i++, j--)
9
- {
10
- if (name[i] < name[j])
11
- {
12
- name[i] = name[j];
13
- }
14
- else
15
- {
16
- name[i] = name[i];
17
- }
18
- }
19
- for (int i = 0; i <= 7; i++)
20
- {
21
- printf("%c", name[i]);
22
- }
23
- // printf("%d\n", result);
24
- return 0;
25
- }
package/eslint/a38.c DELETED
@@ -1,28 +0,0 @@
1
- // Online C compiler to run C program online
2
- #include <stdio.h>
3
- // 38
4
- int main()
5
- {
6
- // Write C code here
7
- int a = 7798, d = 1, temp, result = 1;
8
- temp = a;
9
- while (d)
10
- {
11
- d = temp % 10;
12
- temp = temp / 10;
13
- d %= 4;
14
- switch (d)
15
- {
16
- case 0:
17
- result += (a / 100) + (a % 100);
18
- case 1:
19
- result += (a / 100) + (a % 100);
20
- case 2:
21
- result += (a / 100) + (a % 100);
22
- case 3:
23
- result += (a / 100) + (a % 100);
24
- };
25
- }
26
- printf("%d\n", result);
27
- return 0;
28
- }
package/eslint/a39.c DELETED
@@ -1,17 +0,0 @@
1
- // Online C compiler to run C program online
2
- #include <stdio.h>
3
- // 39
4
- int main()
5
- {
6
- // Write C code here
7
- int a = 20, b = 15, c = 0;
8
-
9
- while (b > 0)
10
- {
11
- a = c + a - b;
12
- b = a + 1;
13
- c = b - 1;
14
- }
15
- printf("%d\n", a);
16
- return 0;
17
- }
package/eslint/a40.c DELETED
@@ -1,32 +0,0 @@
1
- // Online C compiler to run C program online
2
- #include <stdio.h>
3
- // 40
4
- int main()
5
- {
6
- // Write C code here
7
- char a[5] = {'i', 'j', 'k', 'l', 'm'};
8
- int i;
9
- for (i = 0; i < 5; i++)
10
- {
11
- // printf("%d\n", a[i]);
12
- switch (i % 2)
13
- {
14
- case 0:
15
- a[i] = a[i] + 2;
16
- break;
17
- case 1:
18
- a[i] = a[i] + 3;
19
- break;
20
- default:
21
- a[i] = a[i] + 3;
22
- }
23
- }
24
-
25
- for (i = 0; i < 5; i++)
26
- {
27
- printf("%c", a[i]);
28
- }
29
- // printf("\nHello world");
30
-
31
- return 0;
32
- }
@@ -1,18 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
- <title>mock api</title>
7
- </head>
8
- <body>
9
- <h1>We are going to see how to use mock api</h1>
10
- <ul>
11
- <li>
12
- Step 1:-
13
- you need to start the app with "react-cli"."app"."server"."hasMock" as "true" in package.json
14
- <code>npm run start --app-port=9090</code>
15
- </li>
16
- </ul>
17
- </body>
18
- </html>
package/eslint/mockapi.md DELETED
@@ -1,5 +0,0 @@
1
- # We are going to see how to use `Mock api`
2
-
3
- - Step 1:-
4
- you need to start the app with **"react-cli"."app"."server"."hasMock"** as `true` and **"react-cli"."app"."server"."hasMock"** as `true` in package.json <code>npm run start --app-port=9090</code>
5
- - Step 2:- you need to start the app with **"react-cli"."app"."server"."hasMock"** as `true` in package.json <code>npm run start --app-port=9090</code>