parent
3ed6b746bc
commit
e8dc29bfaa
|
@ -1,4 +1,3 @@
|
|||
node_modules/
|
||||
data/data.js
|
||||
dist/
|
||||
bundle.js
|
||||
|
|
|
@ -61,11 +61,10 @@
|
|||
"webpack": "^3.6.0"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf data/data.js dist/",
|
||||
"clean:dist": "rm -rf dist/",
|
||||
"clean": "rm -rf dist/",
|
||||
"build:data": "node scripts/build-data",
|
||||
"build:dist": "npm run clean:dist && babel src --out-dir dist --copy-files --ignore webpack.config.js",
|
||||
"build": "npm run build:data && npm run build:dist",
|
||||
"build:dist": "npm run clean && babel src --out-dir dist --copy-files --ignore webpack.config.js",
|
||||
"build": "npm run build:dist && npm run build:data",
|
||||
"watch": "babel src --watch --out-dir dist --copy-files --ignore webpack.config.js",
|
||||
"start": "npm run storybook",
|
||||
"stats": "webpack --config ./src/webpack.config.js --json > stats.json",
|
||||
|
|
|
@ -136,11 +136,7 @@ emojiData.forEach((datum) => {
|
|||
var flags = data.categories[categoriesIndex['Flags']]
|
||||
flags.emojis.sort()
|
||||
|
||||
mkdirp('data', (err) => {
|
||||
const stringified = JSON.stringify(data).replace(/\"([A-Za-z_]+)\":/g, '$1:')
|
||||
fs.writeFile('dist/data/data.js', `module.exports = ${stringified}`, (err) => {
|
||||
if (err) throw err
|
||||
|
||||
const stringified = JSON.stringify(data).replace(/\"([A-Za-z_]+)\":/g, '$1:')
|
||||
fs.writeFile('data/data.js', `module.exports = ${stringified}`, (err) => {
|
||||
if (err) throw err
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import data from '../../data'
|
||||
import data from '../data'
|
||||
|
||||
import { getData, getSanitizedData, unifiedToNative } from '../utils'
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import '../vendor/raf-polyfill'
|
|||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import measureScrollbar from 'measure-scrollbar'
|
||||
import data from '../../data'
|
||||
import data from '../data'
|
||||
|
||||
import store from '../utils/store'
|
||||
import frequently from '../utils/frequently'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var buildSearch = require('../src/utils/build-search')
|
||||
var data = require('./data')
|
||||
import buildSearch from '../utils/build-search'
|
||||
import data from './data'
|
||||
|
||||
function uncompress (list) {
|
||||
for (var short_name in list) {
|
||||
|
@ -29,4 +29,4 @@ function uncompress (list) {
|
|||
uncompress(data.emojis)
|
||||
uncompress(data.skins)
|
||||
|
||||
module.exports = data
|
||||
export default data
|
|
@ -1,4 +1,4 @@
|
|||
import data from '../../data'
|
||||
import data from '../data'
|
||||
import { getData, getSanitizedData, uniq } from '.'
|
||||
|
||||
var index = {}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import buildSearch from './build-search'
|
||||
import data from '../../data'
|
||||
import data from '../data'
|
||||
import stringFromCodePoint from '../polyfills/stringFromCodePoint'
|
||||
|
||||
const _JSON = JSON
|
||||
|
|
Loading…
Reference in New Issue