Skip to content

Commit

Permalink
Init repo, add package.json, lint and test
Browse files Browse the repository at this point in the history
  • Loading branch information
arrowrowe committed Sep 21, 2015
1 parent 841a13f commit 4a6fe43
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage
15 changes: 15 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"rules": {
"indent": [2, 2, {"SwitchCase": 1}],

This comment has been minimized.

Copy link
@at15

at15 Sep 22, 2015

Collaborator

did you add .editorconfig? I think indent 2 is not the default for phpstorm

This comment has been minimized.

Copy link
@arrowrowe

arrowrowe Sep 22, 2015

Author Owner

Not yet... Cause I am using Sublime now......

This comment has been minimized.

Copy link
@at15

at15 Sep 23, 2015

Collaborator

sublime also support .editorconfig, besides you got a new laptop. why use sublime

This comment has been minimized.

Copy link
@arrowrowe

arrowrowe Sep 23, 2015

Author Owner

.editorconfig added in c37eb52.

I may use PhpStorm again after beginning to write PHP......

This comment has been minimized.

Copy link
@at15

at15 Sep 23, 2015

Collaborator

phpstorm == webstorm + php

"quotes": [2, "single"],
"linebreak-style": [2, "unix"],
"semi": [2, "always"]
},
"env": {
"node": true,
"browser": true,
"jquery": true,
"mocha": true
},
"extends": "eslint:recommended"
}
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
version: require('./package.json').version

This comment has been minimized.

Copy link
@at15

at15 Sep 22, 2015

Collaborator

:)

};
32 changes: 32 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "tam",
"version": "0.0.1",
"description": "Tam is the Assets Manager for you.",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/arrowrowe/tam.git"
},
"author": "arrowrowe",
"license": "MIT",
"bugs": {
"url": "https://github.com/arrowrowe/tam/issues",
"email": "[email protected]"
},
"homepage": "https://github.com/arrowrowe/tam",
"devDependencies": {
"expect": "^1.10.0",
"ghooks": "^0.3.2",
"istanbul": "^0.3.20",
"mocha": "^2.3.3"
},
"scripts": {
"check": "eslint .",
"test": "istanbul cover _mocha 'test/**/*-spec.js' -- -R spec"
},
"config": {
"ghooks": {
"pre-commit": "npm run check && npm test"
}
}
}
10 changes: 10 additions & 0 deletions test/index-spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var tam = require('../index');
var expect = require('expect');

describe('Require tam', function () {

it('Check tam\'s version', function () {
expect(tam.version).toMatch(/^\d+\.\d+\.\d+$/);
});

});

0 comments on commit 4a6fe43

Please sign in to comment.