Browse Source

Renommage projet en Pitaya

feature/profil_enr
William Petit 4 years ago
parent
commit
cdf967750d
6 changed files with 41 additions and 41 deletions
  1. 4
    4
      Gruntfile.js
  2. 3
    3
      README.md
  3. 3
    3
      index.html
  4. 25
    25
      js/app.js
  5. 3
    3
      js/dom.js
  6. 3
    3
      package.json

+ 4
- 4
Gruntfile.js View File

@@ -7,7 +7,7 @@ module.exports = function(grunt) {
7 7
   var NW_VERSION = '0.12.2';
8 8
   var BUILD_DIR = 'build';
9 9
   var BUILD_TARGETS = {
10
-    linux_ia32: false,
10
+    linux_ia32: true,
11 11
     linux_x64: true,
12 12
     win: false,
13 13
     osx: false
@@ -104,12 +104,12 @@ module.exports = function(grunt) {
104 104
 
105 105
   });
106 106
 
107
-  grunt.registerTask('papaye:run',  ['download', 'run']);
107
+  grunt.registerTask('pitaya:run',  ['download', 'run']);
108 108
   grunt.registerTask(
109
-    'papaye:build',
109
+    'pitaya:build',
110 110
     ['download', 'build', 'copy:build']
111 111
   );
112
-  grunt.registerTask('default', ['papaye:run']);
112
+  grunt.registerTask('default', ['pitaya:run']);
113 113
 
114 114
   grunt.loadNpmTasks('grunt-contrib-clean');
115 115
   grunt.loadNpmTasks('grunt-contrib-copy');

+ 3
- 3
README.md View File

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

+ 3
- 3
index.html View File

@@ -1,12 +1,12 @@
1 1
 <html>
2 2
   <head>
3
-    <title>Lanceur - Papaye</title>
3
+    <title>Lanceur - Pitaya</title>
4 4
     <link rel="stylesheet" href="css/style.css" />
5 5
   </head>
6 6
   <body>
7 7
 
8 8
     <!-- Application root element -->
9
-    <div id="papaye"></div>
9
+    <div id="pitaya"></div>
10 10
 
11 11
     <!-- Templates -->
12 12
     <script id="items-list-tpl" type="text/x-template">
@@ -26,7 +26,7 @@
26 26
 
27 27
     <!-- Application bootstrapping -->
28 28
     <script type="text/javascript">
29
-      Papaye.start('#papaye')
29
+      Pitaya.start('#pitaya')
30 30
         .then(function() {
31 31
           console.info('Application started.');
32 32
         })

+ 25
- 25
js/app.js View File

@@ -1,4 +1,4 @@
1
-(function(Papaye, window) {
1
+(function(Pitaya, window) {
2 2
 
3 3
   "use strict";
4 4
 
@@ -11,7 +11,7 @@
11 11
   var minimist = require('minimist');
12 12
 
13 13
   // Load templates
14
-  var itemsListTpl = Handlebars.compile(Papaye.DOM.select('#items-list-tpl').innerHTML);
14
+  var itemsListTpl = Handlebars.compile(Pitaya.DOM.select('#items-list-tpl').innerHTML);
15 15
 
16 16
   // Internal constants
17 17
   var DEFAULT_PROFILE = './default-profile.json';
@@ -20,19 +20,19 @@
20 20
    * Start the app
21 21
    *
22 22
    * @param rootEl The application root element selector
23
-   * @return Papaye
23
+   * @return Pitaya
24 24
    */
25
-  Papaye.start = function(rootEl) {
25
+  Pitaya.start = function(rootEl) {
26 26
 
27
-    Papaye._opts = minimist(gui.App.argv);
28
-    Papaye._rootEl = Papaye.DOM.select(rootEl);
29
-    Papaye._initListeners();
27
+    Pitaya._opts = minimist(gui.App.argv);
28
+    Pitaya._rootEl = Pitaya.DOM.select(rootEl);
29
+    Pitaya._initListeners();
30 30
 
31
-    var profilePath = Papaye._opts.profile || DEFAULT_PROFILE;
31
+    var profilePath = Pitaya._opts.profile || DEFAULT_PROFILE;
32 32
 
33
-    return Papaye.loadProfile(profilePath)
33
+    return Pitaya.loadProfile(profilePath)
34 34
       .then(function() {
35
-        return Papaye;
35
+        return Pitaya;
36 36
       })
37 37
     ;
38 38
 
@@ -44,11 +44,11 @@
44 44
    * @param profilePath The path of the profile file
45 45
    * @return Promise
46 46
    */
47
-  Papaye.loadProfile = function(profilePath) {
48
-    return Papaye._loadJSONFile(profilePath)
47
+  Pitaya.loadProfile = function(profilePath) {
48
+    return Pitaya._loadJSONFile(profilePath)
49 49
       .then(function(profile) {
50
-        Papaye._profile = profile;
51
-        Papaye.render();
50
+        Pitaya._profile = profile;
51
+        Pitaya.render();
52 52
         return profile;
53 53
       })
54 54
     ;
@@ -57,11 +57,11 @@
57 57
   /**
58 58
    * Update the application view
59 59
    *
60
-   * @return Papaye
60
+   * @return Pitaya
61 61
    */
62
-  Papaye.render = function() {
63
-    var rootEl = Papaye._rootEl;
64
-    var profile = Papaye._profile;
62
+  Pitaya.render = function() {
63
+    var rootEl = Pitaya._rootEl;
64
+    var profile = Pitaya._profile;
65 65
     rootEl.innerHTML = itemsListTpl(profile);
66 66
   };
67 67
 
@@ -70,19 +70,19 @@
70 70
    * Initialize DOM event listeners
71 71
    * @private
72 72
    */
73
-  Papaye._initListeners = function() {
74
-    var rootEl = Papaye._rootEl;
75
-    rootEl.addEventListener('click', Papaye._onItemClick);
73
+  Pitaya._initListeners = function() {
74
+    var rootEl = Pitaya._rootEl;
75
+    rootEl.addEventListener('click', Pitaya._onItemClick);
76 76
   };
77 77
 
78 78
   /**
79 79
    * App item click handler
80 80
    * @private
81 81
    */
82
-  Papaye._onItemClick = function(evt) {
82
+  Pitaya._onItemClick = function(evt) {
83 83
 
84 84
     var appItemEl = evt.srcElement.matches( '.app-item') ? evt.srcElement :
85
-      Papaye.DOM.getClosestAncestor(evt.srcElement, '.app-item')
85
+      Pitaya.DOM.getClosestAncestor(evt.srcElement, '.app-item')
86 86
     ;
87 87
 
88 88
     if( !appItemEl ) return;
@@ -109,7 +109,7 @@
109 109
    * @param filePath The path of the json file
110 110
    * @return Promise
111 111
    */
112
-  Papaye._loadJSONFile = function(filePath) {
112
+  Pitaya._loadJSONFile = function(filePath) {
113 113
     return new Promise(function(resolve, reject) {
114 114
       fs.readFile(filePath, 'utf8', function(err, fileContent) {
115 115
         if(err) return reject(err);
@@ -123,4 +123,4 @@
123 123
     });
124 124
   };
125 125
 
126
-}(window.Papaye = window.Papaye || {}, window));
126
+}(window.Pitaya = window.Pitaya || {}, window));

+ 3
- 3
js/dom.js View File

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

+ 3
- 3
package.json View File

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

Loading…
Cancel
Save