Skip to content

Commit f202d15

Browse files
committed
v0.0.1
1 parent 50de413 commit f202d15

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+4145
-1
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
.tern-project
3+
cache
4+
build
5+
.sass-cache
6+
resources/css/all.css.map

Gruntfile.js

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
module.exports = function(grunt) {
2+
grunt.initConfig({
3+
pkg: grunt.file.readJSON('package.json'),
4+
5+
nodewebkit: {
6+
7+
options: {
8+
version: '0.12.0',
9+
build_dir: './build',
10+
mac_icns: './resources/images/icon.icns',
11+
platforms: [
12+
'win',
13+
'osx',
14+
'linux'
15+
]
16+
},
17+
18+
src: [
19+
20+
'./resources/**',
21+
22+
'./app/**',
23+
24+
'./libraries/**',
25+
26+
'./node_modules/**',
27+
28+
'!./node_modules/grunt*/**',
29+
30+
'./index.html',
31+
32+
'./package.json',
33+
34+
'./README.md'
35+
]
36+
37+
},
38+
39+
sass: {
40+
dist: {
41+
files: {
42+
'resources/css/all.css': 'resources/sass/all.scss'
43+
}
44+
}
45+
},
46+
47+
watch: {
48+
css: {
49+
files: '**/*.scss',
50+
tasks: ['sass']
51+
}
52+
}
53+
});
54+
55+
grunt.loadNpmTasks('grunt-node-webkit-builder');
56+
grunt.loadNpmTasks('grunt-contrib-sass');
57+
grunt.loadNpmTasks('grunt-contrib-watch');
58+
59+
grunt.registerTask('build', ['nodewebkit']);
60+
grunt.registerTask('dev', ['sass', 'watch']);
61+
};

README.md

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,76 @@
11
# GitPie
2-
A Multiplataform Client for Git
2+
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.
3+
4+
## Warning
5+
The pie is extremely hot! Eat it can hurt!
6+
7+
GitPie is under hard development. And can have a lot of bug and unterminated capabilities. Please go easy and be gentle.
8+
9+
## What's in the pie stuffing?
10+
11+
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.
12+
13+
## What's the taste of GitPie?
14+
15+
With GitPie you can:
16+
17+
- Add any Git repository
18+
- Visualize the commit history
19+
- Visualize the number of commits
20+
- Visualize changes per commit
21+
- Visualize changes in files (Not from a beauty way yet :/)
22+
- Add files to commit
23+
- Commit changes
24+
- Pull changes (Only for public projects yet :/)
25+
26+
## Installing
27+
28+
### Linux
29+
30+
Available on 32-bit and 64-bit.
31+
32+
Download the latest Pie from the GitPie release page.
33+
34+
### OS X
35+
36+
Available on 32-bit and 64-bit.
37+
38+
Download the latest Pie from the GitPie release page.
39+
40+
### Windows
41+
42+
Available on 32-bit and 64-bit.
43+
44+
Download the latest Pie from the GitPie release page.
45+
46+
## Contributing
47+
Want to contribute with the project? This is awesome. But before doing that we prepare a recipe to you do it the right way.
48+
49+
- All contributions must adhere to the [Idiomatic.js Style Guide](https://github.com/rwaldron/idiomatic.js), by maintaining the existing coding style.
50+
51+
- 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.
52+
53+
- Fork the project and submit your changes by a Pull Request
54+
55+
- Be the most creative as possible.
56+
57+
## Building
58+
59+
Just execute the follow commands to build the project from source:
60+
61+
```bash
62+
git clone https://github.com/mapaiva/GitPie.git
63+
cd GitPie
64+
npm install
65+
npm install -g grunt-cli
66+
grunt build
67+
```
68+
69+
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:
70+
71+
```bash
72+
grunt dev
73+
```
74+
75+
## License
76+
Copyright (c) 2015 Matheus Paiva (MIT) The MIT License

app/app.js

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
var
2+
// Load native UI library
3+
GUI = require('nw.gui'),
4+
5+
// browser window object
6+
WIN = GUI.Window.get(),
7+
8+
// Module to discover the git repository name
9+
GIT_REPO_NAME = require('./node_modules/git-repo-name'),
10+
11+
// Git class that perfoms git commands
12+
GIT = require('./app/core/git');
13+
14+
WIN.focus();
15+
16+
/**
17+
* Show error message on uncaughtException
18+
*/
19+
process.on('uncaughtException', function(err) {
20+
alert(err);
21+
});
22+
23+
/* AngularJS app init */
24+
(function () {
25+
var app = angular.module('gitpie', ['components', 'attributes', 'header', 'content']);
26+
27+
app.factory('CommomService', function () {
28+
var storagedRepos = JSON.parse(localStorage.getItem('repos')) || [],
29+
30+
findWhere = function (array, object) {
31+
32+
for (var i = 0; i < array.length; i++) {
33+
34+
if (array[i][Object.keys(object)[0]] == object[Object.keys(object)[0]]) {
35+
return array[i];
36+
}
37+
}
38+
39+
return null;
40+
},
41+
42+
repositories = [];
43+
44+
storagedRepos.forEach(function (item) {
45+
delete item.$$hashKey;
46+
delete item.selected;
47+
48+
repositories.push(item);
49+
});
50+
51+
return {
52+
53+
addRepository: function (repositoryPath) {
54+
55+
if (repositoryPath) {
56+
var repositoryExists = findWhere(repositories, { path: repositoryPath});
57+
58+
// Easter egg :D
59+
if (repositoryPath.toLowerCase() === 'i have no idea') {
60+
alert('It happends with me all the time too. But let\'s try find your project again!');
61+
62+
} else if (!repositoryExists) {
63+
var name = GIT_REPO_NAME(repositoryPath);
64+
65+
if (name) {
66+
var index = repositories.push({
67+
name: name,
68+
path: repositoryPath
69+
});
70+
71+
localStorage.setItem('repos', JSON.stringify(repositories));
72+
73+
return repositories[index-1];
74+
} else {
75+
alert('Nothing for me here.\n The folder ' + repositoryPath + ' is not a git project');
76+
}
77+
} else {
78+
return repositoryExists;
79+
}
80+
}
81+
},
82+
83+
repositories: repositories
84+
};
85+
});
86+
87+
})();

0 commit comments

Comments
 (0)