lens -> assoc
This commit is contained in:
parent
ea59080a5d
commit
486f8a070a
2 changed files with 4 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
||||||
import npath from 'node:path'
|
import npath from 'node:path'
|
||||||
import { assoc, concat, curry, curryN, lens, merge, pipe, prop, set, view } from 'rambda'
|
import { assoc, concat, curry, curryN, merge, pipe, prop } from 'rambda'
|
||||||
import { map, get as getMap } from './project.js'
|
import { map, get as getMap } from './project.js'
|
||||||
import { get as getLinker } from './linker.js'
|
import { get as getLinker } from './linker.js'
|
||||||
import { Cargo } from './cargo.js'
|
import { Cargo } from './cargo.js'
|
||||||
|
@ -7,11 +7,6 @@ import { Crate } from './crates.js'
|
||||||
|
|
||||||
const optLevel = value => ({ 'opt-level': value })
|
const optLevel = value => ({ 'opt-level': value })
|
||||||
|
|
||||||
//const assoc = curry((key, value, obj) => {
|
|
||||||
// const l = lens(prop(key), assoc(key))
|
|
||||||
// return set(l, value, obj)
|
|
||||||
//})
|
|
||||||
|
|
||||||
export const Bevy = Object.freeze({
|
export const Bevy = Object.freeze({
|
||||||
active: () => true,
|
active: () => true,
|
||||||
apply: curry(({ 'bevy-version': bevy }, project) =>
|
apply: curry(({ 'bevy-version': bevy }, project) =>
|
||||||
|
|
|
@ -4,8 +4,8 @@ import path from 'node:path'
|
||||||
import { parse, stringify } from 'smol-toml'
|
import { parse, stringify } from 'smol-toml'
|
||||||
import { reduce } from 'rambda'
|
import { reduce } from 'rambda'
|
||||||
import * as Project from './project.js'
|
import * as Project from './project.js'
|
||||||
import { Cargo } from './cargo.js'
|
|
||||||
import * as Configurations from './config.js'
|
import * as Configurations from './config.js'
|
||||||
|
import { Cargo } from './cargo.js'
|
||||||
import { Crate } from './crates.js'
|
import { Crate } from './crates.js'
|
||||||
|
|
||||||
const help = () => `Usage:
|
const help = () => `Usage:
|
||||||
|
@ -52,6 +52,8 @@ const defaultBevyVersion = () =>
|
||||||
|
|
||||||
const defaultLinker = () => process.platform === 'darwin' ? undefined : 'lld'
|
const defaultLinker = () => process.platform === 'darwin' ? undefined : 'lld'
|
||||||
|
|
||||||
|
// change this so that all flags become false when one boolean flag is passed
|
||||||
|
// bevy-cli -n means that only nightly is enabled
|
||||||
const schema = Object.freeze({
|
const schema = Object.freeze({
|
||||||
string: ['bevy-version', 'linker'],
|
string: ['bevy-version', 'linker'],
|
||||||
boolean: ['devopt', 'relopt', 'dynlink', 'nightly', 'cranelift', 'genshare', 'parallel', 'version'],
|
boolean: ['devopt', 'relopt', 'dynlink', 'nightly', 'cranelift', 'genshare', 'parallel', 'version'],
|
||||||
|
|
Loading…
Reference in a new issue