Skip to content

Commit

Permalink
Only generate supported schemas
Browse files Browse the repository at this point in the history
Summary: We're going to be incrementally adding these view configs and enforcing that they're up to date in react-native-sanity-test so we need to limit them to what's supported (which is just Slider for now)

Reviewed By: TheSavior

Differential Revision: D15321950

fbshipit-source-id: 22b014db1d9b58553237f571b438c82948f19634
  • Loading branch information
rickhanlonii authored and facebook-github-bot committed May 16, 2019
1 parent ed61a3b commit fb41a83
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,14 @@ const generate = require('./generate-view-configs');

const [fileList] = process.argv.slice(2);

generate(fileList.split('\n'));
const CURRENT_VIEW_CONFIG_SCHEMAS = ['SliderSchema.js'];

generate(
fileList
.split('\n')
.filter(fileName =>
CURRENT_VIEW_CONFIG_SCHEMAS.find(supportedFileName =>
fileName.endsWith(supportedFileName),
),
),
);

0 comments on commit fb41a83

Please sign in to comment.