Add package.json to common directory, and lodash dependency
This commit is contained in:
parent
7e15c2870b
commit
b95f258763
13
common/.gitignore
vendored
Normal file
13
common/.gitignore
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Compiled JavaScript files
|
||||
lib/**/*.js
|
||||
lib/**/*.js.map
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
||||
# Node.js dependency directory
|
||||
node_modules/
|
||||
|
||||
package-lock.json
|
||||
ui-debug.log
|
||||
firebase-debug.log
|
11
common/package.json
Normal file
11
common/package.json
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "mantic-common",
|
||||
"private": true,
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"lodash": "4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/lodash": "4.14.178"
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
import _ from 'lodash'
|
||||
import { Contract } from '../../../common/contract'
|
||||
import { getPayouts } from '../../../common/payouts'
|
||||
import { Bet } from './bets'
|
||||
import { Contract } from './contract'
|
||||
import { getPayouts } from './payouts'
|
||||
import { Bet } from '../web/lib/firebase/bets'
|
||||
|
||||
export function scoreCreators(contracts: Contract[], bets: Bet[][]) {
|
||||
const creatorScore = _.mapValues(
|
13
common/yarn.lock
Normal file
13
common/yarn.lock
Normal file
|
@ -0,0 +1,13 @@
|
|||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@types/lodash@4.14.178":
|
||||
version "4.14.178"
|
||||
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.178.tgz#341f6d2247db528d4a13ddbb374bcdc80406f4f8"
|
||||
integrity sha512-0d5Wd09ItQWH1qFbEyQ7oTQ3GZrMfth5JkbN3EvTKLXcHLRDSXeLnlvlOn0wvxVIwK5o2M8JzP/OWz7T3NRsbw==
|
||||
|
||||
lodash@4.17.21:
|
||||
version "4.17.21"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
||||
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
|
@ -26,7 +26,7 @@ import { SearchableGrid } from '../../../components/contracts-list'
|
|||
import { useQueryAndSortParams } from '../../../hooks/use-sort-and-query-params'
|
||||
import { useRouter } from 'next/router'
|
||||
import clsx from 'clsx'
|
||||
import { scoreCreators, scoreTraders } from '../../../lib/firebase/scoring'
|
||||
import { scoreCreators, scoreTraders } from '../../../../common/scoring'
|
||||
import { Leaderboard } from '../../../components/leaderboard'
|
||||
import { formatMoney, toCamelCase } from '../../../../common/util/format'
|
||||
import { EditFoldButton } from '../../../components/edit-fold-button'
|
||||
|
|
Loading…
Reference in New Issue
Block a user