Skip to content

Commit 13c8ac9

Browse files
chore: 🤖 initialize repository
1 parent 0a92d39 commit 13c8ac9

29 files changed

+11501
-2
lines changed

‎.browserslistrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file is used by:
2+
# 1. PostCSS to adjust CSS to support the below specified browsers
3+
# 2. babel preset-env to adjust included polyfills
4+
5+
# If you need to support different browsers in production, you may tweak the list below.
6+
7+
> 0.2%
8+
IE 11
9+
not dead
10+
not op_mini all

‎.circleci/config.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
version: 2.1
2+
3+
executors:
4+
nodejs:
5+
docker:
6+
- image: circleci/node:latest
7+
8+
jobs:
9+
build:
10+
executor: nodejs
11+
working_directory: ~/tmp
12+
steps:
13+
- checkout
14+
- restore_cache:
15+
key: npm-deps-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
16+
- run:
17+
name: Install dependencies
18+
command: yarn install
19+
- save_cache:
20+
key: npm-deps-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
21+
paths:
22+
- ./node_modules
23+
- run:
24+
name: Lint
25+
command: yarn lint
26+
- run:
27+
name: Unit Tests
28+
command: yarn test:ci
29+
- run:
30+
name: Build
31+
command: yarn build
32+
33+
workflows:
34+
version: 2
35+
create_version:
36+
jobs:
37+
- create_version:
38+
filters:
39+
branches:
40+
only:
41+
- master
42+
tags:
43+
ignore: /.*/
44+
ci:
45+
jobs:
46+
- build:
47+
filters:
48+
branches:
49+
only: /.*/
50+
tags:
51+
ignore: /.*/
52+
publish:
53+
jobs:
54+
- build:
55+
filters:
56+
tags:
57+
only: /.*/
58+
branches:
59+
ignore: /.*/
60+
- publish:
61+
filters:
62+
tags:
63+
only: /.*/
64+
branches:
65+
ignore: /.*/
66+
requires:
67+
- build

