Skip to content

Commit 557847b

Browse files
author
vinkumar2
committed
chore: Initial Setup and Docs
0 parents  commit 557847b

33 files changed

+13450
-0
lines changed

Diff for: .editorconfig

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_size = 2
8+
indent_style = space
9+
insert_final_newline = true
10+
max_line_length = 100
11+
trim_trailing_whitespace = true
12+
13+
[*.md]
14+
max_line_length = 0
15+
trim_trailing_whitespace = false
16+
17+
[COMMIT_EDITMSG]
18+
max_line_length = 0

Diff for: .gitignore

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
dist/
2+
www/
3+
storybook-static/
4+
5+
*~
6+
*.sw[mnpcod]
7+
*.log
8+
*.lock
9+
*.tmp
10+
*.tmp.*
11+
log.txt
12+
*.d.ts
13+
14+
.stencil/
15+
.idea/
16+
.sass-cache/
17+
.versions/
18+
node_modules/
19+
$RECYCLE.BIN/
20+
21+
.DS_Store
22+
Thumbs.db
23+
UserInterfaceState.xcuserstate
24+
.env
25+
26+
components.d.ts
27+
.distribution
28+
29+
# The npm deploy process needs this file, so we cannot ignore it:
30+
yarn.lock
31+

Diff for: .huskyrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"hooks" : {
3+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
4+
"pre-commit" : "git add src/components/**/*.md && lint-staged"
5+
}
6+
}

Diff for: .lintstagedrc

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"**/*.{js,json,scss,tsx}": [
3+
"prettier --write",
4+
"git add"
5+
],
6+
"**/*.scss" : [
7+
"yarn run lint:style",
8+
"git add"
9+
],
10+
"**/*.{tsx,ts}" : [
11+
"yarn run test",
12+
"yarn run lint",
13+
"git add"
14+
]
15+
}

Diff for: .npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@types:registry=https://registry.npmjs.org
2+
@xt-pagesource:registry=https://registry.npmjs.org

Diff for: .prettierignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dist/
2+
node_modules/
3+
coverage/
4+
storybook-static/
5+
build/
6+
docs/
7+
reports/
8+
.history/
9+
out/

Diff for: .prettierrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"singleQuote": true,
3+
"semi": true,
4+
"jsxBracketSameLine": true,
5+
"bracketSpacing" : true,
6+
"jsxSingleQuote": false
7+
}

Diff for: .stylelintrc

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "stylelint-config-recommended",
3+
"plugins": [
4+
"stylelint-scss"
5+
],
6+
"rules" : {
7+
"at-rule-no-unknown": null,
8+
"scss/at-rule-no-unknown": true,
9+
"selector-type-no-unknown" : null,
10+
"no-descending-specificity": null
11+
}
12+
}

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018
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.

Diff for: commitlint.config.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional'],
3+
rules: {
4+
'type-enum': [2, 'always', ['feature', 'fix', 'chore', 'ci']],
5+
'scope-case': [1, 'always', ['lower-case', 'upper-case', 'kebab-case', 'pascal-case']],
6+
'subject-case': [
7+
1,
8+
'always',
9+
['sentence-case', 'start-case', 'pascal-case', 'upper-case', 'lower-case']
10+
]
11+
}
12+
};

Diff for: jest.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const config = {
2+
preset: '@stencil/core/testing',
3+
allowableMismatchedPixels: 100,
4+
allowableMismatchedRatio: 0.2
5+
};
6+
module.exports = config;

Diff for: loader/cdn.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = require('../dist/cjs/loader.cjs.js');
2+
module.exports.applyPolyfills = function() {
3+
return Promise.resolve();
4+
};

Diff for: loader/index.cjs.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = require('../dist/cjs/loader.cjs.js');
2+
module.exports.applyPolyfills = function() {
3+
return Promise.resolve();
4+
};

Diff for: loader/index.es2017.mjs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
export * from '../dist/esm/polyfills/index.js';
3+
export * from '../dist/esm/loader.mjs';

Diff for: loader/index.mjs

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
(function() {
3+
if (
4+
// No Reflect, no classes, no need for shim because native custom elements
5+
// require ES2015 classes or Reflect.
6+
window.Reflect === undefined ||
7+
window.customElements === undefined
8+
) {
9+
return;
10+
}
11+
var BuiltInHTMLElement = HTMLElement;
12+
window.HTMLElement = /** @this {!Object} */ function HTMLElement() {
13+
return Reflect.construct(
14+
BuiltInHTMLElement, [], /** @type {!Function} */ (this.constructor));
15+
};
16+
HTMLElement.prototype = BuiltInHTMLElement.prototype;
17+
HTMLElement.prototype.constructor = HTMLElement;
18+
Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement);
19+
})();
20+
21+
export * from '../dist/esm/polyfills/index.js';
22+
export * from '../dist/esm/loader.mjs';

Diff for: loader/node-main.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports.applyPolyfills = function() {
2+
return Promise.resolve();
3+
};
4+
module.exports.defineCustomElements = function() {
5+
return Promise.resolve();
6+
};

Diff for: loader/package.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "web-component-library-loader",
3+
"typings": "./index.d.ts",
4+
"module": "./index.mjs",
5+
"main": "./index.cjs.js",
6+
"node:main": "./node-main.js",
7+
"jsnext:main": "./index.es2017.mjs",
8+
"es2015": "./index.es2017.mjs",
9+
"es2017": "./index.es2017.mjs",
10+
"unpkg": "./cdn.js"
11+
}

0 commit comments

Comments
 (0)