Skip to content

Instantly share code, notes, and snippets.

@astronaughts
Last active December 15, 2015 17:49
Show Gist options
  • Save astronaughts/5298722 to your computer and use it in GitHub Desktop.
Save astronaughts/5298722 to your computer and use it in GitHub Desktop.
Ti.Developers.meeting vol.6
{
"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
}
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']);
};
{
"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