Skip to content

Commit ea6842d

Browse files
author
Trygve Wastvedt
committed
Initial version
0 parents  commit ea6842d

18 files changed

+261
-0
lines changed

Diff for: .editorconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.md]
11+
trim_trailing_whitespace = false

Diff for: .gitignore

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
13+
14+
# Coverage directory used by tools like istanbul
15+
coverage
16+
17+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
18+
.grunt
19+
20+
# node-waf configuration
21+
.lock-wscript
22+
23+
# Compiled binary addons (http://nodejs.org/api/addons.html)
24+
build/Release
25+
26+
# Dependency directory
27+
bower_components
28+
jspm_packages
29+
node_modules
30+
31+
# Optional npm cache directory
32+
.npm
33+
34+
# Optional REPL history
35+
.node_repl_history
36+
37+
# webstorm
38+
.idea
39+
40+
# typings
41+
typings
42+
43+
# output folder
44+
out

Diff for: .gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "source"]
2+
path = source
3+
url = https://github.com/stubailo/meteor-rest

Diff for: .npmignore

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
13+
14+
# Coverage directory used by tools like istanbul
15+
coverage
16+
17+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
18+
.grunt
19+
20+
# node-waf configuration
21+
.lock-wscript
22+
23+
# Compiled binary addons (http://nodejs.org/api/addons.html)
24+
build/Release
25+
26+
# Dependency directory
27+
bower_components
28+
jspm_packages
29+
node_modules
30+
31+
# Optional npm cache directory
32+
.npm
33+
34+
# Optional REPL history
35+
.node_repl_history
36+
37+
# webstorm
38+
.idea
39+
40+
# typings
41+
typings
42+
43+
# output folder
44+
out

Diff for: .travis.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
language: node_js
2+
3+
notifications:
4+
email:
5+
on_success: never
6+
on_failure: change
7+
8+
node_js:
9+
- "stable"
10+
11+
script:
12+
- npm run lint+build+test

Diff for: .vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib"
3+
}

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Trygve Wastvedt ([email protected])
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
13+
all 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
21+
THE SOFTWARE.

Diff for: README.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Typed Meteor Rest
2+
The type definition for [`meteor-rest`](https://github.com/stubailo/meteor-rest)
3+
4+
## LICENSE
5+
MIT
6+
7+
## Contributing
8+
9+
```sh
10+
# Fork this repo
11+
npm install
12+
13+
npm run watch
14+
15+
# add tests, make changes, pass tests ... then [ctrl+c]
16+
npm run publish
17+
```
18+
19+
## Updating
20+
Update `typings.json/version` to match the source version you are typing against.
21+
e.g. if you are creating typings for `[email protected]`, then:
22+
```js
23+
// typings.json
24+
{
25+
"version": "3.5.0"
26+
// ...
27+
}
28+
```

Diff for: index.d.ts

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
declare module "meteor/meteor" {
2+
import { Mongo } from "meteor/mongo";
3+
4+
export module Meteor {
5+
function publish(name: string, func: Function, options: {
6+
url: string,
7+
httpMethod: 'get' | 'head' | 'post' | 'put' | 'delete' | 'trace' | 'options' | 'connect' | 'patch'
8+
}): void;
9+
}
10+
}

Diff for: package.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"private": true,
3+
"scripts": {
4+
"build": "echo building... && typings bundle -o out",
5+
"lint": "echo linting... && tslint \"**/*.ts\" -e \"source/**\" -e \"source-test/**\" -e \"out/**\" -e \"node_modules/**\" -e \"typings/**\"",
6+
"test": "echo testing... && cd test && ts-node ../node_modules/blue-tape/bin/blue-tape \"**/*.ts\" | tap-spec",
7+
"source-test": "echo source-testing... && echo source-test is not specified",
8+
"watch": "onchange \"**/*.ts\" -i -e \"out/**\" -- npm -s run build+test",
9+
"publish": "npm -s run lint+build+test && echo please publish to typings/registry",
10+
"source-test+test": "npm run source-test && npm test",
11+
"build+test": "npm run build && npm run source-test+test",
12+
"lint+build+test": "npm run lint && npm run build+test",
13+
"prepublish": "typings install"
14+
},
15+
"devDependencies": {
16+
"blue-tape": "^0.2.0",
17+
"onchange": "^2.2.0",
18+
"tap-spec": "^4.1.1",
19+
"ts-node": "^0.7.1",
20+
"tslint": "^3.7.0",
21+
"tslint-config-typings": "^0.2.0",
22+
"typescript": "^1.8.9",
23+
"typings": "^0.7.11"
24+
}
25+
}

Diff for: source

Submodule source added at 7a1a394

Diff for: source-test/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Source tests
2+
- Change `package.json/script/source-test` to match the test harness used by the source
3+
- Copy test files from `source` and save them as `*.ts` here
4+
- Make necessary changes to the test files

Diff for: source-test/tsconfig.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"moduleResolution": "node"
5+
},
6+
"files": [
7+
"../typings/main.d.ts",
8+
"../out/main.d.ts"
9+
]
10+
}

Diff for: test/test.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import test = require('blue-tape');
2+
3+
import meteorRest = require('meteor-rest');

Diff for: test/tsconfig.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"moduleResolution": "node"
5+
},
6+
"files": [
7+
"../typings/main.d.ts",
8+
"../out/main.d.ts"
9+
]
10+
}

Diff for: tsconfig.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"moduleResolution": "node",
5+
"outDir": "out"
6+
},
7+
"exclude": [
8+
"node_modules",
9+
"typings/browser",
10+
"typings/browser.d.ts",
11+
"out/browser.d.ts",
12+
"source"
13+
]
14+
}

Diff for: tslint.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "tslint-config-typings"
3+
}

Diff for: typings.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "meteor-rest",
3+
"main": "index.d.ts",
4+
"homepage": "https://github.com/stubailo/meteor-rest",
5+
"version": "",
6+
"devDependencies": {
7+
"blue-tape": "registry:npm/blue-tape#0.1.0+20160322235613"
8+
},
9+
"ambientDevDependencies": {
10+
"node": "registry:dt/node#4.0.0+20160319033040"
11+
},
12+
"ambientDependencies": {
13+
"meteor": "https://gist.githubusercontent.com/tomitrescak/8366ce98f1857e202ea8/raw/4c8850ad8174de2662f92c87328280838e0ab5fd/meteor.d.ts"
14+
}
15+
}

0 commit comments

Comments
 (0)