commit e9140eab3fe6e988ed13f1cb18ae3bcfedf9dcd8
parent 1aaeb3990e7bbd226b81a09553f4b1ed525d205c
Author: MTRNord <mtrnord1@gmail.com>
Date: Mon, 19 Jun 2017 18:09:49 +0200
Add Basic Project Structure
Signed-off-by: MTRNord <mtrnord1@gmail.com>
Diffstat:
5 files changed, 60 insertions(+), 0 deletions(-)
diff --git a/.babelrc b/.babelrc
@@ -0,0 +1,4 @@
+{
+ "presets": ["es2015", "es2016", "es2017"],
+ "plugins": ["transform-class-properties", "transform-object-rest-spread", "transform-async-to-generator", "transform-runtime", "add-module-exports"]
+}
+\ No newline at end of file
diff --git a/.gitignore b/.gitignore
@@ -57,3 +57,6 @@ typings/
# dotenv environment variables file
.env
+.idea/
+lib/
+package-lock.json
diff --git a/package.json b/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "riot-translatebot",
+ "version": "1.0.0",
+ "description": "A simple riot bot which provides Status about Weblate",
+ "main": "lib/index.js",
+ "scripts": {
+ "test": "npm run build && mocha --require babel-polyfill --compilers js:babel-core/register",
+ "start": "npm run build && node lib/index.js",
+ "build": "babel src -d lib --source-maps",
+ "prepare": "npm run build"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Nordgedanken/Riot-TranslateBot.git"
+ },
+ "author": "MTRNord <mtrnord1@gmail.com>",
+ "license": "GPL-3.0",
+ "bugs": {
+ "url": "https://github.com/Nordgedanken/Riot-TranslateBot/issues"
+ },
+ "homepage": "https://github.com/Nordgedanken/Riot-TranslateBot#readme",
+ "dependencies": {
+ "babel-runtime": "^6.23.0",
+ "lodash": "^4.17.4",
+ "matrix-js-sdk": "^0.7.12"
+ },
+ "devDependencies": {
+ "babel-cli": "^6.24.1",
+ "babel-core": "^6.25.0",
+ "babel-plugin-add-module-exports": "^0.2.1",
+ "babel-plugin-transform-async-to-generator": "^6.24.1",
+ "babel-plugin-transform-class-properties": "^6.24.1",
+ "babel-plugin-transform-object-rest-spread": "^6.23.0",
+ "babel-plugin-transform-runtime": "^6.23.0",
+ "babel-polyfill": "^6.23.0",
+ "babel-preset-es2015": "^6.24.1",
+ "babel-preset-es2016": "^6.24.1",
+ "babel-preset-es2017": "^6.24.1",
+ "babel-register": "^6.24.1",
+ "mocha": "^3.4.2"
+ }
+}
diff --git a/src/index.js b/src/index.js
diff --git a/test/index_test.js b/test/index_test.js
@@ -0,0 +1,9 @@
+//TODO Add actual test
+var assert = require('assert');
+describe('Array', function() {
+ describe('#indexOf()', function() {
+ it('should return -1 when the value is not present', function() {
+ assert.equal(-1, [1,2,3].indexOf(4));
+ });
+ });
+});
+\ No newline at end of file