You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
533 B
27 lines
533 B
#!/usr/bin/env node
|
|
/* eslint-disable no-console */
|
|
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
/* eslint-disable import/no-dynamic-require */
|
|
const json = require(path.resolve('./package.json'));
|
|
|
|
if (!json.rnpm) {
|
|
json.rnpm = {
|
|
assets: [],
|
|
};
|
|
} else if (!json.rnpm.assets) {
|
|
json.rnpm.assets = [];
|
|
}
|
|
|
|
if (json.rnpm.assets.indexOf('./assets/fonts') !== -1) process.exit();
|
|
|
|
json.rnpm.assets.push('./assets/fonts');
|
|
|
|
fs.writeFileSync(
|
|
'./package.json',
|
|
`${JSON.stringify(json, null, 2)}\r\n`,
|
|
'utf8'
|
|
);
|