@linktr.ee/create-link-app 0.3.0-next.43 → 0.3.0-next.44
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/README.md
CHANGED
|
@@ -36,7 +36,10 @@ Build Link App project to static assets used for production
|
|
|
36
36
|
|
|
37
37
|
```
|
|
38
38
|
USAGE
|
|
39
|
-
$ create-link-app build
|
|
39
|
+
$ create-link-app build [--native]
|
|
40
|
+
|
|
41
|
+
FLAGS
|
|
42
|
+
--native Build native components of a Link App ready for publishing to npm
|
|
40
43
|
|
|
41
44
|
DESCRIPTION
|
|
42
45
|
Build Link App project to static assets used for production
|
package/dist/commands/build.js
CHANGED
|
@@ -7,12 +7,21 @@ const core_1 = require("@oclif/core");
|
|
|
7
7
|
const webpack_1 = __importDefault(require("webpack"));
|
|
8
8
|
const base_1 = __importDefault(require("../base"));
|
|
9
9
|
const webpack_config_1 = __importDefault(require("../webpack/webpack.config"));
|
|
10
|
+
const child_process_1 = require("child_process");
|
|
10
11
|
class Build extends base_1.default {
|
|
11
12
|
async run() {
|
|
12
13
|
const { flags } = await this.parse(Build);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
14
|
+
if (flags['native']) {
|
|
15
|
+
this.native();
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
this.webpack({
|
|
19
|
+
allowAnyOrigin: flags['allow-any-origin'],
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async webpack(options) {
|
|
24
|
+
const config = await (0, webpack_config_1.default)('production', options);
|
|
16
25
|
(0, webpack_1.default)(config, (err, stats) => {
|
|
17
26
|
if (err) {
|
|
18
27
|
this.error(err);
|
|
@@ -25,6 +34,9 @@ class Build extends base_1.default {
|
|
|
25
34
|
}
|
|
26
35
|
});
|
|
27
36
|
}
|
|
37
|
+
async native() {
|
|
38
|
+
(0, child_process_1.spawn)('npx react-native-builder-bob build', { cwd: process.cwd(), shell: true, stdio: 'inherit' });
|
|
39
|
+
}
|
|
28
40
|
}
|
|
29
41
|
exports.default = Build;
|
|
30
42
|
Build.description = 'Build Link App project to static assets used for production';
|
|
@@ -33,4 +45,7 @@ Build.flags = {
|
|
|
33
45
|
description: 'Allow Link App iframe to be loadable from non-Linktree origins for debugging',
|
|
34
46
|
hidden: true,
|
|
35
47
|
}),
|
|
48
|
+
native: core_1.Flags.boolean({
|
|
49
|
+
description: 'Build native components of a Link App ready for publishing to npm',
|
|
50
|
+
}),
|
|
36
51
|
};
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.3.0-next.
|
|
2
|
+
"version": "0.3.0-next.44",
|
|
3
3
|
"commands": {
|
|
4
4
|
"build": {
|
|
5
5
|
"id": "build",
|
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
"description": "Allow Link App iframe to be loadable from non-Linktree origins for debugging",
|
|
17
17
|
"hidden": true,
|
|
18
18
|
"allowNo": false
|
|
19
|
+
},
|
|
20
|
+
"native": {
|
|
21
|
+
"name": "native",
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"description": "Build native components of a Link App ready for publishing to npm",
|
|
24
|
+
"allowNo": false
|
|
19
25
|
}
|
|
20
26
|
},
|
|
21
27
|
"args": {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linktr.ee/create-link-app",
|
|
3
|
-
"version": "0.3.0-next.
|
|
3
|
+
"version": "0.3.0-next.44",
|
|
4
4
|
"description": "Create a Link App on Linktr.ee.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Linktree",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"prop-types": "^15.8.1",
|
|
73
73
|
"react": "^18.2.0",
|
|
74
74
|
"react-dom": "^18.2.0",
|
|
75
|
+
"react-native-builder-bob": "^0.21.3",
|
|
75
76
|
"slugify": "^1.6.6",
|
|
76
77
|
"storybook-addon-designs": "^6.3.1",
|
|
77
78
|
"storybook-addon-turbo-build": "^1.1.0",
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
"deploy": "create-link-app deploy",
|
|
6
6
|
"storybook": "create-link-app storybook",
|
|
7
7
|
"dev": "create-link-app dev",
|
|
8
|
-
"generate:types": "create-link-app generate-types"
|
|
8
|
+
"generate:types": "create-link-app generate-types",
|
|
9
|
+
"prepack": "create-link-app build --native"
|
|
9
10
|
},
|
|
10
11
|
"devDependencies": {
|
|
11
12
|
"@linktr.ee/component-library": "latest",
|
|
@@ -13,5 +14,29 @@
|
|
|
13
14
|
"@linktr.ee/ui-link-kit": "latest",
|
|
14
15
|
"@types/react": "^18.2.8",
|
|
15
16
|
"@types/react-dom": "^18.2.4"
|
|
16
|
-
}
|
|
17
|
+
},
|
|
18
|
+
"main": "lib/commonjs/index.js",
|
|
19
|
+
"react-native": "src/index.ts",
|
|
20
|
+
"module": "lib/module/index.js",
|
|
21
|
+
"types": "lib/typescript/src/index.d.ts",
|
|
22
|
+
"files": [
|
|
23
|
+
"src",
|
|
24
|
+
"lib",
|
|
25
|
+
"!**/__tests__",
|
|
26
|
+
"!**/__fixtures__",
|
|
27
|
+
"!**/__mocks__"
|
|
28
|
+
],
|
|
29
|
+
"react-native-builder-bob": {
|
|
30
|
+
"source": "src",
|
|
31
|
+
"output": "lib",
|
|
32
|
+
"targets": [
|
|
33
|
+
"commonjs",
|
|
34
|
+
"module",
|
|
35
|
+
"typescript"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"eslintIgnore": [
|
|
39
|
+
"node_modules/",
|
|
40
|
+
"lib/"
|
|
41
|
+
]
|
|
17
42
|
}
|