@futurae-public-js/blitz-js
v1.3.0
Published
Blitz JavaScript Library
Readme
BlitzJS
Javascript library used client-side for BlitzJS.
Building blitz.min.js
To build the minified version of the module and deploy it we are using webpack. In the root folder of this repository you will find:
package.json, includes all necessary npm scripts and packageswebpack.config.js, includes all necessary configuration options and plugins to build a javascript bundle
To install all necessary packages you need to run:
yarnTo build blitz.min.js for development environment with watch mode enabled simply run:
yarn devTo build a production bundle run:
yarn buildThe created bundle across all environments is placed under dist/blitz.min.js
Test locally
- Create a bundle with
yarn build - Run a server with
npx serve - Open url
http://localhost:5000in the browser - Have fun in the dummy website and check the devtools to check the emitted packages 🤓
Environments
So far we have prepared a basic setup for development and production environments. The environmental variables for each of those are stored in .env-cmdrc.json file in the root folder.
In case we need to add another setup let's say for staging env, we need to add another key with the appropriate variables in .env-cmdrc.json and then create a bundle by running:
yarn env-cmd -e staging webpackPublish
When you are done with development you can follow the steps below:
- Enter
yarn versionand hit enter - Please add the new version you want to release - like
1.1.2- and hit enter - Then run
git push --follow-tags origin masterto push the change mage tomasterbranch alongside with the new tag - Finally, run
yarn publishto publish the new package version
Enable Debug
In the browser console, run:
debug('blitz:*')Dependabot configuration
https://dependabot-gitlab.gitlab.io/dependabot/guide/
Environmental Variables (settings > CI/CD > Variables)
- SETTINGS__GITHUB_ACCESS_TOKEN
- SETTINGS__GITLAB_ACCESS_TOKEN
- SETTINGS__GITLAB_URL
- SETTINGS__CONFIG_BRANCH (optional - master is the default)
