-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wait until when d.ts of browserslist-useragent is merged DefinitelyTyped/DefinitelyTyped#32328
- Loading branch information
Showing
17 changed files
with
10,939 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
.docz | ||
dist | ||
|
||
### https://raw.github.com/github/gitignore/fad779220742a6d54ccfc0c1a0e5b3d820253de6/Node.gitignore | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Typescript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
|
||
|
||
### https://raw.github.com/github/gitignore/fad779220742a6d54ccfc0c1a0e5b3d820253de6/Global/macOS.gitignore | ||
|
||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"cSpell.words": [ | ||
"noub" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
title: 'Noub', | ||
typescript: true | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
var Name = (function (redom) { | ||
'use strict'; | ||
|
||
/* @jsx mount */ | ||
var Noub = /** @class */ (function () { | ||
function Noub() { | ||
this.el = redom.mount("div", null, "hoge"); | ||
} | ||
Noub.create = function (elementId, opts) { | ||
var targetElement = document.getElementById(elementId); | ||
if (targetElement === null) { | ||
throw TypeError('対象の要素が存在しません'); | ||
} | ||
var noub = new Noub(); | ||
redom.mount(targetElement, noub); | ||
return noub; | ||
}; | ||
return Noub; | ||
}()); | ||
|
||
return Noub; | ||
|
||
}(redom)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
moduleFileExtensions: ['ts', 'tsx', 'js'], | ||
transform: { | ||
'^.+\\.tsx?$': 'ts-jest', | ||
}, | ||
testRegex: '(/__tests__/.*|.test).tsx?$', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"name": "noub", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"repository": "git@github.com:nju33/noub.git", | ||
"author": "nju33 <nju33.ki@gmail.com>", | ||
"license": "MIT", | ||
"scripts": { | ||
"prepare": "yarn build", | ||
"test": "jest", | ||
"typedoc": "typedoc --theme minimal --out docs src/index.ts --ignoreCompilerErrors", | ||
"docz.dev": "docz dev", | ||
"docz.build": "docz build", | ||
"build.main": "tsc -P tsconfig.main.json", | ||
"build.module": "tsc -P tsconfig.module.json", | ||
"build.iife": "rollup dist/module/index.js --format iife --name Name --file file.js", | ||
"build.types": "tsc -P tsconfig.types.json --emitDeclarationOnly", | ||
"build": "yarn build.main; yarn build.module; yarn build.iife; yarn build.types" | ||
}, | ||
"devDependencies": { | ||
"@nju33/tsconfig-main": "^0.0.6", | ||
"@nju33/tsconfig-module": "^0.0.6", | ||
"@nju33/tsconfig-react-main": "^0.0.6", | ||
"@nju33/tsconfig-react-module": "^0.0.6", | ||
"@nju33/tsconfig-react-types": "^0.0.6", | ||
"@nju33/tsconfig-types": "^0.0.6", | ||
"@types/jest": "^23.3.13", | ||
"@types/redom": "^3.12.0", | ||
"docz": "^0.13.7", | ||
"docz-theme-default": "^0.13.7", | ||
"jest": "^23.6.0", | ||
"rollup": "^1.1.1", | ||
"ts-jest": "^23.10.5", | ||
"tslint": "^5.12.1", | ||
"typedoc": "^0.14.2", | ||
"typescript": "^3.2.4" | ||
}, | ||
"dependencies": { | ||
"redom": "^3.17.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import {Noub} from './noub'; | ||
|
||
export default Noub; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: Noub | ||
--- | ||
|
||
# Noub | ||
|
||
import {Playground} from 'docz'; | ||
import {Noub} from './noub'; | ||
|
||
<div id="demo" /> | ||
|
||
<Playground> | ||
{() => { | ||
setTimeout(() => { | ||
Noub.create('demo', ''); | ||
}, 1000); | ||
return null; | ||
}} | ||
</Playground> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* @jsx el */ | ||
import {el, mount, RedomComponent} from 'redom'; | ||
|
||
declare namespace JSX { | ||
interface IntrinsicElements { | ||
[index: string]: HTMLElement; | ||
} | ||
} | ||
|
||
export interface NoubOptions { | ||
browsers: string[]; | ||
} | ||
|
||
export class Noub implements RedomComponent { | ||
static create(elementId: string, opts: NoubOptions) { | ||
const targetElement = document.getElementById(elementId); | ||
if (targetElement === null) { | ||
throw TypeError('対象の要素が存在しません'); | ||
} | ||
|
||
const noub = new Noub(); | ||
|
||
mount(targetElement, noub); | ||
|
||
return noub; | ||
} | ||
|
||
el: HTMLElement; | ||
|
||
constructor() { | ||
// el is not defined | ||
el; | ||
this.el = <div>hoge</div>; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
declare namespace JSX { | ||
interface IntrinsicElements { | ||
[index: string]: Partial<HTMLElement>; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "@nju33/tsconfig-react-main", | ||
"include": ["src/**/*"], | ||
"exclude": ["src/__tests__/**/*", "src/**/*test*", "src/dev.ts"], | ||
"compilerOptions": { | ||
"jsx": "react" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "@nju33/tsconfig-react-main", | ||
"include": ["src/**/*"], | ||
"exclude": ["src/__tests__/**/*", "src/**/*test*", "src/dev.ts"], | ||
"compilerOptions": { | ||
"outDir": "dist/main" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "@nju33/tsconfig-react-module", | ||
"include": ["src/**/*"], | ||
"exclude": ["src/__tests__/**/*", "src/**/*test*", "src/dev.ts"], | ||
"compilerOptions": { | ||
"outDir": "dist/module" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "@nju33/tsconfig-react-types", | ||
"include": ["src/**/*"], | ||
"exclude": ["src/__tests__/**/*", "src/**/*test*", "src/dev.ts"], | ||
"compilerOptions": { | ||
"outDir": "dist/types" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"extends": ["tslint-xo", "tslint-config-prettier"], | ||
"rules": { | ||
"no-require-imports": true, | ||
"max-line-length": [ | ||
true, | ||
{ | ||
"limit": 80, | ||
"ignore-pattern": "^import|^export" | ||
} | ||
], | ||
"max-file-line-count": [true, 500], | ||
"no-namespace": true, | ||
"no-duplicate-imports": true, | ||
"object-literal-sort-keys": false, | ||
"quotemark": [true, "single", "jsx-double"], | ||
"variable-name": [ | ||
true, | ||
"ban-keywords", | ||
"check-format", | ||
"allow-leading-underscore", | ||
"allow-pascal-case" | ||
], | ||
"prefer-const": true, | ||
"prefer-readonly": true, | ||
"prefer-for-of": true, | ||
"comment-format": [ | ||
true, | ||
"check-lowercase", | ||
{ | ||
"ignore-words": ["TODO"] | ||
} | ||
], | ||
"no-for-in": true, | ||
"no-for-in-array": true, | ||
"no-unused-expression": true, | ||
"no-unused-variable": [ | ||
true, | ||
{ | ||
"ignore-pattern": "^_" | ||
} | ||
], | ||
"interface-name": [true, "never-prefix"], | ||
"arrow-return-shorthand": true, | ||
"object-literal-key-quotes": [true, "as-needed"], | ||
"no-void-expression": true, | ||
"prefer-object-spread": true | ||
} | ||
} |
Oops, something went wrong.