Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-143888

Reduce the number of dependencies in the package.json of the form-field Blade template

    Details

      Description

      Forms Team provides to external developers an extension point which allows the deploy of custom form fields into Forms. In order to facilitate the creation of custom form fields, the team also provides the following ready to use templates:

      Per BChan's request, we need to reduce the number of dependencies listed in the package.json of these templates. The goal is decrease the side effects caused by changes in these dependencies which are used by portal and consumed by the templates mentioned above. Basically, we're trying to change the following package.json:

      {
          "dependencies": {},
          "devDependencies": {
              "@babel/cli": "^7.2.3",
              "@babel/core": "^7.6.0",
              "@babel/plugin-proposal-class-properties": "^7.5.5",
              "@babel/plugin-proposal-object-rest-spread": "^7.5.5",
              "@babel/preset-env": "^7.4.2",
              "@babel/preset-react": "^7.10.4",
              "babel-loader": "8.0.6",
              "liferay-npm-bundler": "2.16.1",
              "liferay-npm-bundler-preset-liferay-dev": "^2.0.0"
          },
          "main": "./",
          "name": "dynamic-data-mapping-form-field-type-slider",
          "scripts": {
            "build": "npm run build-js && liferay-npm-bundler",
            "build-js": "babel --source-maps -d build/resources/main/META-INF/resources src/main/resources/META-INF/resources"
          },
          "version": "1.0.0"
      }

      To a file like this:

      {
      	"dependencies": {},
      	"devDependencies": {
      		"@liferay/portal-7.3": "*"
      	},
      	"main": "./",
      	"name": "dynamic-data-react-custom-form-field-test-form-field",
      	"scripts": {
      		"build": " npm run build-js && liferay-npm-bundler",
      		"build-js": "babel --source-maps -d build/resources/main/META-INF/resources src/main/resources/META-INF/resources"
      	},
      	"version": "1.0.0"
      }

      This task is necessary because Forms Team goal is add this optimized version of the package.json to the official documentation which teaches how to create custom form fields.

      The optimized package.json should be added to the following places:

      1. https://github.com/natocesarrego/slider/
      2. https://github.com/marcosapmf/slider
      3. Blade form-field template

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              renato.rego Renato Rêgo
              Reporter:
              renato.rego Renato Rêgo
              Engineering Assignee:
              Renato Rêgo
              Recent user:
              Rafaela Nascimento
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  7.4.3.7 CE GA7
                  7.4.13 DXP U3
                  Master