Skip to content

Commit 9bc36ec

Browse files
committed
Initial project setup
1 parent 5968821 commit 9bc36ec

8 files changed

+211
-0
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
*.log
3+
lib
4+
coverage
5+
mobx-state-tree.umd.js

.travis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
language: node_js
2+
script: npm run coverage
3+
after_success:
4+
- cat ./coverage/lcov.info|./node_modules/coveralls/bin/coveralls.js
5+
node_js:
6+
- "4.0.0"

.vscode/settings.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
"editor.insertSpaces": true,
4+
"editor.trimAutoWhitespace": true,
5+
"editor.trimTrailingWhitespace": true,
6+
"tslint.configFile": "tslint.json"
7+
}

LICENSE

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

package.json

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"name": "mobx-state-tree",
3+
"version": "0.0.1",
4+
"description": "Opinionated state container for MobX powered applications",
5+
"main": "lib/mobx-state-tree.js",
6+
"typings": "lib/mobx-state-tree.d.ts",
7+
"scripts": {
8+
"build": "tsc -p src && npm run webpack",
9+
"webpack": "webpack -p",
10+
"test": "npm run build && tape test/*.js | faucet",
11+
"prepublish": "npm run build && npm run build-docs",
12+
"test-travis": "npm run build && istanbul cover tape test/*.js",
13+
"coverage": "npm run build && istanbul cover tape test/*.js && cat ./coverage/lcov.info|coveralls",
14+
"build-docs": "npm run build && documentation readme lib/mobx-state-tree.js --github --section API"
15+
},
16+
"repository": {
17+
"type": "git",
18+
"url": "https://github.com/mobxjs/mobx-state-tree.git"
19+
},
20+
"author": "Michel Weststrate",
21+
"license": "MIT",
22+
"bugs": {
23+
"url": "https://github.com/mobxjs/mobx-state-tree/issues"
24+
},
25+
"files": [
26+
"lib/",
27+
"mobx-state-tree.umd.js"
28+
],
29+
"devDependencies": {
30+
"coveralls": "^2.11.4",
31+
"documentation": "^4.0.0-beta9",
32+
"faucet": "0.0.1",
33+
"istanbul": "^0.3.21",
34+
"mobx": "^2.4.4",
35+
"tape": "^4.2.2",
36+
"tslint": "^3.15.1",
37+
"typescript": "^2.0.0",
38+
"webpack": "^1.13.1"
39+
},
40+
"dependencies": {},
41+
"peerDependencies": {
42+
"mobx": "^2.4.4"
43+
},
44+
"keywords": [
45+
"mobx",
46+
"mobx-state-tree",
47+
"promise",
48+
"reactive",
49+
"frp",
50+
"functional-reactive-programming",
51+
"state management"
52+
]
53+
}

src/tsconfig.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "2.0.0",
3+
"compilerOptions": {
4+
"target": "es5",
5+
"sourceMap": false,
6+
"declaration": true,
7+
"module": "commonjs",
8+
"removeComments": false,
9+
"outDir": "../lib/",
10+
"noImplicitAny": false,
11+
"moduleResolution": "node",
12+
"experimentalDecorators": true,
13+
"strictNullChecks": true
14+
},
15+
"exclude": [
16+
"node_modules"
17+
]
18+
}

tslint.json

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"rules": {
3+
"class-name": true,
4+
"comment-format": [
5+
true,
6+
"check-space"
7+
],
8+
"curly": false,
9+
"indent": [
10+
true,
11+
"spaces"
12+
],
13+
"interface-name": true,
14+
"jsdoc-format": true,
15+
"no-consecutive-blank-lines" : true,
16+
"no-debugger": true,
17+
"no-duplicate-key": true,
18+
"no-duplicate-variable": true,
19+
"no-eval": true,
20+
"no-internal-module": true,
21+
"no-trailing-whitespace": true,
22+
"no-shadowed-variable": true,
23+
"no-switch-case-fall-through": true,
24+
"no-unreachable": true,
25+
"no-unused-expression": true,
26+
"no_unused-variable": [
27+
true,
28+
"check-parameters"
29+
],
30+
"no-use-before-declare": false,
31+
"no-var-keyword": true,
32+
"one-line": [
33+
true,
34+
"check-open-brace",
35+
"check-whitespace",
36+
"check-catch"
37+
],
38+
"quotemark": [
39+
true,
40+
"double"
41+
],
42+
"semicolon": [true, "never"],
43+
"trailing-comma": [
44+
true,
45+
{
46+
"multiline": "never",
47+
"singleline": "never"
48+
}
49+
],
50+
"triple-equals": [
51+
true,
52+
"allow-null-check"
53+
],
54+
"typedef-whitespace": [
55+
true,
56+
{
57+
"call-signature": "nospace",
58+
"index-signature": "nospace",
59+
"parameter": "nospace",
60+
"property-declaration": "nospace",
61+
"variable-declaration": "nospace"
62+
}
63+
],
64+
"variable-name": [
65+
true,
66+
"ban-keywords"
67+
],
68+
"whitespace": [
69+
true,
70+
"check-branch",
71+
"check-decl",
72+
"check-operator",
73+
"check-separator",
74+
"check-type"
75+
]
76+
}
77+
}

webpack.config.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
var webpack = require('webpack');
2+
3+
module.exports = {
4+
entry: './lib/mobx-state-tree.js',
5+
output: {
6+
libraryTarget: 'umd',
7+
library: 'mobxStateTree',
8+
path: __dirname,
9+
filename: 'mobx-state-tree.umd.js'
10+
},
11+
resolve: {
12+
extensions: ['', '.js'],
13+
},
14+
externals: {
15+
mobx: 'mobx'
16+
},
17+
plugins: [
18+
new webpack.optimize.UglifyJsPlugin({
19+
compress: {
20+
warnings: false
21+
}
22+
})
23+
]
24+
};

0 commit comments

Comments
 (0)