From ed3ddb471aa69b014d42a9d100fd0d4e1eb4fe13 Mon Sep 17 00:00:00 2001 From: Christian Lara <87323279+ChristianRL23@users.noreply.github.com> Date: Wed, 11 Oct 2023 16:15:10 -0600 Subject: [PATCH] feat: Add first version of the boilerplate (#1615) * Add first version of the boilerplate * Modify boilerplate based on comments from unjust * Change app.js to index.js and use the simple structure for Example component * Create structure of Example component --- projects/03-dataverse-chat/.babelrc | 3 ++ projects/03-dataverse-chat/.editorconfig | 8 +++++ projects/03-dataverse-chat/.eslintrc | 22 ++++++++++++ projects/03-dataverse-chat/.gitignore | 6 ++++ projects/03-dataverse-chat/README.md | 0 projects/03-dataverse-chat/package.json | 34 +++++++++++++++++++ projects/03-dataverse-chat/src/index.html | 12 +++++++ projects/03-dataverse-chat/src/index.js | 19 +++++++++++ .../03-dataverse-chat/src/views/Example.js | 5 +++ 9 files changed, 109 insertions(+) create mode 100644 projects/03-dataverse-chat/.babelrc create mode 100644 projects/03-dataverse-chat/.editorconfig create mode 100644 projects/03-dataverse-chat/.eslintrc create mode 100644 projects/03-dataverse-chat/.gitignore create mode 100644 projects/03-dataverse-chat/README.md create mode 100644 projects/03-dataverse-chat/package.json create mode 100644 projects/03-dataverse-chat/src/index.html create mode 100644 projects/03-dataverse-chat/src/index.js create mode 100644 projects/03-dataverse-chat/src/views/Example.js diff --git a/projects/03-dataverse-chat/.babelrc b/projects/03-dataverse-chat/.babelrc new file mode 100644 index 000000000..b5b713292 --- /dev/null +++ b/projects/03-dataverse-chat/.babelrc @@ -0,0 +1,3 @@ +{ + "plugins": ["@babel/plugin-transform-modules-commonjs"] +} \ No newline at end of file diff --git a/projects/03-dataverse-chat/.editorconfig b/projects/03-dataverse-chat/.editorconfig new file mode 100644 index 000000000..3274ec36d --- /dev/null +++ b/projects/03-dataverse-chat/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/projects/03-dataverse-chat/.eslintrc b/projects/03-dataverse-chat/.eslintrc new file mode 100644 index 000000000..0dfd1120a --- /dev/null +++ b/projects/03-dataverse-chat/.eslintrc @@ -0,0 +1,22 @@ +{ + "env": { + "browser": true, + "es6": true, + "jest": true + }, + "parserOptions": { + "ecmaVersion": 2020, + "sourceType": "module" + }, + "extends": "eslint:recommended", + "plugins": ["import"], + "rules": { + "no-console": "warn", + "import/extensions": 0, + "no-var": "error", + "prefer-const": "error", + "eqeqeq": "error", + "indent": ["error", 2], + "import/no-cycle": ["error", { "maxDepth": 1 }] + } +} \ No newline at end of file diff --git a/projects/03-dataverse-chat/.gitignore b/projects/03-dataverse-chat/.gitignore new file mode 100644 index 000000000..80e70b863 --- /dev/null +++ b/projects/03-dataverse-chat/.gitignore @@ -0,0 +1,6 @@ +.DS_Store +*.swp +coverage/ +node_modules/ +.vscode/ +.env \ No newline at end of file diff --git a/projects/03-dataverse-chat/README.md b/projects/03-dataverse-chat/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/projects/03-dataverse-chat/package.json b/projects/03-dataverse-chat/package.json new file mode 100644 index 000000000..1314807ed --- /dev/null +++ b/projects/03-dataverse-chat/package.json @@ -0,0 +1,34 @@ +{ + "name": "dataverse-chat", + "version": "1.0.0", + "main": "src/index.html", + "license": "MIT", + "scripts": { + "htmlhint": "htmlhint src/*.html test/*.html", + "eslint": "eslint --ext .js src/ test/", + "pretest": "npm run eslint && npm run htmlhint", + "test": "jest --verbose --coverage test/", + "open-coverage-report": "opener ./coverage/lcov-report/index.html", + "start": "serve src/ -s" + }, + "devDependencies": { + "@babel/core": "^7.6.2", + "@babel/plugin-transform-modules-commonjs": "^7.6.0", + "acorn": "^8.8.2", + "babel-jest": "^27.0.1", + "css": "^3.0.0", + "eslint": "^8.3.0", + "gh-pages": "^3.1.0", + "htmlhint": "^1.0.0", + "jest": "^27.0.1", + "jsdom": "^22.1.0", + "opener": "^1.5.1", + "serve": "^14.2.1" + }, + "engines": { + "node": ">=16.x" + }, + "jest": { + "testEnvironment": "jsdom" + } +} \ No newline at end of file diff --git a/projects/03-dataverse-chat/src/index.html b/projects/03-dataverse-chat/src/index.html new file mode 100644 index 000000000..fd6186f20 --- /dev/null +++ b/projects/03-dataverse-chat/src/index.html @@ -0,0 +1,12 @@ + + +
+ +