@pixieset/versioning-js v1.0.7
Pixieset Laravel versioning
This library is meant to augment the Laravel versioning approach created for Studio Manager. This repository contains the front-end code for this project, and should be installed in conjunction with the backend work.
The frontend part contains helpers that can be used to manage the versioning of resources in a frontend application, specifically, the handling of when there are version inconsistencies.
Contents
Installation
Prerequisites:
Currently, this project only supports Axios and Laravel. You must also have a working Sentry integration in your front-end code already, and you must have installed the backend version checking code.
Installation:
The built front-end distribution code for this project is currently publicly available on packagist. Update your package.json
file to include the following:
{
"dependencies": {
"@pixieset/versioning-js": "^1.0"
}
}
Then run yarn install
to install the package.
Usage
For information on versioning usage, see the Pixieset internal documentation.
Bundle development
This section is for developers who want to make changes to the bundle. It is assumed that you have a Laravel application that you are using to test the changes.
This package uses a Makefile to assist in building the package. See that file for the commands available, or run make help
to see a list of available commands in that subfolder.
Prerequisites
To build the frontend package, you will need to have the following installed:
- nodejs, version 18 or higher, with yarn globally.
- Follow the directions here, as well, if you intend to commit.
Installation
To make the frontend available locally, you can use the following steps:
- Clone this repository into the
packages
directory of your Laravel application (if you haven't alresady done so). - In the
js-versioning
portion of the package, invokeyarn link
. This will make the package available for local linking and modification. - In your service provider where you are using the package (e.g. Studio Manager), invoke
yarn link [name of this package]
. That will causeyarn
to symlink the two, so you can make changes locally, and see them every time you runmake build
. - Run your local service provider front end
*-watch
task, to start hot-rebuilding your code based on file changes. - When done, run
yarn unlink [name of this package]
within the service provider, to stop using linked code. Commit and tag your changes.
Building
The frontend package contains build artifacts in the dist
subfolder, which are compiled typescript files. These files are what you should be importing into your Vue components. Any changes you make to the typescript files in the src
directory should be compiled into the dist
directory when you run make build
.
Pushing changes
This project uses the yarn version tooling to publish changes. You should have set up your local environment as specified in the prerequisites.
Once you've committed your changes, identify the next semver that is applicable, and use yarn version
as per the yarn documentation to create and publish a new front-end version.
Footnotes
- For more information on the technical proposal, see here.