EdgeWorkers template with Jest and Rollup.
- Install Akamai CLI
- Install EdgeWorkers command
Modify following fields.
field name | description | example |
---|---|---|
ewid | EdgeWorker ID. Replace with newly created one. | 79619 |
section | Section name of credentials in .edgerc | "default" |
propertyhostname | Property Hostname which executes EdgeWorkers. Use this to generate debug token. | "www.example.com" |
If you have not installed yarn
, install first.
npm install --global yarn
Install all JavaScript dependencies listed in the package.json.
yarn install
yarn test
Creates dist/bundle.tgz
.
bundle.json
is created/updated automatically using version
and description
fields in package.json
.
yarn build
Uploads dist/bundle.tgz
to Akamai.
yarn upload
Note: You need to activate the code bundle to production network manually.
This is to prevent operational mistakes.
yarn push-staging
Please make sure that the propertyhostname
field in package.json
is updated appropriately.
yarn token
You don't have to type exact parameters manually each time :)
command | description |
---|---|
yarn deploy |
Run build, upload, push-staging and push-progress sequentially. |
yarn test |
Run unit test and show test coverage |
yarn ew-versions |
show uploaded code bundle versions |
yarn set-version |
show current version and set new version number |
yarn build |
Create code bundle in dist directory |
yarn upload |
Upload code bundle in dist directory |
yarn push-staging |
Activate code bundle to staging network |
yarn push-progress |
Open ACC which displays activation progress |