Renommage projet en Pitaya

Cette révision appartient à :
wpetit 2015-08-26 14:08:12 +02:00
Parent 30092c25f3
révision cdf967750d
6 fichiers modifiés avec 41 ajouts et 41 suppressions

Voir le fichier

@ -7,7 +7,7 @@ module.exports = function(grunt) {
var NW_VERSION = '0.12.2';
var BUILD_DIR = 'build';
var BUILD_TARGETS = {
linux_ia32: false,
linux_ia32: true,
linux_x64: true,
win: false,
osx: false
@ -104,12 +104,12 @@ module.exports = function(grunt) {
});
grunt.registerTask('papaye:run', ['download', 'run']);
grunt.registerTask('pitaya:run', ['download', 'run']);
grunt.registerTask(
'papaye:build',
'pitaya:build',
['download', 'build', 'copy:build']
);
grunt.registerTask('default', ['papaye:run']);
grunt.registerTask('default', ['pitaya:run']);
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');

Voir le fichier

@ -1,4 +1,4 @@
# Papaye
# Pitaya
Lanceur d'application pour Linux
@ -13,7 +13,7 @@ Lanceur d'application pour Linux
```
git clone <repo>
cd papaye
cd pitaya
git checkout develop
npm install
npm start
@ -42,7 +42,7 @@ npm start -- --profile=my-profile.json
npm run build
```
Un dossier `papaye-<version>-<target>-<arch>` sera créé dans le répertoire `./build`. Celui ci contient tous les fichiers nécessaires à l'application.
Un dossier `pitaya-<version>-<target>-<arch>` sera créé dans le répertoire `./build`. Celui ci contient tous les fichiers nécessaires à l'application.
## Comment contribuer

Voir le fichier

@ -1,12 +1,12 @@
<html>
<head>
<title>Lanceur - Papaye</title>
<title>Lanceur - Pitaya</title>
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<!-- Application root element -->
<div id="papaye"></div>
<div id="pitaya"></div>
<!-- Templates -->
<script id="items-list-tpl" type="text/x-template">
@ -26,7 +26,7 @@
<!-- Application bootstrapping -->
<script type="text/javascript">
Papaye.start('#papaye')
Pitaya.start('#pitaya')
.then(function() {
console.info('Application started.');
})

Voir le fichier

@ -1,4 +1,4 @@
(function(Papaye, window) {
(function(Pitaya, window) {
"use strict";
@ -11,7 +11,7 @@
var minimist = require('minimist');
// Load templates
var itemsListTpl = Handlebars.compile(Papaye.DOM.select('#items-list-tpl').innerHTML);
var itemsListTpl = Handlebars.compile(Pitaya.DOM.select('#items-list-tpl').innerHTML);
// Internal constants
var DEFAULT_PROFILE = './default-profile.json';
@ -20,19 +20,19 @@
* Start the app
*
* @param rootEl The application root element selector
* @return Papaye
* @return Pitaya
*/
Papaye.start = function(rootEl) {
Pitaya.start = function(rootEl) {
Papaye._opts = minimist(gui.App.argv);
Papaye._rootEl = Papaye.DOM.select(rootEl);
Papaye._initListeners();
Pitaya._opts = minimist(gui.App.argv);
Pitaya._rootEl = Pitaya.DOM.select(rootEl);
Pitaya._initListeners();
var profilePath = Papaye._opts.profile || DEFAULT_PROFILE;
var profilePath = Pitaya._opts.profile || DEFAULT_PROFILE;
return Papaye.loadProfile(profilePath)
return Pitaya.loadProfile(profilePath)
.then(function() {
return Papaye;
return Pitaya;
})
;
@ -44,11 +44,11 @@
* @param profilePath The path of the profile file
* @return Promise
*/
Papaye.loadProfile = function(profilePath) {
return Papaye._loadJSONFile(profilePath)
Pitaya.loadProfile = function(profilePath) {
return Pitaya._loadJSONFile(profilePath)
.then(function(profile) {
Papaye._profile = profile;
Papaye.render();
Pitaya._profile = profile;
Pitaya.render();
return profile;
})
;
@ -57,11 +57,11 @@
/**
* Update the application view
*
* @return Papaye
* @return Pitaya
*/
Papaye.render = function() {
var rootEl = Papaye._rootEl;
var profile = Papaye._profile;
Pitaya.render = function() {
var rootEl = Pitaya._rootEl;
var profile = Pitaya._profile;
rootEl.innerHTML = itemsListTpl(profile);
};
@ -70,19 +70,19 @@
* Initialize DOM event listeners
* @private
*/
Papaye._initListeners = function() {
var rootEl = Papaye._rootEl;
rootEl.addEventListener('click', Papaye._onItemClick);
Pitaya._initListeners = function() {
var rootEl = Pitaya._rootEl;
rootEl.addEventListener('click', Pitaya._onItemClick);
};
/**
* App item click handler
* @private
*/
Papaye._onItemClick = function(evt) {
Pitaya._onItemClick = function(evt) {
var appItemEl = evt.srcElement.matches( '.app-item') ? evt.srcElement :
Papaye.DOM.getClosestAncestor(evt.srcElement, '.app-item')
Pitaya.DOM.getClosestAncestor(evt.srcElement, '.app-item')
;
if( !appItemEl ) return;
@ -109,7 +109,7 @@
* @param filePath The path of the json file
* @return Promise
*/
Papaye._loadJSONFile = function(filePath) {
Pitaya._loadJSONFile = function(filePath) {
return new Promise(function(resolve, reject) {
fs.readFile(filePath, 'utf8', function(err, fileContent) {
if(err) return reject(err);
@ -123,4 +123,4 @@
});
};
}(window.Papaye = window.Papaye || {}, window));
}(window.Pitaya = window.Pitaya || {}, window));

Voir le fichier

@ -1,8 +1,8 @@
(function(Papaye, window) {
(function(Pitaya, window) {
"use strict";
var DOM = Papaye.DOM = {};
var DOM = Pitaya.DOM = {};
/**
* Select an element in the DOM by its CSS selector
@ -50,4 +50,4 @@
};
}(window.Papaye = window.Papaye || {}, window));
}(window.Pitaya = window.Pitaya || {}, window));

Voir le fichier

@ -1,5 +1,5 @@
{
"name": "papaye",
"name": "pitaya",
"version": "0.0.0",
"private": "true",
"main": "index.html",
@ -12,8 +12,8 @@
"lodash": "^3.0.1"
},
"scripts": {
"start": "./node_modules/.bin/grunt papaye:run",
"build": "./node_modules/.bin/grunt papaye:build"
"start": "./node_modules/.bin/grunt pitaya:run",
"build": "./node_modules/.bin/grunt pitaya:build"
},
"chromium-args": "--ignore-certificate-errors",
"window": {