mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: This diff adds a new `js1` script `js1 build viewconfigs` which will generate the view configs for generated components in xplat/js Note that the view configs are not currently valid so I'm not checking them in or adding them to a test, that work will follow Reviewed By: TheSavior Differential Revision: D15239656 fbshipit-source-id: d15776f36a7d7684f50beafd783bccb02352afc0
27 lines
501 B
JavaScript
27 lines
501 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow strict-local
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import type {SchemaType} from '../CodegenSchema.js';
|
|
|
|
function parse(filename: string): ?SchemaType {
|
|
try {
|
|
// $FlowFixMe Can't require dynamic variables
|
|
return require(filename);
|
|
} catch (err) {
|
|
// Ignore
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
parse,
|
|
};
|