yeet
This commit is contained in:
32
node_modules/@react-native-community/cli/build/commands/config/config.js
generated
vendored
Normal file
32
node_modules/@react-native-community/cli/build/commands/config/config.js
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
function isValidRNDependency(config) {
|
||||
return Object.keys(config.platforms).filter(key => Boolean(config.platforms[key])).length !== 0 || config.hooks && Object.keys(config.hooks).length !== 0 || config.assets && config.assets.length !== 0 || config.params && config.params.length !== 0;
|
||||
}
|
||||
|
||||
function filterConfig(config) {
|
||||
const filtered = { ...config
|
||||
};
|
||||
Object.keys(filtered.dependencies).forEach(item => {
|
||||
if (!isValidRNDependency(filtered.dependencies[item])) {
|
||||
delete filtered.dependencies[item];
|
||||
}
|
||||
});
|
||||
return filtered;
|
||||
}
|
||||
|
||||
var _default = {
|
||||
name: 'config',
|
||||
description: 'Print CLI configuration',
|
||||
func: async (_argv, ctx) => {
|
||||
console.log(JSON.stringify(filterConfig(ctx), null, 2));
|
||||
}
|
||||
};
|
||||
exports.default = _default;
|
||||
|
||||
//# sourceMappingURL=config.js.map
|
Reference in New Issue
Block a user