@ronas-it/nx-generators 0.3.7 → 0.3.8
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/package.json +1 -1
- package/src/generators/expo-app/files/app.config.ts.template +1 -1
- package/src/generators/expo-app/generator.js +2 -1
- package/src/generators/expo-app/generator.js.map +1 -1
- package/src/generators/expo-app/schema.d.ts +0 -1
- package/src/generators/react-component/schema.d.ts +0 -2
- package/src/generators/react-lib/schema.d.ts +0 -1
- package/src/shared/utils/format-utils.d.ts +1 -0
- package/src/shared/utils/format-utils.js +3 -1
- package/src/shared/utils/format-utils.js.map +1 -1
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { EASConfig } from 'expo-constants/build/Constants.types';
|
|
|
4
4
|
const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig } & typeof extra } => {
|
|
5
5
|
const projectId = '';
|
|
6
6
|
|
|
7
|
-
const appId = 'com.<%= name %>.dev';
|
|
7
|
+
const appId = 'com.<%= formatAppIdentifier(name) %>.dev';
|
|
8
8
|
|
|
9
9
|
const extra = {
|
|
10
10
|
eas: { projectId } as EASConfig,
|
|
@@ -46,7 +46,8 @@ function expoAppGenerator(tree, options) {
|
|
|
46
46
|
appPackageJson.scripts = Object.assign(Object.assign({}, scripts_1.default), appPackageJson.scripts);
|
|
47
47
|
(0, devkit_1.writeJson)(tree, appPackagePath, appPackageJson);
|
|
48
48
|
// Add app files
|
|
49
|
-
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), appRoot, Object.assign(Object.assign({}, options), { formatName: utils_1.formatName
|
|
49
|
+
(0, devkit_1.generateFiles)(tree, path.join(__dirname, 'files'), appRoot, Object.assign(Object.assign({}, options), { formatName: utils_1.formatName,
|
|
50
|
+
formatAppIdentifier: utils_1.formatAppIdentifier }));
|
|
50
51
|
// Add dependencies
|
|
51
52
|
(0, devkit_1.addDependenciesToPackageJson)(tree, Object.assign(Object.assign({}, dependencies), {
|
|
52
53
|
// Need new version to fix this error:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/expo-app/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,6BAA6B;AAC7B,uCAQoB;AAEpB,uCAAgC;AAChC,2BAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../plugin/src/generators/expo-app/generator.ts"],"names":[],"mappings":";;;;AAAA,iDAAyC;AACzC,6BAA6B;AAC7B,uCAQoB;AAEpB,uCAAgC;AAChC,2BAAwC;AACxC,8CAAqE;AAErE,MAAM,YAAY,GAAG;IACnB,gBAAgB,EAAE,SAAS;IAC3B,aAAa,EAAE,SAAS;IACxB,gCAAgC,EAAE,SAAS;IAC3C,sBAAsB,EAAE,SAAS;IACjC,cAAc,EAAE,QAAQ;IACxB,iBAAiB,EAAE,SAAS;IAC5B,cAAc,EAAE,UAAU;IAC1B,eAAe,EAAE,QAAQ;CAC1B,CAAC;AAEF,SAAsB,gBAAgB,CACpC,IAAU,EACV,OAA+B;;QAE/B,MAAM,OAAO,GAAG,QAAQ,OAAO,CAAC,SAAS,EAAE,CAAC;QAC5C,MAAM,aAAa,GAAG,QAAQ,OAAO,CAAC,SAAS,MAAM,CAAC;QAEtD,0BAA0B;QAC1B,IAAA,wBAAQ,EAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAA;QAErD,IAAI,CAAC,IAAA,eAAU,EAAC,OAAO,CAAC,EAAE,CAAC;YACzB,IAAA,wBAAQ,EACN,yBAAyB,OAAO,CAAC,IAAI,qBAAqB,OAAO,CAAC,SAAS,oFAAoF,EAC/J,EAAE,KAAK,EAAE,SAAS,EAAE,CACrB,CAAC;QACJ,CAAC;QAED,iHAAiH;QACjH,IAAI,IAAA,eAAU,EAAC,aAAa,CAAC,EAAE,CAAC;YAC9B,IAAA,WAAM,EAAC,aAA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qCAA4B,EAAC,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,cAAc,CAAC,CAAC;QAErE,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAExB,OAAO,GAAG,EAAE;YACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;YAC1B,IAAA,wBAAQ,EAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC3D,CAAC,CAAC;IACJ,CAAC;CAAA;AArED,4CAqEC;AAED,kBAAe,gBAAgB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const formatName: (value: string, withoutSpaces?: boolean) => string;
|
|
2
|
+
export declare const formatAppIdentifier: (value: string) => string;
|
|
2
3
|
export declare const getProjectName: (str: string) => string;
|
|
3
4
|
export declare const getLibName: (path: string) => string;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLibName = exports.getProjectName = exports.formatName = void 0;
|
|
3
|
+
exports.getLibName = exports.getProjectName = exports.formatAppIdentifier = exports.formatName = void 0;
|
|
4
4
|
const formatName = (value, withoutSpaces = false) => value
|
|
5
5
|
.split('-')
|
|
6
6
|
.map((word) => `${word.charAt(0).toUpperCase()}${word.substring(1)}`)
|
|
7
7
|
.join(withoutSpaces ? '' : ' ');
|
|
8
8
|
exports.formatName = formatName;
|
|
9
|
+
const formatAppIdentifier = (value) => value.toLowerCase().replace(/-/g, '.');
|
|
10
|
+
exports.formatAppIdentifier = formatAppIdentifier;
|
|
9
11
|
const getProjectName = (str) => {
|
|
10
12
|
const parts = str.split('@');
|
|
11
13
|
return parts.length > 1 ? parts[1].split('/')[0] : parts[0];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-utils.js","sourceRoot":"","sources":["../../../../../plugin/src/shared/utils/format-utils.ts"],"names":[],"mappings":";;;AAAO,MAAM,UAA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