Details

      Description

      Right now backend project have several ways of reducing the dependencies (both dependencies and version numbers) and plugins needed to set up a new project. 

      One way is using the new Fat Jar feature combined with Target Platforms. This allows them to specify all liferay dependencies with just one line, like:

      compileOnly group: "com.liferay.portal", name: "release.portal.api"

      For devDependencies, they also add all gradle plugins by applying them with one combined plugin

      The goal is achieving something similar: simplifying the way of setting dependencies (and ideally devDependencies too) for external developers.

      There are several ways we can achieve, either faking it with the bundler or really adding all the dependencies but the idea is to do it in the simpler way for us.

      The PR that caused this conversation is this one and Greg proposed a PoC after it.

      This feature has customers and global services in mind, it should not be designed to be used internally.

      Test Scenarios:

      Requirement Test Scenarios Covered by frontend/backend Unit Test? Test Priority (business impact)  Chrome
      Pass/Fail
      cli tool is intended for non-ootb portal projects. Meaning js projects created from cli/scratch/workspace/template/etc Given `@liferay/cli` is used via npx
      When run `npx liferay new my-react-project-test`
      Then a module is created with all necessary js dependencies for the given target platform (ie: *-7.4-GA1)
      no 5-critical  
        Given `@liferay/cli` is used via npx
      When run `liferay new my-react-project-test`
      And When input an invalid platform (ie: *-7.3-GA1)
      Then error message is given and module is not created
      no 4-major  
      allow developers to only have a single dependency for their JS project and scope it to a single release of dxp Given a sample-project index.js/App.js referencing several known dependencies
      And Given package.json file under dependency only lists "@liferay/portal-7.4-ga1": "^1.0.0"
      And Given package.json contains a build script with `liferay build`
      When run `npm build`
      Then the project is built with all known 7.4 GA1 js dependencies listed in the package.json file
      And Then only the minimum necessary dependencies are defined by Liferay AMDLoader
      no 5-critical  

       

      Exploratory testing to consider:

      Test Scenarios Covered by frontend/backend Unit Test? Test Priority (business impact)  Pass/Fail
      Exploratory: explore any other command options with the cli tool `liferay new *` no 3-medium  

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              javier.gamarra Javier Gamarra
              Recent user:
              Ivan Zaera
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  Packages

                  Version Package