Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy351 committed Jan 6, 2015
2 parents 78d27d5 + 47fd542 commit 240cbfa
Show file tree
Hide file tree
Showing 369 changed files with 15,395 additions and 13,336 deletions.
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
node_modules
tmp
debug.log
.idea
node_modules/
tmp/
*.log
.idea/
coverage/
11 changes: 9 additions & 2 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"-W103": true,
"eqnull": true,
"expr": true,
"indent": 2
"indent": 2,
"node": true,
"trailing": true,
"quotmark": "single",
"undef": true,
"unused": "vars",
"globals": {
"Promise": true
}
}
10 changes: 8 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
test/
tmp
debug.log
tmp/
coverage/
*.log
.jshintrc
.travis.yml
gulpfile.js
.idea/
appveyor.yml
14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
language: node_js

node_js:
- "0.10"
- "0.11"
before_script:
- npm install -g gulp

script:
- npm test

after_script:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
- cat ./coverage/lcov.info | ./node_modules/codeclimate-test-reporter/bin/codeclimate.js

addons:
code_climate:
repo_token: 161a304c89a989fd09844b22ad0b3af84a930cea8915350b82ecd8fa12c92985
8 changes: 0 additions & 8 deletions Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Hexo

[![Build Status](https://travis-ci.org/hexojs/hexo.svg?branch=master)](https://travis-ci.org/hexojs/hexo) [![NPM version](https://badge.fury.io/js/hexo.svg)](http://badge.fury.io/js/hexo)
[![Build Status](https://travis-ci.org/hexojs/hexo.svg?branch=master)](https://travis-ci.org/hexojs/hexo) [![NPM version](https://badge.fury.io/js/hexo.svg)](http://badge.fury.io/js/hexo) [![Coverage Status](https://img.shields.io/coveralls/hexojs/hexo.svg)](https://coveralls.io/r/hexojs/hexo?branch=master) [![Code Climate](https://codeclimate.com/github/hexojs/hexo/badges/gpa.svg)](https://codeclimate.com/github/hexojs/hexo) [![Build status](https://ci.appveyor.com/api/projects/status/hpx3lduqjj2t6uqq/branch/master?svg=true)](https://ci.appveyor.com/project/tommy351/hexo/branch/master)

A fast, simple & powerful blog framework, powered by [Node.js](http://nodejs.org).

Expand Down
40 changes: 40 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Based on https://github.com/gruntjs/grunt/blob/master/appveyor.yml
# http://www.appveyor.com/docs/appveyor-yml

# Fix line endings in Windows. (runs before repo cloning)
init:
- git config --global core.autocrlf input

# Test against these versions of Node.js.
environment:
matrix:
- nodejs_version: "0.10"
- nodejs_version: "0.11"

# Allow failing jobs for bleeding-edge Node.js versions.
matrix:
allow_failures:
- nodejs_version: "0.11"

# Install scripts. (runs after repo cloning)
install:
# Get the latest stable version of Node 0.STABLE.latest
- ps: Install-Product node $env:nodejs_version
# Typical npm stuff.
- npm install

# Post-install test scripts.
test_script:
# Output useful info for debugging.
- node --version
- npm --version
# We test multiple Windows shells because of prior stdout buffering issues
# filed against Grunt. https://github.com/joyent/node/issues/3584
- ps: "npm test # PowerShell" # Pass comment to PS for easier debugging
- cmd: npm test

# Don't actually build.
build: off

# Set build version format here instead of in the admin panel.
version: "{build}"
18 changes: 0 additions & 18 deletions assets/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,6 @@ default_category: uncategorized
category_map:
tag_map:

# Archives
## 2: Enable pagination
## 1: Disable pagination
## 0: Fully Disable
archive: 2
category: 2
tag: 2

# Server
## Hexo uses Connect as a server
## You can customize the logger format as defined in
## http://www.senchalabs.org/connect/logger.html
port: 4000
server_ip: localhost
logger: false
logger_format: dev

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
Expand All @@ -80,7 +63,6 @@ disqus_shortname:
## Plugins: https://github.com/hexojs/hexo/wiki/Plugins
## Themes: https://github.com/hexojs/hexo/wiki/Themes
theme: landscape
exclude_generator:

# Deployment
## Docs: http://hexo.io/docs/deployment.html
Expand Down
2 changes: 1 addition & 1 deletion assets/gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DS_Store
Thumbs.db
db.json
debug.log
*.log
node_modules/
public/
.deploy/
7 changes: 6 additions & 1 deletion assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
"version": "",
"private": true,
"dependencies": {
"hexo-generator-archive": "*",
"hexo-generator-category": "*",
"hexo-generator-index": "*",
"hexo-generator-tag": "*",
"hexo-renderer-ejs": "*",
"hexo-renderer-stylus": "*",
"hexo-renderer-marked": "*"
"hexo-renderer-marked": "*",
"hexo-server": "*"
}
}
31 changes: 2 additions & 29 deletions bin/hexo
Original file line number Diff line number Diff line change
@@ -1,32 +1,5 @@
#!/usr/bin/env node

var args = require('minimist')(process.argv.slice(2)),
fs = require('graceful-fs'),
path = require('path'),
async = require('async'),
init = require('../lib/init'),
cwd = process.cwd(),
lastCwd = cwd;
var args = require('minimist')(process.argv.slice(2));

// Find Hexo folder recursively
async.doUntil(
function(next){
var configFile = path.join(cwd, '_config.yml');

fs.exists(configFile, function(exist){
if (exist){
init(cwd, args);
} else {
lastCwd = cwd;
cwd = path.dirname(cwd);
next();
}
});
},
function(){
return cwd === lastCwd;
},
function(){
init(process.cwd(), args);
}
);
require('../lib/cli/init')(args);
37 changes: 23 additions & 14 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
mocha = require('gulp-mocha'),
path = require('path');
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var del = require('del');

var lib = 'lib/**/*.js',
test = 'test/scripts/**/*.js';
var lib = 'lib/**/*.js';
var test = 'test/scripts/**/*.js';

gulp.task('mocha', function(){
gulp.task('coverage', function(){
return gulp.src(lib)
.pipe($.istanbul())
.pipe($.istanbul.hookRequire());
});

gulp.task('coverage:clean', function(callback){
del(['coverage/**/*'], callback);
});

gulp.task('mocha', ['coverage'], function(){
return gulp.src('test/index.js')
.pipe(mocha({
reporter: 'spec',
ignoreLeaks: true
}));
.pipe($.mocha({
reporter: 'spec'
}))
.pipe($.istanbul.writeReports());
});

gulp.task('jshint', function(){
return gulp.src(lib)
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter('fail'));
.pipe($.jshint())
.pipe($.jshint.reporter('jshint-stylish'))
.pipe($.jshint.reporter('fail'));
});

gulp.task('watch', function(){
Expand Down

0 comments on commit 240cbfa

Please sign in to comment.