Skip to content

Commit

Permalink
feat(react-property): add script to build injection json
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Jul 8, 2019
1 parent 53911db commit 2de3da9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/react-property/scripts/build-injection.js
@@ -0,0 +1,18 @@
const fs = require('fs');
const path = require('path');
const DOMProperty = require('react-dom/lib/DOMProperty');
const { LIB_DIR } = require('./constants');

/**
* Create output directory (if it doesn't exist).
*/
try {
fs.mkdirSync(LIB_DIR);
} catch (error) {
if (error.code !== 'EEXIST') throw error;
}

fs.writeFileSync(
path.resolve(LIB_DIR, 'injection.json'),
JSON.stringify(DOMProperty.injection)
);

0 comments on commit 2de3da9

Please sign in to comment.