Skip to content

Commit c201524

Browse files
committed
initial commit
0 parents  commit c201524

21 files changed

+7762
-0
lines changed

.babelrc

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"env": {
3+
"test": {
4+
"presets": ["env"],
5+
"plugins": ["transform-react-jsx"]
6+
},
7+
"development": {
8+
"presets": [
9+
["env", {"modules": false}]
10+
],
11+
"plugins": [
12+
"transform-react-jsx",
13+
"external-helpers"
14+
]
15+
}
16+
}
17+
}

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__coverage__

.eslintrc

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"plugins": [
3+
"jest",
4+
"prettier"
5+
],
6+
"env": {
7+
"es6": true,
8+
"browser": true,
9+
"jest/globals": true
10+
},
11+
"extends": [
12+
"prettier",
13+
"airbnb",
14+
"plugin:jest/recommended"
15+
],
16+
"parserOptions": {
17+
"ecmaVersion": 7,
18+
"ecmaFeatures": {
19+
"experimentalObjectRestSpread": true,
20+
"jsx": true
21+
},
22+
"sourceType": "module"
23+
},
24+
"parser": "babel-eslint",
25+
"rules": {
26+
"prettier/prettier": "error",
27+
"react/forbid-prop-types": "off",
28+
"quotes": [0],
29+
"comma-dangle": [2, "only-multiline"],
30+
"max-len": [1, {"code": 90}],
31+
"no-unused-expressions": [0],
32+
"no-continue": [0],
33+
"no-plusplus": [0],
34+
"func-names": [0],
35+
"arrow-parens": [0],
36+
"space-before-function-paren": [0],
37+
"import/no-extraneous-dependencies": [2, {"devDependencies": true}],
38+
"jsx-a11y/no-static-element-interactions": [0],
39+
"react/no-find-dom-node": [0],
40+
"react/jsx-closing-bracket-location": [0],
41+
"react/jsx-filename-extension": ["error", {"extensions": [".js"]}],
42+
"react/require-default-props": 0,
43+
"class-methods-use-this": [0]
44+
}
45+
}

.gitignore

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Component
2+
dist
3+
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
11+
# Runtime data
12+
pids
13+
*.pid
14+
*.seed
15+
*.pid.lock
16+
17+
# Directory for instrumented libs generated by jscoverage/JSCover
18+
lib-cov
19+
20+
# Coverage directory used by tools like istanbul
21+
__coverage__
22+
coverage
23+
24+
# nyc test coverage
25+
.nyc_output
26+
27+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
28+
.grunt
29+
30+
# Bower dependency directory (https://bower.io/)
31+
bower_components
32+
33+
# node-waf configuration
34+
.lock-wscript
35+
36+
# Compiled binary addons (http://nodejs.org/api/addons.html)
37+
build/Release
38+
39+
# Dependency directories
40+
node_modules/
41+
jspm_packages/
42+
43+
# Typescript v1 declaration files
44+
typings/
45+
46+
# Optional npm cache directory
47+
.npm
48+
49+
# Optional eslint cache
50+
.eslintcache
51+
52+
# Optional REPL history
53+
.node_repl_history
54+
55+
# Output of 'npm pack'
56+
*.tgz
57+
58+
# Yarn Integrity file
59+
.yarn-integrity
60+
61+
# dotenv environment variables file
62+
.env
63+
64+
#OSX
65+
.DS_Store

CNAME

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
react-command-pallet.js.org

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 Asa Baylus
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
# React Command Palette
3+
WAI-ARIA compliant React command palette like the one in Atom
4+
5+
[![Codeship](https://img.shields.io/codeship/f7cc0a30-3533-0135-cd98-56b308955afb.svg?style=flat-square)](https://app.codeship.com/projects/227053)
6+
7+
# Developer Setup
8+
```
9+
# install dependencies
10+
$ yarn install
11+
12+
# optionally run lint
13+
$ yarn lint
14+
15+
# optionally make code prettier
16+
$ yarn prettier
17+
18+
# optionally run tests
19+
$ yarn test
20+
21+
# start the dev environment
22+
$ yarn dev
23+
```

docs/Gemfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source 'https://rubygems.org'
2+
gem 'github-pages', group: :jekyll_plugins

docs/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# React Command Palette
2+
3+
It's so great!

docs/_config.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
theme: jekyll-theme-cayman
2+
title: React Command Palette
3+
description: A web enabled React.js command-pallet based upon Atom's excellent command-palette.

index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>React Command Palette Demo</title>
6+
</head>
7+
<body>
8+
<div id="app"></div>
9+
</body>
10+
<script src="dist/index.js" charset="utf-8"></script>
11+
</html>

package.json

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"name": "react-command-palette",
3+
"version": "0.0.1",
4+
"description": "WAI-ARIA compliant React command palette like the one in Atom",
5+
"main": "dist/index.js",
6+
"module": "src/command-palette.js",
7+
"scripts": {
8+
"build": "rollup -c --environment BUILD:production",
9+
"dev": "concurrently --raw --kill-others \"rollup -c -w\" \"jest --watch\"",
10+
"prettier": "eslint --fix src/",
11+
"lint": "eslint src/",
12+
"test": "jest"
13+
},
14+
"jest": {
15+
"collectCoverage": true,
16+
"coverageDirectory": "src/__coverage__",
17+
"collectCoverageFrom": [
18+
"**/src/*.{js}",
19+
"!**/node_modules/**",
20+
"!src/main.js"
21+
],
22+
"coverageReporters": [
23+
"html",
24+
"json",
25+
"text"
26+
]
27+
},
28+
"repository": {
29+
"type": "git",
30+
"url": "git+https://github.com/asabaylus/react-command-palette.git"
31+
},
32+
"keywords": [
33+
"react",
34+
"command",
35+
"palette",
36+
"command palette",
37+
"command-palette",
38+
"accessibile",
39+
"react-component"
40+
],
41+
"authors": [
42+
"Asa Baylus"
43+
],
44+
"license": "MIT",
45+
"bugs": {
46+
"url": "https://github.com/asabaylus/react-command-palette/issues"
47+
},
48+
"homepage": "https://github.com/asabaylus/react-command-palette#readme",
49+
"peerDependencies": {
50+
"react": "^0.14.0 || ^15.0.0",
51+
"react-dom": "^0.14.0 || ^15.0.0"
52+
},
53+
"devDependencies": {
54+
"babel-cli": "^6.24.1",
55+
"babel-eslint": "^8.0.2",
56+
"babel-jest": "^21.2.0",
57+
"babel-plugin-external-helpers": "^6.22.0",
58+
"babel-plugin-lodash": "^3.2.11",
59+
"babel-plugin-transform-es2015-modules-umd": "^6.24.1",
60+
"babel-plugin-transform-react-jsx": "^6.24.1",
61+
"babel-plugin-transform-runtime": "^6.23.0",
62+
"babel-preset-env": "^1.5.2",
63+
"eslint-config-airbnb": "^16.1.0",
64+
"eslint-config-prettier": "^2.2.0",
65+
"eslint-plugin-import": "^2.3.0",
66+
"eslint-plugin-jest": "^21.3.2",
67+
"eslint-plugin-jsx-a11y": "^6.0.2",
68+
"eslint-plugin-prettier": "^2.3.1",
69+
"eslint-plugin-react": "^7.1.0",
70+
"jest": "^21.2.1",
71+
"prettier": "^1.8.2",
72+
"rollup": "^0.52.0",
73+
"rollup-plugin-babel": "^3.0.2",
74+
"rollup-plugin-commonjs": "^8.0.2",
75+
"rollup-plugin-hypothetical": "^2.0.0",
76+
"rollup-plugin-livereload": "^0.6.0",
77+
"rollup-plugin-node-resolve": "^3.0.0",
78+
"rollup-plugin-postcss": "^0.5.3",
79+
"rollup-plugin-replace": "^2.0.0",
80+
"rollup-plugin-serve": "^0.4.2",
81+
"rollup-watch": "^4.0.0"
82+
},
83+
"dependencies": {
84+
"autosuggest-highlight": "^3.1.0",
85+
"concurrently": "^3.5.0",
86+
"enzyme": "^3.2.0",
87+
"enzyme-adapter-react-16": "^1.1.0",
88+
"enzyme-to-json": "^3.2.2",
89+
"eslint": "4.12.0",
90+
"fuse.js": "^3.0.5",
91+
"keymaster": "^1.6.2",
92+
"mousetrap": "^1.6.1",
93+
"prop-types": "^15.5.10",
94+
"raf": "^3.4.0",
95+
"react": "^16.1.1",
96+
"react-autosuggest": "^9.2.0",
97+
"react-dom": "^16.1.1",
98+
"react-modal": "^3.1.4",
99+
"react-test-renderer": "^16.1.1"
100+
}
101+
}

rollup.config.js

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Rollup plugins
2+
import babel from "rollup-plugin-babel";
3+
import resolve from "rollup-plugin-node-resolve";
4+
import replace from "rollup-plugin-replace";
5+
import commonjs from "rollup-plugin-commonjs";
6+
import postcss from "rollup-plugin-postcss";
7+
import serve from "rollup-plugin-serve";
8+
import livereload from "rollup-plugin-livereload";
9+
10+
const plugins = [
11+
replace({
12+
"process.env.NODE_ENV": JSON.stringify("development")
13+
}),
14+
postcss({
15+
extensions: [".css"]
16+
}),
17+
resolve({
18+
jsnext: true,
19+
main: true,
20+
browser: true
21+
}),
22+
commonjs({
23+
include: ["node_modules/**"],
24+
exclude: ["node_modules/process-es6/**"],
25+
namedExports: {
26+
"node_modules/react/index.js": [
27+
"Children",
28+
"Component",
29+
"PropTypes",
30+
"createElement",
31+
"isValidElement",
32+
"cloneElement"
33+
],
34+
"node_modules/react-dom/index.js": ["render"],
35+
"node_modules/fuse.js/dist/fuse.js": ["Fuse"],
36+
"node_modules/autosuggest-highlight/match/index.js": ["match"],
37+
"node_modules/autosuggest-highlight/parse/index.js": ["parse"]
38+
}
39+
}),
40+
babel({
41+
exclude: "node_modules/**"
42+
})
43+
];
44+
45+
if (process.env.BUILD !== "production") {
46+
plugins.push(
47+
serve({
48+
contentBase: ".",
49+
open: true,
50+
verbose: true
51+
})
52+
);
53+
54+
plugins.push(livereload("dist"));
55+
}
56+
57+
export default {
58+
input: "src/main.js",
59+
output: {
60+
file: "dist/index.js",
61+
format: "umd"
62+
},
63+
sourcemap: "inline",
64+
plugins
65+
};

0 commit comments

Comments
 (0)