Giter Site home page Giter Site logo

Comments (5)

coulson84 avatar coulson84 commented on August 17, 2024 1

I understand that but the <custom host domain> will change according to the stage we are building - for development it is one thing, testing it is different and so on. Is there a way to have the <custom host domain> value, in the args array, change according to values passed in from the command line?

from mbt.

coulson84 avatar coulson84 commented on August 17, 2024 1

Yeah - this is the approach I thought I would have to take (but hoped I could avoid). Thanks for the response. Would like to offer my help developing this as a feature but don't have much free time at the moment 😞

from mbt.

buddhike avatar buddhike commented on August 17, 2024

Custom arguments are specified in .mbt.yml. In this instance (assuming this is your build command in linux), you could do something like:

build:
  linux:
    cmd: npm
    args: ['run', 'dev:eap', '--', '--DEV_API', <custom host domain>]

hth

from mbt.

buddhike avatar buddhike commented on August 17, 2024

Schema of .mbt.yml is documented here:
https://mbtproject.github.io/mbt/#synopsis

from mbt.

buddhike avatar buddhike commented on August 17, 2024

Sorry I misunderstood your question 😊.

Currently this is supported via environment variables. To achieve this, you would need a script like this:

#!/bin/sh

set -e
npm run dev:eap -- --DEV_API $DEV_API

Then you configure that as your command in .mbt.yml and at the point you invoke build, you do so with the correct environment values.

DEV_API="https://dev-api/" mbt build

As a side note, it would be really nice to have a feature to expand arguments to a command with environment variables so that you would not have to write the wrapper script 😉

from mbt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.