@tarojs/rn-runner 3.5.0-theta.0 → 3.5.0-theta.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRNConfigBabelPlugin = exports.getRNConfigTransformer = exports.getRNConfigOutput = exports.getRNConfigEntry = exports.getRNConfig = exports.getConfig = void 0;
3
+ exports.getRNConfigTransformer = exports.getRNConfigOutput = exports.getRNConfigEntry = exports.getRNConfigBabelPlugin = exports.getRNConfig = exports.getConfig = void 0;
4
4
  const lodash_1 = require("lodash");
5
5
  const fs = require('fs');
6
6
  let config;
@@ -1 +1 @@
1
- {"version":3,"file":"config-holder.js","sourceRoot":"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gC,wDAAsB"}
package/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  module.exports = require('./dist/index.js').default
2
+
2
3
  module.exports.default = module.exports
package/package.json CHANGED
@@ -1,21 +1,12 @@
1
1
  {
2
2
  "name": "@tarojs/rn-runner",
3
- "version": "3.5.0-theta.0",
3
+ "version": "3.5.0-theta.1",
4
4
  "description": "ReactNative build tool for taro",
5
5
  "main": "index.js",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/NervJS/taro.git"
9
9
  },
10
- "scripts": {
11
- "build": "tsc",
12
- "dev": "tsc --watch",
13
- "lint": "eslint .",
14
- "test": "jest --silent",
15
- "test:dev": "jest --watch",
16
- "test:ci": "jest --silent --coverage false",
17
- "test:coverage": "jest --coverage"
18
- },
19
10
  "keywords": [
20
11
  "taro"
21
12
  ],
@@ -33,10 +24,10 @@
33
24
  "@react-native-community/cli": "^7.0.3",
34
25
  "@react-native-community/cli-plugin-metro": "^7.0.0",
35
26
  "@react-native-community/cli-server-api": "^7.0.0",
36
- "@tarojs/helper": "workspace:*",
37
- "@tarojs/rn-style-transformer": "workspace:*",
38
- "@tarojs/rn-supporter": "workspace:*",
39
- "@tarojs/rn-transformer": "workspace:*",
27
+ "@tarojs/helper": "3.5.0-theta.1",
28
+ "@tarojs/rn-style-transformer": "3.5.0-theta.1",
29
+ "@tarojs/rn-supporter": "3.5.0-theta.1",
30
+ "@tarojs/rn-transformer": "3.5.0-theta.1",
40
31
  "fs-extra": "^8.0.1",
41
32
  "lodash": "^4.17.21",
42
33
  "metro": "^0.67.0",
@@ -47,5 +38,14 @@
47
38
  "metro-resolver": "^0.67.0",
48
39
  "mime-types": "^2.1.27",
49
40
  "qrcode-terminal": "^0.12.0"
41
+ },
42
+ "scripts": {
43
+ "build": "tsc",
44
+ "dev": "tsc --watch",
45
+ "lint": "eslint .",
46
+ "test": "jest --silent",
47
+ "test:dev": "jest --watch",
48
+ "test:ci": "jest --silent --coverage false",
49
+ "test:coverage": "jest --coverage"
50
50
  }
51
- }
51
+ }
@@ -1,4 +1,5 @@
1
1
  import { merge } from 'lodash'
2
+
2
3
  import { Config, RNConfig } from '../types'
3
4
 
4
5
  const fs = require('fs')
@@ -66,4 +67,4 @@ const getRNConfigBabelPlugin = () => {
66
67
  }
67
68
  }
68
69
 
69
- export { getConfig, getRNConfig, getRNConfigEntry, getRNConfigOutput, getRNConfigTransformer, getRNConfigBabelPlugin }
70
+ export { getConfig, getRNConfig, getRNConfigBabelPlugin, getRNConfigEntry, getRNConfigOutput, getRNConfigTransformer }
@@ -14,21 +14,21 @@ type GetModulesRunBeforeMainModuleFunc = () => any
14
14
  type GetPolyfillsFunc = () => any
