Skip to content

Commit

Permalink
feat: Add first version of the boilerplate (#1615)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ChristianRL23 authored and unjust committed Oct 16, 2023
1 parent d23f484 commit ed3ddb4
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 0 deletions.
3 changes: 3 additions & 0 deletions projects/03-dataverse-chat/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["@babel/plugin-transform-modules-commonjs"]
}
8 changes: 8 additions & 0 deletions projects/03-dataverse-chat/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
22 changes: 22 additions & 0 deletions projects/03-dataverse-chat/.eslintrc
Original file line number Diff line number Diff line change
@@ -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 }]
}
}
6 changes: 6 additions & 0 deletions projects/03-dataverse-chat/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.DS_Store
*.swp
coverage/
node_modules/
.vscode/
.env
Empty file.
34 changes: 34 additions & 0 deletions projects/03-dataverse-chat/package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
12 changes: 12 additions & 0 deletions projects/03-dataverse-chat/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dataverse Chat</title>
<!--Aquí puedes importar tu archivo de CSS para agregar estilos.-->
</head>
<body>
<div id="root"></div>
<script src="index.js" type="module"></script>
</body>
</html>
19 changes: 19 additions & 0 deletions projects/03-dataverse-chat/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// En este archivo definirás tus rutas e importarás los componentes que vas a renderizar.

/*
import Example from './views/Example.js';
Ejemplo de definición de rutas:
const routes = {
"/": Example,
...
}
*/

/*
TODO:
1.- Definir rutas en router.
2.- Pasar "root element" a router.
3.- Invocar el router para renderizar la vista correcta.
*/
5 changes: 5 additions & 0 deletions projects/03-dataverse-chat/src/views/Example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const Example = () => {

};

export default Example;

0 comments on commit ed3ddb4

Please sign in to comment.