Skip to content

Commit

Permalink
v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mapaiva committed Jul 9, 2015
1 parent 50de413 commit f202d15
Show file tree
Hide file tree
Showing 51 changed files with 4,145 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
.tern-project
cache
build
.sass-cache
resources/css/all.css.map
61 changes: 61 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

nodewebkit: {

options: {
version: '0.12.0',
build_dir: './build',
mac_icns: './resources/images/icon.icns',
platforms: [
'win',
'osx',
'linux'
]
},

src: [

'./resources/**',

'./app/**',

'./libraries/**',

'./node_modules/**',

'!./node_modules/grunt*/**',

'./index.html',

'./package.json',

'./README.md'
]

},

sass: {
dist: {
files: {
'resources/css/all.css': 'resources/sass/all.scss'
}
}
},

watch: {
css: {
files: '**/*.scss',
tasks: ['sass']
}
}
});

grunt.loadNpmTasks('grunt-node-webkit-builder');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');

grunt.registerTask('build', ['nodewebkit']);
grunt.registerTask('dev', ['sass', 'watch']);
};
76 changes: 75 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,76 @@
# GitPie
A Multiplataform Client for Git
GitPie is a Multiplataform Client for [Git](https://git-scm.com/) that have the goal to be a simple and elegant solution to manage any git project don't matter what git service you use. And the best is 100% open source.

## Warning
The pie is extremely hot! Eat it can hurt!

GitPie is under hard development. And can have a lot of bug and unterminated capabilities. Please go easy and be gentle.

## What's in the pie stuffing?

GitPie is built on [NW.js](https://github.com/nwjs/nw.js) and [Angular](https://github.com/nwjs/nw.js) to have a maintainable and organized source to anyone understand what's going on behind the scenes.

## What's the taste of GitPie?

With GitPie you can:

- Add any Git repository
- Visualize the commit history
- Visualize the number of commits
- Visualize changes per commit
- Visualize changes in files (Not from a beauty way yet :/)
- Add files to commit
- Commit changes
- Pull changes (Only for public projects yet :/)

## Installing

### Linux

Available on 32-bit and 64-bit.

Download the latest Pie from the GitPie release page.

### OS X

Available on 32-bit and 64-bit.

Download the latest Pie from the GitPie release page.

### Windows

Available on 32-bit and 64-bit.

Download the latest Pie from the GitPie release page.

## Contributing
Want to contribute with the project? This is awesome. But before doing that we prepare a recipe to you do it the right way.

- All contributions must adhere to the [Idiomatic.js Style Guide](https://github.com/rwaldron/idiomatic.js), by maintaining the existing coding style.

- Discuss the changes before doing them. Open a issue in the bug tracker describing the contribution you'd like to make, the bug you found or any other ideas you have.

- Fork the project and submit your changes by a Pull Request

- Be the most creative as possible.

## Building

Just execute the follow commands to build the project from source:

```bash
git clone https://github.com/mapaiva/GitPie.git
cd GitPie
npm install
npm install -g grunt-cli
grunt build
```

If you want to make changes in the style of the application, you need to run the dev grunt task that will convert your sass changes into css. For this execute:

```bash
grunt dev
```

## License
Copyright (c) 2015 Matheus Paiva (MIT) The MIT License
87 changes: 87 additions & 0 deletions app/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
var
// Load native UI library
GUI = require('nw.gui'),

// browser window object
WIN = GUI.Window.get(),

// Module to discover the git repository name
GIT_REPO_NAME = require('./node_modules/git-repo-name'),

// Git class that perfoms git commands
GIT = require('./app/core/git');

WIN.focus();

/**
* Show error message on uncaughtException
*/
process.on('uncaughtException', function(err) {
alert(err);
});

/* AngularJS app init */
(function () {
var app = angular.module('gitpie', ['components', 'attributes', 'header', 'content']);

app.factory('CommomService', function () {
var storagedRepos = JSON.parse(localStorage.getItem('repos')) || [],

findWhere = function (array, object) {

for (var i = 0; i < array.length; i++) {

if (array[i][Object.keys(object)[0]] == object[Object.keys(object)[0]]) {
return array[i];
}
}

return null;
},

repositories = [];

storagedRepos.forEach(function (item) {
delete item.$$hashKey;
delete item.selected;

repositories.push(item);
});

return {

addRepository: function (repositoryPath) {

if (repositoryPath) {
var repositoryExists = findWhere(repositories, { path: repositoryPath});

// Easter egg :D
if (repositoryPath.toLowerCase() === 'i have no idea') {
alert('It happends with me all the time too. But let\'s try find your project again!');

} else if (!repositoryExists) {
var name = GIT_REPO_NAME(repositoryPath);

if (name) {
var index = repositories.push({
name: name,
path: repositoryPath
});

localStorage.setItem('repos', JSON.stringify(repositories));

return repositories[index-1];
} else {
alert('Nothing for me here.\n The folder ' + repositoryPath + ' is not a git project');
}
} else {
return repositoryExists;
}
}
},

repositories: repositories
};
});

})();
Loading

0 comments on commit f202d15

Please sign in to comment.