diff options
-rw-r--r-- | .gitignore | 126 | ||||
-rw-r--r-- | test/js/dune | 9 | ||||
-rw-r--r-- | test/js/package-lock.json | 21 | ||||
-rw-r--r-- | test/js/package.json | 5 | ||||
-rw-r--r-- | test/js/polyfill.js | 1 |
5 files changed, 161 insertions, 1 deletions
@@ -1,3 +1,4 @@ +## OCaml *.annot *.cmo *.cma @@ -27,3 +28,128 @@ setup.log # Local OPAM switch _opam/ + +## NodeJS +# Logs +logs +*.log +npm-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# vitepress build output +**/.vitepress/dist + +# vitepress cache directory +**/.vitepress/cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test
\ No newline at end of file diff --git a/test/js/dune b/test/js/dune index d919a1e..83a2e60 100644 --- a/test/js/dune +++ b/test/js/dune @@ -2,4 +2,11 @@ (name websockets_hello) (libraries portal_ws lwt js_of_ocaml) (modes js) - (preprocess (pps js_of_ocaml-ppx))) + (preprocess (pps js_of_ocaml-ppx)) + (js_of_ocaml + (javascript_files polyfill.js))) + +(rule + (alias npm) + (deps package.json package-lock.json) + (action (system "npm ci"))) diff --git a/test/js/package-lock.json b/test/js/package-lock.json new file mode 100644 index 0000000..8b5d148 --- /dev/null +++ b/test/js/package-lock.json @@ -0,0 +1,21 @@ +{ + "name": "js", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "xmlhttprequest": "^1.8.0" + } + }, + "node_modules/xmlhttprequest": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", + "integrity": "sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + } + } +} diff --git a/test/js/package.json b/test/js/package.json new file mode 100644 index 0000000..3b36bf4 --- /dev/null +++ b/test/js/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "xmlhttprequest": "^1.8.0" + } +} diff --git a/test/js/polyfill.js b/test/js/polyfill.js new file mode 100644 index 0000000..e394ec8 --- /dev/null +++ b/test/js/polyfill.js @@ -0,0 +1 @@ +global.XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; |