15
15
  interface MetroConfig {
16
16
  transformer: {
17
- dynamicDepsInPackages: string;
18
- babelTransformerPath: string;
19
- assetRegistryPath: string;
20
- },
17
+ dynamicDepsInPackages: string
18
+ babelTransformerPath: string
19
+ assetRegistryPath: string
20
+ }
21
21
  resolver: {
22
- sourceExts: string[];
23
- resolveRequest?: ResolveRequestFunc;
24
- },
22
+ sourceExts: string[]
23
+ resolveRequest?: ResolveRequestFunc
24
+ }
25
25
  serializer: {
26
- getModulesRunBeforeMainModule: GetModulesRunBeforeMainModuleFunc,
26
+ getModulesRunBeforeMainModule: GetModulesRunBeforeMainModuleFunc
27
27
  getPolyfills: GetPolyfillsFunc
28
- },
29
- cacheStores: ConditionalFileStore<any>[],
28
+ }
29
+ cacheStores: ConditionalFileStore<any>[]
30
30
  server: {
31
- port: number;
31
+ port: number
32
32
  }
33
33
  }
34
34
 
@@ -1,55 +1,55 @@
1
1
  // https://taro-docs.jd.com/taro/docs/config-detail/
2
2
  interface Output {
3
- android: string,
3
+ android: string
4
4
  ios: string
5
5
  }
6
6
 
7
7
  interface Copy {
8
- patterns: [],
8
+ patterns: []
9
9
  options: Record<string, any>
10
10
  }
11
11
 
12
12
  interface Csso {
13
- enable: boolean,
13
+ enable: boolean
14
14
  config: Record<string, any>
15
15
  }
16
16
 
17
17
  interface Sass {
18
- resource: [],
19
- projectDirectory: string,
18
+ resource: []
19
+ projectDirectory: string
20
20
  data: string
21
21
  }
22
22
 
23
23
  export interface Config {
24
- projectName?: string,
25
- date?: string,
26
- designWidth?: number,
27
- deviceRatio?: Record<string, any>,
28
- sourceRoot?: string,
29
- outputRoot?: string,
30
- defineConstants?: Record<string, any>,
31
- alias?: Record<string, any>,
32
- env?: Record<string, any>,
33
- sass?: Sass,
34
- copy?: Copy,
35
- plugins?: [],
36
- presets?: [],
37
- terser?: Record<string, any>,
38
- csso?: Csso,
39
- framework?: Record<string, any>,
40
- mini?: Record<string, any>,
41
- h5?: Record<string, any>,
42
- rn?: Record<string, any>,
24
+ projectName?: string
25
+ date?: string
26
+ designWidth?: number
27
+ deviceRatio?: Record<string, any>
28
+ sourceRoot?: string
29
+ outputRoot?: string
30
+ defineConstants?: Record<string, any>
31
+ alias?: Record<string, any>
32
+ env?: Record<string, any>
33
+ sass?: Sass
34
+ copy?: Copy
35
+ plugins?: []
36
+ presets?: []
37
+ terser?: Record<string, any>
38
+ csso?: Csso
39
+ framework?: Record<string, any>
40
+ mini?: Record<string, any>
41
+ h5?: Record<string, any>
42
+ rn?: Record<string, any>
43
43
  }
44
44
 
45
45
  export interface RNConfig extends Config {
46
- appName?: boolean,
47
- entry?: string,
48
- output?: Output,
49
- sourceDir?: string,
50
- postcss?: Record<string, any>,
51
- less?: Record<string, any>,
52
- stylus?: Record<string, any>,
53
- transformer?: any,
54
- babelPlugin?: any,
46
+ appName?: boolean
47
+ entry?: string
48
+ output?: Output
49
+ sourceDir?: string
50
+ postcss?: Record<string, any>
51
+ less?: Record<string, any>
52
+ stylus?: Record<string, any>
53
+ transformer?: any
54
+ babelPlugin?: any
55
55
  }