Coder Social home page Coder Social logo

Comments (2)

phorward avatar phorward commented on August 23, 2024

Hello @Grashalmbeisser, project.json is already part of viur-base since a while.

For better understanding, here's an annotated version of the current project.json in viur-base, and also an annotation what would be nice to viur-cli.

{
    // On this level are profiles.
    // "default" is a profile, which is inherited by "develop" and "live" and can be customized for particular versions and/or GAE projects. Therefore, every profile can contain all keys from the "default" profile.
    "default": {
        "admin": "4.0.8",  // this is the admin-version *1
        "builds": {  // Here are steps for building for the `viur build` command
            "admin": {
                "command": "viur install admin 4.0.8",
                "kind": "exec"
            },
            "npm": {
                "command": "build",
                "kind": "npm",
                "source": ""
            }
        },
        "core": "3.5.1",  // this is the core-version *1
        "distribution_folder": "./deploy",  // The deploy folder, which is uploaded to GAE
        "format": "1.1.1",  // The file format of the project.json *2
        "pyodide": "0.19.1",  // THe pyodide version *1
        "sources_folder": "./sources",  // deprecated! The source folder for apps; This should be mainted by "builds" individually for every app, and removed from here
        "vi": "not-in-use",  // deprecated! *2
    },
    "develop": {  // "develop" is currently sometimes hard-coded in viur-cli *3
        "application_name": "my-dev-app-viur3",  // The name of the GAE project *4
        "version": "dev-$(user)"  // The version string; Variables can be used here.
    },
    "live": {
        "application_name": "my-live-app-viur3",
        "version": "live-$(year)-$(month)-$(day)-$(hour)-$(minute)-$(second)"
    }
}

Please see my annotations:

  • *1) Currently, core, admin, vi and pyodide only indicates the version that was installed by the user. But it should define the version to be installed for the project, and should also be maintained by viur-cli:
    • core will set the pipenv's viur-core-version to the provided version, optimally via e.g. viur install core 3.5.1
    • admin should install the specified admin version using e.g. viur install admin 4.0.8
    • vi should install the specified vi version using e.g. viur install vi 3.0.38
    • pyodide should install the specified pyodide version using e.g. viur install pyodide 0.24.0
    • Calling viur install should install all specified modules in a specific version
    • Calling viur install --update should update all installed modules to a specific version
  • *2) The format setting should not be part of the default-profil. It should be on top.
  • *3) "develop" should not be a hard-coded name. In case no profile is specified, "default" shall be used.
  • *4) This should be defaultly set in the default-profile

This is what an optimal project.json should look like, which only installs core and admin. Because no pyodide and no vi is providet, it is ignored. core setting should be mandatory!

{
    "format": "2.0.0",
    "default": {
        "admin": "4.0.8",
        "core": "3.5.1",
        "distribution_folder": "./deploy",
        "application_name": "my-live-app-viur3",
        "version": "live-$(year)-$(month)-$(day)-$(hour)-$(minute)-$(second)"
    },
    "develop": {
        "application_name": "my-dev-app-viur3",
    },
}

I hope this clarifies things a bit. Feed free to move it into an issue in viur-cli as well.

from viur-base.

sveneberth avatar sveneberth commented on August 23, 2024

I no longer see any need for action regarding this ticket.

If I am wrong, please just open the ticket again.

from viur-base.

Related Issues (18)

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.