Include stories/ in prettier script

release
Etienne Lemay 2020-03-16 11:14:08 -04:00
parent b8fad36c6d
commit 22ffd5b85e
No known key found for this signature in database
GPG Key ID: EE7CF89146BB28E9
2 changed files with 15 additions and 17 deletions

View File

@ -77,8 +77,8 @@
"prepublishOnly": "npm run build", "prepublishOnly": "npm run build",
"storybook": "start-storybook -p 6006", "storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook", "build-storybook": "build-storybook",
"prettier": "prettier --write \"{src,scripts,test}/**/*.js\"", "prettier": "prettier --write \"{src,scripts,test,stories}/**/*.js\"",
"prettier:check": "prettier --check \"{src,scripts,test}/**/*.js\"", "prettier:check": "prettier --check \"{src,scripts,test,stories}/**/*.js\"",
"prepare": "npm run build:dist" "prepare": "npm run build:dist"
}, },
"size-limit": [ "size-limit": [

View File

@ -11,7 +11,13 @@ import {
color, color,
} from '@storybook/addon-knobs' } from '@storybook/addon-knobs'
import { Picker, Emoji, emojiIndex, NimbleEmojiIndex, getEmojiDataFromNative } from '../dist' import {
Picker,
Emoji,
emojiIndex,
NimbleEmojiIndex,
getEmojiDataFromNative,
} from '../dist'
import data from '../data/all.json' import data from '../data/all.json'
import '../css/emoji-mart.css' import '../css/emoji-mart.css'
@ -31,9 +37,9 @@ const CUSTOM_EMOJIS = [
}, },
] ]
const CUSTOM_EMOJIS_WITH_CATEGORIES = CUSTOM_EMOJIS.map(emoji => { const CUSTOM_EMOJIS_WITH_CATEGORIES = CUSTOM_EMOJIS.map((emoji) => {
return Object.assign({}, emoji, { return Object.assign({}, emoji, {
customCategory: emoji.name === 'Squirrel' ? 'Mammals' : 'Mollusks' customCategory: emoji.name === 'Squirrel' ? 'Mammals' : 'Mollusks',
}) })
}) })
@ -70,9 +76,7 @@ storiesOf('Picker', module)
)) ))
.add('Custom categories', () => ( .add('Custom categories', () => (
<Picker <Picker custom={CUSTOM_EMOJIS_WITH_CATEGORIES} />
custom={CUSTOM_EMOJIS_WITH_CATEGORIES}
/>
)) ))
.add('Custom category icons', () => ( .add('Custom category icons', () => (
@ -274,14 +278,10 @@ storiesOf('Get emoji data from Native', module)
const emojiData = getEmojiDataFromNative( const emojiData = getEmojiDataFromNative(
text('Unicode', '🏋🏿‍♂️'), text('Unicode', '🏋🏿‍♂️'),
select('Emoji pack', SETS, SETS[0]), select('Emoji pack', SETS, SETS[0]),
data data,
) )
if (!emojiData) { if (!emojiData) {
return ( return <div>Couldn`t find any emoji data from native...</div>
<div>
Couldn`t find any emoji data from native...
</div>
)
} }
return ( return (
@ -293,9 +293,7 @@ storiesOf('Get emoji data from Native', module)
size={48} size={48}
/> />
<pre> <pre>emojiData: {JSON.stringify(emojiData, null, 2)}</pre>
emojiData: {JSON.stringify(emojiData, null, 2)}
</pre>
</div> </div>
) )
}) })