@react-native-ama/core 2.0.0-beta.0 → 2.0.0-beta.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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const projectRoot = path_1.default.resolve(process.cwd(), '..', '..', '..');
|
|
9
|
+
const configFileName = 'ama.config.json';
|
|
10
|
+
const configFilePath = path_1.default.join(projectRoot, configFileName);
|
|
11
|
+
const defaultConfig = {
|
|
12
|
+
rules: {},
|
|
13
|
+
accessibilityLabelExceptions: [],
|
|
14
|
+
log: 'inspect',
|
|
15
|
+
};
|
|
16
|
+
if (!fs_1.default.existsSync(configFilePath)) {
|
|
17
|
+
try {
|
|
18
|
+
fs_1.default.writeFileSync(configFilePath, JSON.stringify(defaultConfig, null, 2));
|
|
19
|
+
console.log(`[AMA]: Config file created at ${configFilePath}`);
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
console.error('[AMA]: Error creating config file:', error);
|
|
23
|
+
}
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-ama/core",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.1",
|
|
4
4
|
"description": "Accessible Mobile App Library for React Native",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
@@ -44,8 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"files": [
|
|
46
46
|
"src",
|
|
47
|
-
"dist"
|
|
48
|
-
"dist/scripts"
|
|
47
|
+
"dist"
|
|
49
48
|
],
|
|
50
49
|
"scripts": {
|
|
51
50
|
"build": "rm -rf dist && ../../node_modules/.bin/tsc -p ./tsconfig.build.json",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
|
|
4
|
+
const projectRoot = path.resolve(process.cwd(), '..', '..', '..');
|
|
5
|
+
|
|
6
|
+
const configFileName = 'ama.config.json';
|
|
7
|
+
const configFilePath = path.join(projectRoot, configFileName);
|
|
8
|
+
const defaultConfig = {
|
|
9
|
+
rules: {},
|
|
10
|
+
accessibilityLabelExceptions: [],
|
|
11
|
+
log: 'inspect',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
if (!fs.existsSync(configFilePath)) {
|
|
15
|
+
try {
|
|
16
|
+
fs.writeFileSync(configFilePath, JSON.stringify(defaultConfig, null, 2));
|
|
17
|
+
console.log(`[AMA]: Config file created at ${configFilePath}`);
|
|
18
|
+
} catch (error) {
|
|
19
|
+
console.error('[AMA]: Error creating config file:', error);
|
|
20
|
+
}
|
|
21
|
+
}
|