Skip to content
PubPub: Open publishing
JavaScript CSS Other
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.githooks
.github/ISSUE_TEMPLATE
.jest
.storybook
client
server
shared
static
stories
stubstub
tools
workers
.babelrc
.eslintignore
.eslintrc
.gitignore
.prettierignore
.prettierrc
Aptfile
LICENSE
Procfile
README.md
STYLEGUIDE.md
app.json
hotReloadServer.js
init.js
package-lock.json
package.json

README.md

PubPub

Collaborative Community Publishing

To Install

npm install

To Run Dev Mode

npm start

Navigate to localhost:9876

Storybook

To build and test components, we use Storybook. To run:

npm run storybook

Navigate to localhost:9001

To Build and Run Production Version

npm run prod

Navigate to localhost:9876

Pandoc

Latex

The Latex Buildpack we are using allows a texlive.packages file in the root directory to specify additional packages to be installed. List of available packages (I think... documentation on packages is a bit tough to find). Can be useful for understanding what's in collections. Not sure why it's so hard to find official documentation on texlive packages available.

Code Practices

Containers vs Components

The client side code of PubPub does follow a Container/Component split as is common in React-based sites. The structure and difference between the two in this repo is not exactly as described in the preceeding article. For this repo, the following describes how containers and components are differentiated:

Containers

  • Associated with a specific URL route
  • One a single container is used on a given URL route
  • Calls hydrateWrapper() to initialize React bindings after using server-side renered HTML for immediate display.
  • Holds the ground truth data for a given view. Often the ground truth data is passed into containers as props through hydrateWrapper(), but in cases where the ground truth data is being changed, the container will hold ground truth data in it's state.

Components

  • All other non-container components :)
  • Many components are used within a given URL route
  • Can store it's own state if needed for UX functionality - but should always update the ground truth data held in its parent container.
  • Can make it's own API requests when the functionality and layout of the pertaining request is contained within the single component. Though if this request influences the ground truth data, the component should be passed an updating function that allows it to update the ground truth data held in the container.

Commits

Preferred practice is to prefix commits with one of the following categories:

  • fix: for commits focused on specific bug fixes
  • feature: for commits that introduce a new feature
  • update: for commits that improve an existing feature
  • dev: for commits that focus solely on documentation, refactoring code, or developer experience updates

Supporting Services

Thank you to these groups for providing their tools for free to PubPub's open source mission.

Browserstack-logo@2x

Code of Conduct

Contributor Covenant

You can’t perform that action at this time.