diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4e3f3ac --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +lib/ +node_modules/ + diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..f053ebf --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/README.md b/README.md new file mode 100644 index 0000000..a3ebcec --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# @clipisode/theme + +This is an NPM module that can be used by theme implementations to gain common functionality and type checking. \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..fddb292 --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "name": "@clipisode/theme", + "main": "lib/index.js", + "version": "0.0.1", + "author": { + "name": "Max Schmeling", + "email": "max@clipisode.com" + }, + "license": "MIT", + "scripts": { + "build": "tsc" + }, + "dependencies": {}, + "devDependencies": { + "prettier": "^2.2.1", + "typescript": "^4.2.3" + } +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..34c3ea9 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,9 @@ +export type VideoComposition = { + videos: Array<{ type: "clip"; clipId: string }>; +}; +export type GetVideoCompositionFn = () => VideoComposition; + +export type InvitationPreviewGeneratorFn = (opts: object) => void; + +export type CustomDataDescriptor = { key: string }; +export type GetCustomDataDescriptorsFn = () => CustomDataDescriptor[]; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..e33394f --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "ES2019", + "lib": ["es2015", "es2016", "es2017", "esnext"], + "module": "CommonJS", + "declaration": true, + "outDir": "./lib", + "strict": true, + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules", "**/__tests__/*"] +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..0101eb3 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,13 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +prettier@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" + integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== + +typescript@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.3.tgz#39062d8019912d43726298f09493d598048c1ce3" + integrity sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==