Adds basic formating test

[Closes #7]
This commit is contained in:
Caio Gondim
2014-07-15 18:03:20 +02:00
parent 8b11826604
commit e6721c1ed6
3 changed files with 38 additions and 4 deletions

29
Gruntfile.js Normal file
View File

@@ -0,0 +1,29 @@
module.exports = function(grunt) {
"use strict";
grunt.loadNpmTasks('grunt-lintspaces');
var config = {};
config.lintspaces = {
all: {
src: [
'Gruntfile.js',
'makefile',
'bullet-train.zsh-theme',
'README.md'
],
options: {
newline: true,
newlineMaximum: 2,
trailingspaces: true,
indentation: 'spaces',
spaces: 2
}
},
};
grunt.initConfig(config);
grunt.registerTask("test", "lintspaces:all");
};

View File

@@ -1,7 +1,7 @@
# Installs a copy of the theme on the folder `~/.oh-my-zsh/themes/` # Installs a copy of the theme on the folder `~/.oh-my-zsh/themes/`
install: install:
cp ./bullet-train.zsh-theme ~/.oh-my-zsh/themes/bullet-train.zsh-theme cp ./bullet-train.zsh-theme ~/.oh-my-zsh/themes/bullet-train.zsh-theme
# Symlinks the theme for easier development # Symlinks the theme for easier development
link: link:
ln -sF `pwd`/bullet-train.zsh-theme ~/.oh-my-zsh/themes/ ln -sF `pwd`/bullet-train.zsh-theme ~/.oh-my-zsh/themes/

View File

@@ -4,7 +4,7 @@
"description": "A Powerline-like theme for oh-my-zsh", "description": "A Powerline-like theme for oh-my-zsh",
"main": "bullet-train.zsh-theme", "main": "bullet-train.zsh-theme",
"scripts": { "scripts": {
"test": "npm test" "test": "grunt test"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@@ -15,5 +15,10 @@
"bugs": { "bugs": {
"url": "https://github.com/caiogondim/bullet-train-oh-my-zsh-theme/issues" "url": "https://github.com/caiogondim/bullet-train-oh-my-zsh-theme/issues"
}, },
"homepage": "https://github.com/caiogondim/bullet-train-oh-my-zsh-theme" "homepage": "https://github.com/caiogondim/bullet-train-oh-my-zsh-theme",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-lintspaces": "^0.6.0"
}
} }