Instead of making this part of the build process, let the devs generate stripped-emoji.json
With the expectation that when the file needs to be regenerated to include other keys, the developer will run this script.pull/21833/head
parent
22ddbc63c3
commit
30f80b57f2
|
@ -33,9 +33,8 @@
|
|||
"scripts": {
|
||||
"reskindex": "node scripts/reskindex.js -h header",
|
||||
"reskindex:watch": "node scripts/reskindex.js -h header -w",
|
||||
"build:init": "mkdir -p lib && npm run emoji-data-strip",
|
||||
"build": "npm run build:init && npm run reskindex && babel src -d lib --source-maps",
|
||||
"build:watch": "npm run build:init && babel src -w -d lib --source-maps",
|
||||
"build": "npm run reskindex && babel src -d lib --source-maps --copy-files",
|
||||
"build:watch": "babel src -w -d lib --source-maps --copy-files",
|
||||
"emoji-data-strip": "node scripts/emoji-data-strip.js",
|
||||
"start": "parallelshell \"npm run build:watch\" \"npm run reskindex:watch\"",
|
||||
"lint": "eslint src/",
|
||||
|
|
|
@ -11,7 +11,8 @@ const output = Object.keys(EMOJI_DATA).map(
|
|||
category: datum.category,
|
||||
emoji_order: datum.emoji_order,
|
||||
};
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
fs.writeFileSync('./lib/stripped-emoji.json', JSON.stringify(output));
|
||||
// Write to a file in src. Changes should be checked in to git
|
||||
fs.writeFileSync('./src/stripped-emoji.json', JSON.stringify(output));
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue