Skip to content

Commit bdcb745

Browse files
committed
Initial
0 parents  commit bdcb745

20 files changed

Lines changed: 677 additions & 0 deletions

.eslintrc

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
/** Enable ES6 features */
3+
"parserOptions": {
4+
"ecmaVersion": 6,
5+
"sourceType": "module",
6+
"ecmaFeatures": {
7+
"classes": true
8+
}
9+
},
10+
"rules": {
11+
12+
"arrow-spacing": [2, {
13+
"before": true,
14+
"after": true
15+
}],
16+
17+
/** Variables */
18+
"no-catch-shadow": 2,
19+
"no-delete-var": 2,
20+
"no-label-var": 2,
21+
"no-shadow-restricted-names": 2,
22+
"no-shadow": 2,
23+
"no-undef-init": 2,
24+
"no-undef": 2,
25+
"no-unused-vars": 1,
26+
27+
/** Style */
28+
"array-bracket-spacing": [2, "never", {
29+
"singleValue": true,
30+
"objectsInArrays": true,
31+
"arraysInArrays": true
32+
}],
33+
"quotes": [1, "single", "avoid-escape"],
34+
"eqeqeq": 0,
35+
"brace-style": [2, "1tbs"],
36+
37+
"comma-spacing": [2, {
38+
"before": false,
39+
"after": true
40+
}],
41+
"comma-style": [2, "last"],
42+
"eol-last": 0,
43+
"no-nested-ternary": 1,
44+
"no-trailing-spaces": 2,
45+
"no-mixed-spaces-and-tabs": 2,
46+
"padded-blocks": [2, "never"],
47+
"space-before-blocks": 1,
48+
"space-before-function-paren": [1, {
49+
"anonymous": "always",
50+
"named": "never"
51+
}],
52+
"spaced-comment": [2, "always", {
53+
"exceptions": ["-", "+"],
54+
"markers": ["=", "!"]
55+
}],
56+
"semi": [2, "always"],
57+
"indent": [2, 2, {
58+
"SwitchCase": 1,
59+
"VariableDeclarator": 2
60+
}],
61+
"camelcase": [2, {
62+
"properties": "always"
63+
}],
64+
"newline-after-var": [1, "always"],
65+
"require-jsdoc": ["error", {
66+
"require": {
67+
"FunctionDeclaration": true,
68+
"MethodDefinition": true,
69+
"ClassDeclaration": true,
70+
"ArrowFunctionExpression": false
71+
}
72+
}]
73+
74+
},
75+
"globals": {
76+
"document": true,
77+
"module": true,
78+
"require": true,
79+
"window": true,
80+
"console": true,
81+
"define": true
82+
}
83+
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/*
2+
npm-debug.log
3+
.idea/*

.jshintrc

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
/*
3+
* ENVIRONMENTS
4+
* =================
5+
*/
6+
7+
// Define globals exposed by modern browsers.
8+
"browser": true,
9+
10+
// Define globals exposed by Node.js.
11+
"node": true,
12+
13+
// Define globals exposed by CodeX Team
14+
"predef": [],
15+
16+
// Allow ES6.
17+
"esversion": 6,
18+
19+
/*
20+
* ENFORCING OPTIONS
21+
* =================
22+
*/
23+
24+
// Force all variable names to use either camelCase style or UPPER_CASE
25+
// with underscores.
26+
"camelcase": true,
27+
28+
// Prohibit use of == and != in favor of === and !==.
29+
"eqeqeq": true,
30+
31+
// Enforce tab width of 2 spaces.
32+
"indent": 2,
33+
34+
// Prohibit use of a variable before it is defined.
35+
"latedef": true,
36+
37+
// Enforce line length to 100 characters
38+
"maxlen": 120,
39+
40+
// Require capitalized names for constructor functions.
41+
"newcap": true,
42+
43+
// Enforce use of single quotation marks for strings.
44+
"quotmark": "single",
45+
46+
// Enforce placing 'use strict' at the top function scope
47+
"strict": true,
48+
49+
// Prohibit use of explicitly undeclared variables.
50+
"undef": true,
51+
52+
// Warn when variables are defined but never used.
53+
"unused": true,
54+
55+
/*
56+
* RELAXING OPTIONS
57+
* =================
58+
*/
59+
60+
// Suppress warnings about == null comparisons.
61+
"eqnull": true
62+
}

.postcssrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
plugins:
2+
postcss-smart-import: {}
3+
postcss-cssnext: {}

.stylelintrc

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
{
2+
"rules": {
3+
"at-rule-empty-line-before": [ "always", {
4+
except: [
5+
"blockless-after-same-name-blockless",
6+
"first-nested",
7+
],
8+
ignore: ["after-comment"],
9+
} ],
10+
"at-rule-name-case": "lower",
11+
"at-rule-name-space-after": "always-single-line",
12+
"at-rule-semicolon-newline-after": "always",
13+
"block-closing-brace-empty-line-before": "never",
14+
"block-closing-brace-newline-after": "always",
15+
"block-closing-brace-newline-before": "always-multi-line",
16+
"block-closing-brace-space-before": "always-single-line",
17+
"block-no-empty": true,
18+
"block-opening-brace-newline-after": "always-multi-line",
19+
"block-opening-brace-space-after": "always-single-line",
20+
"block-opening-brace-space-before": "always",
21+
"color-hex-case": "lower",
22+
"color-hex-length": "short",
23+
"color-no-invalid-hex": true,
24+
"comment-empty-line-before": [ "always", {
25+
except: ["first-nested"],
26+
ignore: ["stylelint-commands"],
27+
} ],
28+
"comment-no-empty": true,
29+
"comment-whitespace-inside": "always",
30+
"custom-property-empty-line-before": [ "always", {
31+
except: [
32+
"after-custom-property",
33+
"first-nested",
34+
],
35+
ignore: [
36+
"after-comment",
37+
"inside-single-line-block",
38+
],
39+
} ],
40+
"declaration-bang-space-after": "never",
41+
"declaration-bang-space-before": "always",
42+
"declaration-block-no-duplicate-properties": [ true, {
43+
ignore: ["consecutive-duplicates-with-different-values"],
44+
} ],
45+
"declaration-block-no-redundant-longhand-properties": true,
46+
"declaration-block-no-shorthand-property-overrides": true,
47+
"declaration-block-semicolon-newline-after": "always-multi-line",
48+
"declaration-block-semicolon-space-after": "always-single-line",
49+
"declaration-block-semicolon-space-before": "never",
50+
"declaration-block-single-line-max-declarations": 1,
51+
"declaration-block-trailing-semicolon": "always",
52+
"declaration-colon-newline-after": "always-multi-line",
53+
"declaration-colon-space-after": "always-single-line",
54+
"declaration-colon-space-before": "never",
55+
"declaration-empty-line-before": [ "always", {
56+
except: [
57+
"after-declaration",
58+
"first-nested",
59+
],
60+
ignore: [
61+
"after-comment",
62+
"inside-single-line-block",
63+
],
64+
} ],
65+
"font-family-no-duplicate-names": true,
66+
"function-calc-no-unspaced-operator": true,
67+
"function-comma-newline-after": "always-multi-line",
68+
"function-comma-space-after": "always-single-line",
69+
"function-comma-space-before": "never",
70+
"function-linear-gradient-no-nonstandard-direction": true,
71+
"function-max-empty-lines": 0,
72+
"function-name-case": "lower",
73+
"function-parentheses-newline-inside": "always-multi-line",
74+
"function-parentheses-space-inside": "never-single-line",
75+
"function-whitespace-after": "always",
76+
"indentation": 4,
77+
"keyframe-declaration-no-important": true,
78+
"length-zero-no-unit": true,
79+
"max-empty-lines": 1,
80+
"media-feature-colon-space-after": "always",
81+
"media-feature-colon-space-before": "never",
82+
"media-feature-name-case": "lower",
83+
"media-feature-name-no-unknown": true,
84+
"media-feature-parentheses-space-inside": "never",
85+
"media-feature-range-operator-space-after": "always",
86+
"media-feature-range-operator-space-before": "always",
87+
"media-query-list-comma-newline-after": "always-multi-line",
88+
"media-query-list-comma-space-after": "always-single-line",
89+
"media-query-list-comma-space-before": "never",
90+
"no-empty-source": true,
91+
"no-eol-whitespace": true,
92+
"no-extra-semicolons": true,
93+
"no-invalid-double-slash-comments": true,
94+
"no-missing-end-of-source-newline": true,
95+
"number-leading-zero": "always",
96+
"number-no-trailing-zeros": true,
97+
"property-case": "lower",
98+
"property-no-unknown": true,
99+
"rule-nested-empty-line-before": [ "always-multi-line", {
100+
except: ["first-nested"],
101+
ignore: ["after-comment"],
102+
} ],
103+
"rule-non-nested-empty-line-before": [ "always-multi-line", {
104+
ignore: ["after-comment"],
105+
} ],
106+
"selector-attribute-brackets-space-inside": "never",
107+
"selector-attribute-operator-space-after": "never",
108+
"selector-attribute-operator-space-before": "never",
109+
"selector-combinator-space-after": "always",
110+
"selector-combinator-space-before": "always",
111+
"selector-descendant-combinator-no-non-space": true,
112+
"selector-list-comma-newline-after": "always",
113+
"selector-list-comma-space-before": "never",
114+
"selector-max-empty-lines": 0,
115+
"selector-pseudo-class-case": "lower",
116+
"selector-pseudo-class-no-unknown": true,
117+
"selector-pseudo-class-parentheses-space-inside": "never",
118+
"selector-pseudo-element-case": "lower",
119+
"selector-pseudo-element-colon-notation": "double",
120+
"selector-pseudo-element-no-unknown": true,
121+
"selector-type-case": "lower",
122+
"selector-type-no-unknown": true,
123+
"shorthand-property-no-redundant-values": true,
124+
"string-no-newline": true,
125+
"unit-case": "lower",
126+
"unit-no-unknown": true,
127+
"value-list-comma-newline-after": "always-multi-line",
128+
"value-list-comma-space-after": "always-single-line",
129+
"value-list-comma-space-before": "never",
130+
"value-list-max-empty-lines": 0,
131+
},
132+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 CodeX Editor
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

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Code Plugin for CodeX Editor
2+
3+
Paste code examples into your article.
4+
5+
## Install via npm
6+
7+
```shell
8+
npm i --save codex.editor.code
9+
```
10+
11+
#### Connect with Webpack
12+
13+
Include module in your application
14+
15+
```js
16+
require('codex.editor.code');
17+
```
18+
19+
Include CSS file
20+
21+
```css
22+
@import url("~codex.editor.code/lib/code.css");
23+
```
24+
25+
## Install directly
26+
27+
1. Download folder `lib` from repository
28+
2. Add `lib/bundle.js` and `lib/bundle.css` files to your page.
29+
30+
## CodeX Editor
31+
32+
API oriented, open-source, block-styled Edtior.
33+
34+
https://github.com/codex-team/codex.editor
35+
36+
## Authors
37+
38+
We are small team of Web-developing fans consisting of IFMO students and graduates located in St. Petersburg, Russia.
39+
Fell free to give us a feedback on <a href="mailto::team@ifmo.su">team@ifmo.su</a>
40+
41+
https://ifmo.su
42+
43+
### Follow us!
44+
45+
VK: https://vk.com/codex_team
46+
47+
Telegram: https://t.me/codex_team
48+
49+
Instagram: https://www.instagram.com/codex_team

entry.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'use strict';
2+
3+
/**
4+
* Entry point for webpack
5+
*/
6+
7+
8+
require('./src/main.css');
9+
10+
module.exports = require('./src/main');

lib/bundle.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/bundle.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)