如何在開發的過程中加入測試。
- Model
- Repository
- Controller
- Auth
{ | |
"name": "sass_test", | |
"version": "0.1.0", | |
"author": { | |
"name": "WinWu", | |
"url": "http://yiyingloveart.blogspot.tw/" | |
}, | |
"devDependencies": { | |
"grunt": "~0.4.1", | |
"grunt-contrib-sass": "~0.5.0" |
module.exports = function(grunt){ | |
grunt.initConfig({ | |
pkg : grunt.file.readJSON('package.json'), | |
sass:{ | |
dist: { | |
options:{ | |
style: 'expanded' | |
}, | |
files:{ | |
'style.css': 'style.sass', |
var fs = require("fs"); | |
var file = "./test.db"; | |
//載入 sqlite3 | |
var sqlite3 = require("sqlite3").verbose(); | |
//new 一個 sqlite 的 database,檔案是 test.db | |
var db = new sqlite3.Database(file); | |
db.serialize(function() { | |
//db.run 如果 Staff 資料表不存在,那就建立 Staff 資料表 |
// Gulpfile.js | |
// Require the needed packages | |
var gulp = require('gulp'); | |
var stylus = require('gulp-stylus'); | |
var watch = require('gulp-watch'); | |
// Get and render all .styl files recursively | |
gulp.task('stylus', function () { | |
gulp.src('app/views/assets/resources/stylus/**/*.styl') | |
.pipe(watch(function(files){ |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view from its nib. | |
self.title = NSLocalizedString(@"Menu", nil); | |
self.menus = @[@"My Account", @"Menu 2", @"Menu 3", @"Menu 4"]; | |
[self.view addSubview: self.nameLabel]; |
{ | |
"banner":{ | |
"back":[ | |
{ | |
"uid":"WyCE4MnL7sFqs9Vufh1jz9xDpfHD7Mag", | |
"src":"http://localhost:8080/banner/WyCE/4MnL/7sFq/s9Vu/586692876d5bd2b447731bae4394f57a", | |
"alt":"所以新圖都沒問提??" | |
} | |
] | |
}, |
{ | |
"landmark":[ | |
{ | |
"name":"熱門景點", | |
"ids":[ | |
4, | |
11 | |
] | |
} | |
], |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
'ftp-deploy': { | |
build: { | |
auth: { | |
host: 'XXX.com', | |
port: 21, | |
authKey: 'key1', |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
root /var/www/YOUR_PROJECT/public; | |
index index.php index.html index.htm; | |
# Make site accessible from http://localhost/ | |
server_name YOUR_IP_OR_DOMAIN; |