Skip to content

Commit

Permalink
add video-config pacakge
Browse files Browse the repository at this point in the history
  • Loading branch information
becky-gilbert committed Sep 3, 2024
1 parent 224c9df commit ddadbd3
Show file tree
Hide file tree
Showing 7 changed files with 627 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/video-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Video Config

This package contains a jsPsych plugin for presenting a video configuration trial.

## Example

```javascript
const videoConfig = { type: chsVideoConfig };
```
1 change: 1 addition & 0 deletions packages/video-config/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../jest.cjs").makePackageConfig();
38 changes: 38 additions & 0 deletions packages/video-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "@lookit/video-config",
"version": "0.0.1",
"description": "jsPsych plugin for helping the participant set up and test their webcam and microphone in CHS studies.",
"homepage": "https://github.com/lookit/lookit-jspsych#readme",
"bugs": {
"url": "https://github.com/lookit/lookit-jspsych/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/lookit/lookit-jspsych.git"
},
"license": "ISC",
"author": "Becky Gilbert <beckyannegilbert@gmail.com> (https://github.com/becky-gilbert)",
"main": "dist/index.js",
"unpkg": "dist/index.browser.min.js",
"types": "./dist/index.d.ts",
"files": [
"src",
"dist"
],
"scripts": {
"build": "rollup --config",
"dev": "rollup --config rollup.config.dev.mjs --watch",
"test": "jest --coverage"
},
"dependencies": {
"@lookit/data": "^0.0.1",
"@lookit/record": "^0.0.1"
},
"devDependencies": {
"@jspsych/config": "^2.0.2",
"rollup-plugin-dotenv": "^0.5.1"
},
"peerDependencies": {
"jspsych": "^8.0.2"
}
}
4 changes: 4 additions & 0 deletions packages/video-config/rollup.config.dev.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { makeDevConfig } from "../../rollup-dev.mjs";
import rollupConfig from "./rollup.config.mjs";
const port = 10005; // this needs to change for each package
export default makeDevConfig(rollupConfig, port);
13 changes: 13 additions & 0 deletions packages/video-config/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { nodeResolve } from "@rollup/plugin-node-resolve";
import { makeRollupConfig } from "../../rollup.mjs";

export default makeRollupConfig("chsVideoConfig").map((config) => {
return {
...config,
plugins: [
// Resolve node dependencies to be used in a browser.
nodeResolve({ browser: true, preferBuiltins: false }),
...config.plugins,
],
};
});
Loading

0 comments on commit ddadbd3

Please sign in to comment.