‎.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test/**

‎.eslintrc.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const path = require('path');
2+
3+
module.exports = {
4+
ignorePatterns: ['dist/'],
5+
parser: '@typescript-eslint/parser',
6+
extends: [
7+
'plugin:@typescript-eslint/recommended',
8+
"prettier",
9+
"prettier/@typescript-eslint",
10+
"plugin:react/recommended"
11+
],
12+
plugins: ['@typescript-eslint'],
13+
parserOptions: {
14+
ecmaVersion: 2018,
15+
sourceType: 'module',
16+
ecmaFeatures: {
17+
jsx: true,
18+
},
19+
},
20+
settings: {
21+
react: {
22+
version: 'detect',
23+
},
24+
},
25+
rules: {
26+
'react/prop-types': 'off',
27+
'@typescript-eslint/explicit-function-return-type': 'off',
28+
'@typescript-eslint/no-explicit-any': 'warn',
29+
'@typescript-eslint/no-unused-vars': 'error',
30+
},
31+
};

‎.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
*.log
2+
3+
.DS_Store
4+
5+
node_modules
6+
dist
7+
coverage
8+
config.js
9+
.idea/
10+
.package-lock.json
11+
.npmrc

‎.npmignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
*.log
2+
*.md
3+
*.yml
4+
5+
.awspublish-keen-js
6+
.DS_Store
7+
.git*
8+
.pairs
9+
.tmp*
10+
11+
bower.json
12+
gulpfile.js
13+
bower.json
14+
gulpfile.js
15+
.babelrc
16+
test
17+
.travis.yml
18+
circle.yml
19+
jest.config.js
20+
replace-config.js
21+
webpack.config.js
22+
.eslintrc
23+
.eslintignore
24+
25+
dist/keen-explorer.bundle.js
26+
dist/keen-explorer.bundle.js.map
27+
dist/*.html
28+
dist/assets
29+
30+
node_modules
31+
test

‎.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist

‎.versionrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
releaseCommitMessageFormat: "chore(release): {{currentTag}} [skip ci]"
3+
};

‎.yarnclean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@types/react-native

‎CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4+

‎LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
MIT License
1+
The MIT License (MIT)
22

3-
Copyright (c) 2020 Keen
3+
Copyright (c) 2019 Keen IO
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

‎README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Dashboard Creator
2+
3+
[![written in typescript](https://img.shields.io/badge/written%20in-typescript-blue.svg)](https://www.typescriptlang.org) [![styled with prettier](https://img.shields.io/badge/styled_with-prettier-yellow.svg)](https://github.com/prettier/prettier) [![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://facebook.github.io/jest/) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) [![yarn](https://img.shields.io/badge/maintained%20with-yarn-cc00ff.svg)](https://yarnpkg.com/en/)
4+
5+
The Dashboard Creator is an open source point-and-click interface for creating dashboards. It's maintained by the team at [Keen IO](https://keen.io/).
6+
7+
### Install
8+
9+
```ssh
10+
npm install @keen.io/dashboard-creator --save
11+
```
12+
13+
or
14+
15+
```ssh
16+
yarn add @keen.io/dashboard-creator
17+
```
18+
19+
### npm scripts
20+
21+
List of useful commands that could be used by developers. Execution in the command-line interface should be prefixed with `yarn` package manager.
22+
23+
| Command | Description |
24+
| ---------- | ---------------------------------------------------- |
25+
| `lint` | run linter against current application codebase. |
26+
| `test` | run unit tests. |
27+
| `build` | builds application distribution. |
28+
| `prettier` | run code formatter process against current codebase. |
29+
30+
### commit
31+
32+
This project uses [Conventional Commits](https://www.conventionalcommits.org) to enforce common commit standards.
33+
34+
| Command | Description |
35+
| ------------ | ---------------------------------- |
36+
| `npx git-cz` | run commit command line interface. |

‎commitlint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
};

‎config.template.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
projectId: '',
3+
masterKey: '',
4+
readKey: '',
5+
writeKey: '',
6+
};

‎jest.config.js

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
module.exports = {
2+
coverageThreshold: {
3+
global: {
4+
branches: 80,
5+
functions: 80,
6+
lines: 80,
7+
statements: 80
8+
}
9+
},
10+
11+
transform: {
12+
"^.+\\.[t|j]sx?$": "ts-jest"
13+
},
14+
15+
globals: {
16+
'ts-jest': {
17+
isolatedModules: true,
18+
tsConfig: '<rootDir>/tsconfig.json',
19+
},
20+
},
21+
22+
testEnvironment: 'jest-environment-jsdom-sixteen',
23+
24+
setupFilesAfterEnv: [
25+
'<rootDir>/jest.setup.ts'
26+
],
27+
28+
transformIgnorePatterns: [
29+
"<rootDir>/node_modules/(?!(@keen.io)/)"
30+
],
31+
32+
testTimeout: 10000,
33+
34+
clearMocks: true,
35+
36+
coverageDirectory: "coverage",
37+
38+
moduleFileExtensions: [
39+
"js",
40+
"json",
41+
"jsx",
42+
"ts",
43+
"tsx",
44+
"node"
45+
],
46+
47+
};

‎jest.setup.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import '@testing-library/jest-dom';
2+
import fetch from 'jest-fetch-mock';
3+
4+
fetch.enableMocks();
5+
6+
jest.mock('react-i18next', () => ({
7+
useTranslation: () => {
8+
return {
9+
t: (key: string) => key,
10+
};
11+
},
12+
}));

‎package.json

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
"name": "@keen.io/dashboard-creator",
3+
"author": "Keen IO <[email protected]> (https://keen.io/)",
4+
"description": "Dashboard Creator by Keen IO",
5+
"version": "1.0.0",
6+
"license": "MIT",
7+
"files": [
8+
"dist"
9+
],
10+
"scripts": {
11+
"start": "concurrently --kill-others \"NODE_ENV=development webpack-dev-server\"",
12+
"test": "jest",
13+
"test:ci": "jest -w 1",
14+
"test:watch": "NODE_ENV=test jest --watch",
15+
"build": "NODE_ENV=production webpack --config webpack.config.prod.js -p",
16+
"check-bundle": "NODE_ENV=production webpack --config webpack.config.prod.js --env.ANALYZE_BUNDLE=true -p",
17+
"version": "npm run build && git add .",
18+
"lint": "eslint --quiet --ext .ts --ext .tsx src/",
19+
"circular": "madge --circular ./src/**/*",
20+
"prettier": "prettier --write 'src/**/*.{js,ts,tsx,json}'",
21+
"release": "standard-version",
22+
"commit": "npx git-cz"
23+
},
24+
"husky": {
25+
"hooks": {
26+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
27+
"pre-commit": "lint-staged"
28+
}
29+
},
30+
"lint-staged": {
31+
"*.{ts,tsx}": [
32+
"yarn prettier",
33+
"eslint --fix",
34+
"git add *"
35+
]
36+
},
37+
"config": {
38+
"commitizen": {
39+
"path": "./node_modules/cz-conventional-changelog"
40+
}
41+
},
42+
"dependencies": {
43+
"react": "^16.14.0",
44+
"react-dom": "^16.14.0"
45+
},
46+
"devDependencies": {
47+
"@babel/core": "^7.11.6",
48+
"@babel/plugin-proposal-object-rest-spread": "^7.11.0",
49+
"@babel/preset-env": "^7.11.5",
50+
"@babel/preset-react": "^7.10.4",
51+
"@babel/preset-typescript": "^7.10.4",
52+
"@commitlint/cli": "^9.1.1",
53+
"@commitlint/config-conventional": "^9.1.1",
54+
"@testing-library/jest-dom": "^5.8.0",
55+
"@testing-library/react": "^10.0.4",
56+
"@testing-library/react-hooks": "^3.4.1",
57+
"@types/jest": "^26.0.14",
58+
"@types/react": "^16.9.35",
59+
"@types/react-dom": "^16.9.8",
60+
"@typescript-eslint/eslint-plugin": "^2.34.0",
61+
"@typescript-eslint/parser": "^2.34.0",
62+
"autoprefixer": "^10.0.1",
63+
"babel-loader": "^8.1.0",
64+
"browserlist": "^1.0.1",
65+
"commitizen": "^4.0.3",
66+
"concurrently": "^3.5.1",
67+
"copy-webpack-plugin": "^6.2.1",
68+
"cross-env": "^7.0.2",
69+
"css-loader": "^2.1.0",
70+
"cz-conventional-changelog": "^3.0.2",
71+
"eslint": "^7.0.0",
72+
"eslint-config-airbnb": "^16.1.0",
73+
"eslint-config-prettier": "^6.11.0",
74+
"eslint-loader": "^2.0.0",
75+
"eslint-plugin-import": "^2.11.0",
76+
"eslint-plugin-jsx-a11y": "^6.0.3",
77+
"eslint-plugin-react": "^7.7.0",
78+
"git-cz": "^3.3.0",
79+
"html-loader": "^0.5.5",
80+
"html-webpack-plugin": "^4.3.0",
81+
"husky": "^4.2.5",
82+
"imports-loader": "^0.8.0",
83+
"jest": "^26.0.1",
84+
"jest-environment-jsdom-sixteen": "^1.0.3",
85+
"jest-fetch-mock": "^3.0.3",
86+
"jest-styled-components": "^7.0.2",
87+
"lint-staged": "^10.2.11",
88+
"prettier": "^2.0.5",
89+
"regenerator-runtime": "^0.13.5",
90+
"standard-version": "^7.0.1",
91+
"terser-webpack-plugin": "^3.0.6",
92+
"ts-jest": "^26.0.0",
93+
"ts-loader": "^7.0.4",
94+
"typescript": "^3.9.3",
95+
"webpack": "^4.43.0",
96+
"webpack-bundle-analyzer": "^3.8.0",
97+
"webpack-cli": "^3.2.1",
98+
"webpack-dev-server": "^3.3.1",
99+
"webpack-merge": "^4.2.2"
100+
},
101+
"repository": {
102+
"type": "git",
103+
"url": "[email protected]:keen/explorer.git"
104+
},
105+
"bugs": "https://github.com/keen/dashboard-creator/issues",
106+
"homepage": "https://keen.io"
107+
}

0 commit comments

Comments
 (0)