This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
@mediamonks/temple with all
npm packages installed. Try it out:
@mediamonks/temple lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
This is the Richmedia Temple, used for creating richmedia units for various vendors.
See https://assets-at-scale.gitbook.io/temple-suite/ for documentation to getting started.
View the generated documentation.
yarn add @mediamonks/temple
npm i -S @mediamonks/temple
Clone a copy of the repo:
git clone https://github.com/mediamonks/temple.git
Change to the seng-boilerplate directory:
Install dev dependencies:
Use one of the following main scripts:
npm run build # build this project npm run dev # run compilers in watch mode, both for babel and typescript npm run test # run the unit tests incl coverage npm run test:dev # run the unit tests in watch mode npm run lint # run eslint and tslint on this project npm run doc # generate typedoc documentation
When installing this module, it adds a pre-commit hook, that runs lint and prettier commands before committing, so you can be sure that everything checks out.
MIT © MediaMonks
Remove this section when cloning this boilerplate to a real project!
This boilerplate contains the following folders:
src/lib, will be published to npm.
This boilerplate contains the following files:
This project uses Travis to build, test and publish its code to npm. Travis is free for public Github repositories.
It runs on all commits, shows the build status for pull requests, and publishes to npm when a new tag/release is created.
Travis only runs the
npm test script, so have configured that script
to run everything we want Travis to check. Besides the unit tests, we
also run our validations and linters.
The travis configuration is placed in a
.travis.yml file, consisting
of multiple sections.
node_jslanguage, and tells travis on which node versions to run the process.
Because we want to keep the npm api key secret, we add the token to the Travis Repo settings where it will be stored secure: https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings
Before we can do this, we must make sure that the repository is added to Travis, because Travis needs the repository owner/name info to make sure the encrypted values only work for that repository.
Then make sure you are logged in to your npm account with the adduser command:
$ npm adduser
To verify that you are logged in correctly you can check:
$ npm whoami
Now we need to create a new token:
npm token create
Copy the token value from the output to the Travis Environment Variable settings, and
add it with the name