-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
d23f484
commit ed3ddb4
Showing
9 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": ["@babel/plugin-transform-modules-commonjs"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.DS_Store | ||
*.swp | ||
coverage/ | ||
node_modules/ | ||
.vscode/ | ||
.env |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const Example = () => { | ||
|
||
}; | ||
|
||
export default Example; |