Last active
December 15, 2015 17:49
-
-
Save astronaughts/5298722 to your computer and use it in GitHub Desktop.
Ti.Developers.meeting vol.6
This file contains hidden or 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
Show hidden characters
{ | |
"globals": { | |
"beforeEach": true, | |
"afterEach": true, | |
"describe": true, | |
"it": true, | |
"xdescribe": true, | |
"xit": true, | |
"expect": true, | |
"spyOn": true, | |
"Titanium": true, | |
"Ti": true | |
}, | |
"node": true, | |
"es5": true, | |
"esnext": true, | |
"bitwise": true, | |
"camelcase": false, | |
"curly": true, | |
"eqeqeq": true, | |
"immed": true, | |
"indent": 4, | |
"latedef": false, | |
"newcap": false, | |
"noarg": true, | |
"quotmark": "single", | |
"regexp": true, | |
"undef": true, | |
"unused": false, | |
"strict": true, | |
"trailing": true, | |
"smarttabs": true, | |
"yui": true | |
} |
This file contains hidden or 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
module.exports = function(grunt) { | |
'use strict'; | |
// JSHint の無視ファイル .jshintignore を反映させる | |
var jshintignores = function(){ | |
return grunt.file.read('.jshintignore').trim().split('\n').map(function(s){ | |
return '!' + s; | |
}); | |
}; | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
jshint: { | |
all: [ | |
'Resources/*.js', | |
'Resources/lib/*.js', | |
'Resources/spec/*.js' | |
// jshintignores() | |
], | |
options: { | |
jshintrc: '.jshintrc' | |
} | |
}, | |
watch: { | |
doc: { | |
files: ['Resources/**/*.js'], | |
tasks: ['jshint', 'yuidoc'], | |
options: { | |
interrupt: true | |
} | |
}, | |
dev: { | |
files: ['Resources/**/*.js'], | |
tasks: ['jshint', 'tishadow'], | |
options: { | |
interrupt: true | |
} | |
} | |
}, | |
tishadow: { | |
run: { | |
// update: true | |
}, | |
spec: { | |
// update: true | |
}, | |
server: { | |
// port: 3000 | |
} | |
}, | |
yuidoc: { | |
compile: { | |
name: '<%= pkg.name %>', | |
description: '<%= pkg.description %>', | |
version: '<%= pkg.version %>', | |
url: '<%= pkg.homepage %>', | |
options: { | |
paths: 'Resources/', | |
outdir: 'docs/' | |
} | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-contrib-jshint'); | |
grunt.loadNpmTasks('grunt-contrib-yuidoc'); | |
grunt.loadNpmTasks('grunt-tishadow'); | |
// Default task(s). | |
grunt.registerTask('default', ['tishadow']); | |
grunt.registerTask('gendoc', ['jshint', 'yuidoc']); | |
}; |
This file contains hidden or 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
{ | |
"name": "sampleapp", | |
"version": "0.0.0", | |
"description": "sampleapp project", | |
"main": "Resources/app.js", | |
"scripts": { | |
"test": "grunt spec" | |
}, | |
"devDependencies": { | |
"grunt": "~0.4.1", | |
"grunt-contrib-jshint": "~0.2.0", | |
"grunt-contrib-watch": "~0.3.1", | |
"grunt-contrib-yuidoc": "~0.4.0", | |
"grunt-tishadow": "*" | |
}, | |
"author": "astronaughts", | |
"license": "BSD", | |
"readmeFilename": "README.md" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment