Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This setup is based on the usage of stripes-cli and the concept of workspaces which are available in yarn:

  1. Make sure yarn and npm are configured to the folio packages:

    Code Block
    yarn config set @folio:registry https://repository.folio.org/repository/npm-folioci/
    
    npm config set @folio:registry https://repository.folio.org/repository/npm-folioci/


  2. Install stripes-cli globally:

    Code Block
    yarn global add @folio/stripes-cli


  3. Create a new workspace (chose modules you want to have locally and make developing on them). Make sure to choose stripes-sample-platform, where the configuration of modules should be done. 

    Code Block
    stripes workspace

    Pick the bare minimum modules below or custom ones

    - stripes-sample-platform
    - ui-users

    The above will create I directory.

  4. Navigate to stripes/stripes-sample-platform. Make sure to rename .stripesclirc.example to .stripesclirc or just create new .stripesclirc file and make sure it contains the following:

    Code Block
    {
      "okapi": "http://localhost:9130",
      "tenant": "diku",
      "configFile": "stripes.config.js",
      "port": 8080
    }


    Also, make sure the package.json has the following set of devDependenciesdependencies. Make sure that to keep dependencies are up to date with what is run on folio environments like folio-testing.

    Code Block
      "dependencies": {
        "@folio/stripes": "^2.7.3",
        "react": "~16.6.0",
        "react-dom": "~16.6.0",
        "react-redux": "~5.1.1",
        "react-router-dom": "^5.0.1",
        "redux": "~3.7.2"
      }


  5. Now it is possible to run the platform from stripes/stripes-sample-platform folder with the command below. Make sure okapi (okapi property above) backend is up. It could be a local environment or one of the remote environments.

    Code Block
    stripes serve // when server runs locally
    stripes serve --okapi <okapiURL> // when server is not locally set up 


  6. At this moment the UI development server is up and can be accessible on https://localhost:8080. Credentials: *diku_admin/admin*

...