Skip to content

Commit

Permalink
Convert to typescript (unfinished)
Browse files Browse the repository at this point in the history
  • Loading branch information
gilmoreg committed Dec 30, 2018
1 parent c98c853 commit 311c596
Show file tree
Hide file tree
Showing 17 changed files with 5,270 additions and 1,046 deletions.
13 changes: 0 additions & 13 deletions .eslintrc.json

This file was deleted.

127 changes: 64 additions & 63 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,63 +1,64 @@
# 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

# next.js build output
.next

notes
# 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 (http://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

# Visual Studio settings
.vs

# Build Output
dist/
7 changes: 7 additions & 0 deletions .yo-rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"generator-userscript": {
"promptValues": {
"namespace": "http://gilmoreg.com"
}
}
}
81 changes: 81 additions & 0 deletions meta.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"definitions": {
"nonEmptyString": {
"type": "string",
"minLength": 1
},
"multiString": {
"anyOf": [
{ "$ref": "#/definitions/nonEmptyString" },
{
"type": "array",
"items": { "$ref": "#/definitions/nonEmptyString" },
"uniqueItems": true
}
]
}
},
"type": "object",
"properties": {
"name": { "$ref": "#/definitions/nonEmptyString" },
"description": { "type": "string" },
"namespace": { "$ref": "#/definitions/nonEmptyString" },
"version": { "$ref": "#/definitions/nonEmptyString" },
"downloadURL": { "$ref": "#/definitions/nonEmptyString" },
"updateURL": { "$ref": "#/definitions/nonEmptyString" },
"icon": { "$ref": "#/definitions/nonEmptyString" },
"include": { "$ref": "#/definitions/multiString" },
"exclude": { "$ref": "#/definitions/multiString" },
"match": { "$ref": "#/definitions/multiString" },
"require": { "$ref": "#/definitions/multiString" },
"resource": { "$ref": "#/definitions/multiString" },
"grant": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"unsafeWindow",
"GM_getValue",
"GM_setValue",
"GM_listValues",
"GM_deleteValue",
"GM_getResourceText",
"GM_getResourceURL",
"GM_addStyle",
"GM_log",
"GM_openInTab",
"GM_registerMenuCommand",
"GM_setClipboard",
"GM_xmlhttpRequest"
]
},
"uniqueItems": true
},
{
"type": "string",
"enum": [ "none" ]
}
],
"default": "none"
},
"run-at": {
"type": "string",
"enum": [ "document-end", "document-start", "document-idle" ],
"default": "document-end"
},
"noframes": {
"type": "boolean",
"default": false
}
},
"additionalProperties": {
"anyOf": [
{ "$ref": "#/definitions/multiString" },
{ "type": "boolean" }
]
},
"required": ["name", "namespace", "version"]
}
Loading

0 comments on commit 311c596

Please sign in to comment.