2. Configure your Mojito container's npm build script
Settings for the build script are managed inside the config.js
located in the repository root directory. Four parameters are currently supported and it affects where you publish the container to:
module.exports = {
containerName: "containerfilename",
s3BucketDev: "mojito-example/jsdev",
s3BucketPRD: "mojito-example/js",
s3Region: "ap-southeast-2"
};
containerName
: The file name given to your container - e.g. "google"s3BucketDev
: The path in S3 that contains your development containers3BucketPRD
: The path in S3, where your production container is hosted withins3Region
: The AWS region your S3 bucket is located in
These values can affect the URI of your container:
<script type="text/javascript" src="//{{cloudfront-cname}}.cloudfront.net/{{environment}}/{{containerName}}.js"></script>