close #18 New Gulp build process, jsHint fixes

This commit is contained in:
Exodus4D
2015-09-20 16:01:40 +02:00
parent 6086520998
commit e452adb597
42 changed files with 634 additions and 40 deletions

169
README.md
View File

@@ -1,9 +1,18 @@
## *PATHFINDER*
Mapping tool for *EVE ONLINE*
Mapping tool for [*EVE ONLINE*](https://www.eveonline.com)
url: https://www.pathfinder.exodus4d.de
- Project[https://www.pathfinder.exodus4d.de](https://www.pathfinder.exodus4d.de)
- Community[google +](https://plus.google.com/u/0/b/110257318165279088853/110257318165279088853)
- Screenshots[imgur.com](http://imgur.com/a/k2aVa)
- Media[youtube.com](https://www.youtube.com/channel/UC7HU7XEoMbqRwqxDTbMjSPg)
- Licence[MIT](http://opensource.org/licenses/MIT)
### Project requirements --------------------------------------------------
##### Beta Information
> This project is still in beta phase and is not officially released! Feel free to check the code for security issues.
You can not get the project to work, on your own server, until some required SQL dumps have been included to this repository!
I will provide all required dumps once the beta phase is over.
## Requirements
#### APACHE Webserver
- PHP 5.3.4 or higher
- PCRE 8.02 or higher (usually shipped with PHP package, but needs to be additionally updated on CentOS or Red Hat systems)
@@ -12,8 +21,8 @@ url: https://www.pathfinder.exodus4d.de
- cURL, sockets or stream extension (for Web plugin)
- Gzip compression
Nginx and Lighttpd configurations are also possible.
http://fatfreeframework.com/system-requirements
> Nginx and Lighttpd configurations are also possible.
http://fatfreeframework.com/system-requirements
#### Database
- mysql: MySQL 5.x
- sqlite: SQLite 3 and SQLite 2
@@ -23,12 +32,130 @@ url: https://www.pathfinder.exodus4d.de
- odbc: ODBC v3
- oci: Oracle
Here is a list of links to DSN connection details for all currently supported engines in the SQL layer:
http://fatfreeframework.com/sql
#### Development Environment
- t.b.a.
>Here is a list of links to DSN connection details for all currently supported engines in the SQL layer:
http://fatfreeframework.com/sql
### Folder structure (production) ----------------------------------------
## Setup
#### Backend (PHP)
*PATHFINDER* is pretty easy to configure! If you are not planning "getting your hands dirty" with programming stuff,
you don<6F>t have to change a lot. All configuration files can be found here:
- [config.ini](https://github.com/exodus4d/pathfinder/blob/master/app/config.ini) Main config **(DO NOT CHANGE)**
- [pathfinder.ini](https://github.com/exodus4d/pathfinder/blob/master/app/pathfinder.ini) Pathfinder config
- [cron.ini](https://github.com/exodus4d/pathfinder/blob/master/app/cron.ini) Cronjob config
- [routes.ini](https://github.com/exodus4d/pathfinder/blob/master/app/routes.ini) Routes config **(DO NOT CHANGE)**
> The default configuration should be fine in most cases. Edit all values with caution!
#### Frontend (JS)
There is **no** need to change any javascript configuration, except *Signature names* that can be changed/added
- [init.js](https://github.com/exodus4d/pathfinder/blob/master/js/app/init.js) Main config **(DO NOT CHANGE)**
- [signature_type.js](https://github.com/exodus4d/pathfinder/blob/master/js/app/config/signature_type.js) Signature mapping config **(DO NOT CHANGE)**
- [system_effect](https://github.com/exodus4d/pathfinder/blob/master/js/app/config/system_effect.js) System effect config **(DO NOT CHANGE)**
> If you found any *Signature Names* or other information missing in these files, please create an [Issue](https://github.com/exodus4d/pathfinder/issues) for that!
I<EFBFBD>ll try to fix it with the next release.
If you still want to change anything in here, make sure to run the `build` process afterwards (see below).
## Development Environment
*PATHFINDER* comes along with a simple, [*Gulp*](http://gulpjs.com/) based, build process.
There are two main *Gulp tasks* that should help you.
- `default` task is designed for *"continuous development"* scenario
- `production` task is designed for *"production deployment"* scenario
> If you are **not** planning to change the codebase, you don<6F>t have to do the following steps!
**1. Install [Node.js](https://nodejs.org)(> v.4.0.1) with [npm](https://www.npmjs.com/)**
**2. [Copy/Fork](https://help.github.com/articles/fork-a-repo/) this Repo**
```
$ git clone https://github.com/exodus4d/pathfinder.git
```
**3. Install all required `node_modules` for *"continuous development"* from `package.json` (e.g.[Gulp](http://gulpjs.com/))**
```
$ npm install
```
**4. Run *Gulp* task `default` with your version `tag` as param. It will do:**
- clean `dist` folder (./public/js/x.x.x)
- init file watcher for \*.js changes
- running [jsHint](http://jshint.com/docs/) on file change
- copying **raw** *\*.js* files from *./js* to `dist` folder on file change
```
$ gulp default --tag v0.0.10
```
## Production Environment
**1. Install all required dependencies (check "Development Environment" steps )**
**2. Run *Gulp* task `production` with your version `tag` as param. It will do:**
- clean `dist` folder (./public/js/x.x.x)
- running [jsHint](http://jshint.com/docs/)
- running [requireJs Optimizer](http://requirejs.org/docs/optimization.html) (see [build.js](https://github.com/exodus4d/pathfinder/blob/master/build.js))
- minify \*.js files
- uglyfy \*.js files
- combine \*.js dependencies
- generate \.js `source maps`
- copying **compressed** *\*.js* to `dist` folder for production deployment
```
$ gulp production --tag v0.0.10
```
> The `production` task may take some seconds (30+ seconds)!
As a result, you should have all generated \*.js files ready for deployment in the `dist` folder.
The unique version `tag` in this path should ensure that `cache busting` is working correct.
## CSS generation
If you are planning to change/edit any *CSS* styles, you need to install [Compass](http://compass-style.org/),
in order to build the single \*.css file out of the **raw** \*.scss source files.
**1. [Ruby install](https://www.ruby-lang.org/en/)**
**2. [Compass install](http://compass-style.org/install/)**
**3. Start *Compass* file watcher for \*.scss changes in project `root` (see [config.rb](https://github.com/exodus4d/pathfinder/blob/master/config.rb))**
```
$ compass watch
```
> This will watch all \*.scss files for changes and generate a compressed \*.css file (./public/css/pathfinder.css).
Don<EFBFBD>t worry about `cache busting`. Your current version `tag` will be added to the final path (e.g. ./public/css/pathfinder.css?v.0.0.10)
## SQL Schema
To get *PATHFINDER* to work, you will need (at least) **two** databases. The first one is the [SDE](https://developers.eveonline.com/resource/static-data-export)
from *CCP*. The second database is *PATHFINDERS*<2A>s own DB. Make sure, you have the correct DB export for your version!
**1. *CCP* Static Data Export ([SDE](https://developers.eveonline.com/resource/static-data-export))**
You need to import the Eve SDE into the database specified in the `DB_CCP_*` settings. You can do this like the following:
```
wget https://www.fuzzwork.co.uk/dump/mysql-latest.tar.bz2
tar xf mysql-latest.tar.bz2
cd mysql-{}/
mysql -u -p __DATABASE_NAME__ < db_file.sql
```
> If you need an older versions of the SDE, check out[**Fuzzwork**](https://www.fuzzwork.co.uk/dump/)<29>s awesome dumps!
**2. *PATHFINDER* Clean Data Export ([CDE](https://www.google.de))**
> Make sure, that all column `indexes` and foreign `key constraints` have been imported correct!
Otherwise you will get DB errors and the cache engine can not track all tables (Models), which may result in bad performance!
## Cronjob configuration
*PATHFINDER* requires some dynamic `system data` from *CCP*<2A>s [XML APIv2](http://wiki.eve-id.net/APIv2_Page_Index).
This data is automatically imported by a [*Cron-Job*](https://en.wikipedia.org/wiki/Cron) into the DB.
Moreover, there are some predefined *Cron-Jobs* that handle some `db maintenance` and clean up tasks.
You have to setup a **single** *Cron-Jobs* for this, that handles **all** other *Cron-Jobs* and works as a "*dispatcher*".
- **Important**: Block access to `[YOUR INSTALLATION]/cron` (e.g. by `.htaccess` or edit `cron.ini`)
- Trigger `[YOUR INSTALLATION]/cron` by [*CLI*](http://php.net/manual/en/features.commandline.php) **every minute**, e.g create `cron.phpx`:
``` php
exec('wget -qO- /dev/null [YOUR INSTALLATION]/cron &> /dev/null', $out, $result);
echo "start:";
echo "Returncode: " .$result ."<br>";
echo "Ausgabe des Scripts: " ."<br>";
echo "<pre>"; print_r($out);
```
- ... or use [*CURL*](http://php.net/manual/en/book.curl.php) for this ;)
## Project structure
```
|-- (0755) app --> backend [*.php]
@@ -49,12 +176,13 @@ url: https://www.pathfinder.exodus4d.de
|-- app.js --> require.js config (!required for production!)
|-- (0777) logs --> log files
|-- ...
| -- node_modules --> node.js modules (not used for production )
| -- node_modules --> node.js modules (not used for production) [check "Development Environment" section]
|-- ...
|-- (0755) public --> frontend source
|-- css --> CSS build folder (minified)
|-- fonts --> Web/Icon fonts
|-- css --> CSS dist/build folder (minified)
|-- fonts --> (icon)-Fonts
|-- img --> images
|-- js --> JS dist/build folder
|-- templates --> templates
|-- sass --> SCSS source (not used for production )
|-- ...
@@ -62,4 +190,19 @@ url: https://www.pathfinder.exodus4d.de
|-- ...
|-- (0755) .htaccess --> reroute/caching rules
|-- (0755) index.php
--------------------------
CI/CD config files:
--------------------------
|-- build.js --> "RequireJs Optimizer" config (not used for production )
|-- config.rb --> "Compass" config (not used for production )
|-- gulpfile.js --> "Gulp" task config (not used for production )
|-- package.json --> "Node.js" dependency config (not used for production )
|-- README.md --> This file :) (not used for production )
```
## Thanks!
I<EFBFBD>m very proud that **you** are using *PATHFINDER*!
It took me month of time in development until this project got into the first *BETA*. If you like it, please help to improve it.
(report bugs, find security issues,...)

View File

@@ -49,7 +49,7 @@ class Controller {
$f3->set('isIngame', self::isIGB() );
// js path (build/minified or raw uncompressed files)
$f3->set('pathJs', self::getEnvironmentData('PATH_JS') );
$f3->set('pathJs', 'public/js/' . $f3->get('PATHFINDER.VERSION') );
}
/**

204
build.js Normal file
View File

@@ -0,0 +1,204 @@
({
//The top level directory that contains your app. If this option is used
//then it assumed your scripts are in a subdirectory under this path.
//This option is not required. If it is not specified, then baseUrl
//below is the anchor point for finding things. If this option is specified,
//then all the files from the app directory will be copied to the dir:
//output area, and baseUrl will assume to be a relative path under
//this directory.
appDir: "./js",
//By default, all modules are located relative to this path. If baseUrl
//is not explicitly set, then all modules are loaded relative to
//the directory that holds the build file. If appDir is set, then
//baseUrl should be specified as relative to the appDir.
baseUrl: "./",
//By default all the configuration for optimization happens from the command
//line or by properties in the config file, and configuration that was
//passed to requirejs as part of the app's runtime "main" JS file is *not*
//considered. However, if you prefer the "main" JS file configuration
//to be read for the build so that you do not have to duplicate the values
//in a separate configuration, set this property to the location of that
//main JS file. The first requirejs({}), require({}), requirejs.config({}),
//or require.config({}) call found in that file will be used.
//As of 2.1.10, mainConfigFile can be an array of values, with the last
//value's config take precedence over previous values in the array.
mainConfigFile: './js/app.js',
//Specify modules to stub out in the optimized file. The optimizer will
//use the source version of these modules for dependency tracing and for
//plugin use, but when writing the text into an optimized bundle, these
//modules will get the following text instead:
//If the module is used as a plugin:
// define({load: function(id){throw new Error("Dynamic load not allowed: " + id);}});
//If just a plain module:
// define({});
//This is useful particularly for plugins that inline all their resources
//and use the default module resolution behavior (do *not* implement the
//normalize() method). In those cases, an AMD loader just needs to know
//that the module has a definition. These small stubs can be used instead of
//including the full source for a plugin.
//stubModules: ['text'],
//As of RequireJS 2.0.2, the dir above will be deleted before the
//build starts again. If you have a big build and are not doing
//source transforms with onBuildRead/onBuildWrite, then you can
//set keepBuildDir to true to keep the previous dir. This allows for
//faster rebuilds, but it could lead to unexpected errors if the
//built code is transformed in some way.
keepBuildDir: false,
//Finds require() dependencies inside a require() or define call. By default
//this value is false, because those resources should be considered dynamic/runtime
//calls. However, for some optimization scenarios, it is desirable to
//include them in the build.
//Introduced in 1.0.3. Previous versions incorrectly found the nested calls
//by default.
findNestedDependencies: false,
//Inlines the text for any text! dependencies, to avoid the separate
//async XMLHttpRequest calls to load those dependencies.
inlineText: false,
//If set to true, any files that were combined into a build bundle will be
//removed from the output folder.
removeCombined: true,
//List the modules that will be optimized. All their immediate and deep
//dependencies will be included in the module's file when the build is
//done. If that module or any of its dependencies includes i18n bundles,
//only the root bundles will be included unless the locale: section is set above.
modules: [
//Just specifying a module name means that module will be converted into
//a built file that contains all of its dependencies. If that module or any
//of its dependencies includes i18n bundles, they may not be included in the
//built file unless the locale: section is set above.
{
name: 'mappage',
include: ['text'],
excludeShallow: [
'app'
]
},{
name: 'landingpage',
include: ['text'],
excludeShallow: [
'app'
]
},{
name: 'app/notification',
excludeShallow: [
'app',
'jquery'
]
}
],
//By default, comments that have a license in them are preserved in the
//output when a minifier is used in the "optimize" option.
//However, for a larger built files there could be a lot of
//comment files that may be better served by having a smaller comment
//at the top of the file that points to the list of all the licenses.
//This option will turn off the auto-preservation, but you will need
//work out how best to surface the license information.
//NOTE: As of 2.1.7, if using xpcshell to run the optimizer, it cannot
//parse out comments since its native Reflect parser is used, and does
//not have the same comments option support as esprima.
preserveLicenseComments: false, // not working with "generate source maps" :(
//Introduced in 2.1.2 and considered experimental.
//If the minifier specified in the "optimize" option supports generating
//source maps for the minified code, then generate them. The source maps
//generated only translate minified JS to non-minified JS, it does not do
//anything magical for translating minified JS to transpiled source code.
//Currently only optimize: "uglify2" is supported when running in node or
//rhino, and if running in rhino, "closure" with a closure compiler jar
//build after r1592 (20111114 release).
//The source files will show up in a browser developer tool that supports
//source maps as ".js.src" files.
generateSourceMaps: true,
//Sets the logging level. It is a number. If you want "silent" running,
//set logLevel to 4. From the logger.js file:
//TRACE: 0,
//INFO: 1,
//WARN: 2,
//ERROR: 3,
//SILENT: 4
//Default is 0.
logLevel: 0,
//How to optimize all the JS files in the build output directory.
//Right now only the following values
//are supported:
//- "uglify": (default) uses UglifyJS to minify the code.
//- "uglify2": in version 2.1.2+. Uses UglifyJS2.
//- "closure": uses Google's Closure Compiler in simple optimization
//mode to minify the code. Only available if running the optimizer using
//Java.
//- "closure.keepLines": Same as closure option, but keeps line returns
//in the minified files.
//- "none": no minification will be done.
optimize: 'uglify2',
//Introduced in 2.1.2: If using "dir" for an output directory, normally the
//optimize setting is used to optimize the build bundles (the "modules"
//section of the config) and any other JS file in the directory. However, if
//the non-build bundle JS files will not be loaded after a build, you can
//skip the optimization of those files, to speed up builds. Set this value
//to true if you want to skip optimizing those other non-build bundle JS
//files.
//skipDirOptimize: true,
//If using UglifyJS2 for script optimization, these config options can be
//used to pass configuration values to UglifyJS2.
//For possible `output` values see:
//https://github.com/mishoo/UglifyJS2#beautifier-options
//For possible `compress` values see:
//https://github.com/mishoo/UglifyJS2#compressor-options
uglify2: {
//Example of a specialized config. If you are fine
//with the default options, no need to specify
//any of these properties.
output: {
beautify: false,
comments: false
},
compress: {
sequences: false,
drop_console: true,
global_defs: {
DEBUG: false
}
},
warnings: false,
mangle: true
},
//A function that will be called for every write to an optimized bundle
//of modules. This allows transforms of the content before serialization.
onBuildWrite: function (moduleName, path, contents) {
// show module names for each file
if(moduleName === 'mappage'){
// perform transformations on the original source
contents = contents.replace( /#version/i, new Date().toString() );
}
return contents;
},
paths: {
app: "./../js/app" // the main config file will not be build
},
//The directory path to save the output. If not specified, then
//the path will default to be a directory called "build" as a sibling
//to the build file. All relative paths are relative to the build file.
dir: "./build_js"
})

199
gulpfile.js Normal file
View File

@@ -0,0 +1,199 @@
/* GULP itself */
var gulp = require('gulp-param')(require('gulp'), process.argv);
var jshint = require('gulp-jshint');
var notify = require('gulp-notify');
var plumber = require('gulp-plumber');
var gulpif = require('gulp-if');
var clean = require('gulp-clean');
var runSequence = require('run-sequence');
var exec = require('child_process').exec;
var path = require('path');
var stylish = require('jshint-stylish');
/*******************************************/
// Source and destination file paths
var _src = {
GULP: './gulpfile.js',
ICON: './public/img/notifications/logo.png',
// JS_CONFIG: './src/main/conf/build.js', // path to requirejs config file
JS_SRC: './js/**/*.js',
JS_LIBS: './js/lib/**/*.js',
JS_BUILD: './build_js',
JS_DIST: './public/js',
PACKAGE: './package.json'
};
// Gulp plumber error handler
var onError = function(err) {
console.log(err);
};
/*******************************************/
// Build Configuration
var isProductionBuild = false;
/**
* Version nr (e.g. v0.0.4)
* required for "production" task
* @type {null}
*/
var tagVersion = null;
/**
* RequireJS build task using the r.js optimizer.
*/
gulp.task('requirejs', ['jshint'], function() {
var rjsPath = path.resolve(__dirname, './node_modules/requirejs/bin/r.js');
var oPath = path.resolve(__dirname, './build.js');
exec('node ' + rjsPath + ' -o ' + oPath, function(error, stdout, stderr) {
var success = true;
console.log('[RequireJS]', stderr);
if (error !== null) {
console.log('[RequireJS]', error);
success = false;
}
runSequence(
'copyBuildFiles',
'removeBuildFiles'
);
});
});
/*******************************************/
/**
* JSHint JavaScript and JSON
* see .jshintrc for configuration
* http://jshint.com/docs/
* http://jshint.com/docs/options/
*/
gulp.task('jshint', function(){
return gulp.src([
_src.JS_SRC,
'!' + _src.JS_LIBS
])
.pipe(plumber({
errorHandler: onError
}))
.pipe(jshint())
.pipe(jshint.reporter(stylish))
.pipe(notify({
icon: path.resolve(__dirname, _src.ICON),
title: 'JSHint',
message: 'Task complete',
onLast: true
}));
// .pipe(jshint.reporter('fail')); // uncomment this line to stop build on error
});
/**
* Copy optimized/uglyfied js files from "js_build" folder to "public/js/x.x.x/*" folder
* for release deployment (cache busting)
*/
gulp.task('copyBuildFiles', ['removeDistFiles'], function () {
// raw files
var source = _src.JS_SRC;
if(isProductionBuild){
// build files
source = _src.JS_BUILD + '/**/*';
}
return gulp
.src( source )
.pipe(
gulpif(
tagVersion !== null,
gulp.dest( _src.JS_DIST + '/' + tagVersion )
)
).pipe(notify({
icon: path.resolve(__dirname, _src.ICON),
title: 'Copy JS to dist',
message: 'Task complete',
onLast: true
}));
});
/**
* task removes temp build js files
*/
gulp.task('removeBuildFiles', function () {
'use strict';
return gulp.src( _src.JS_BUILD ).pipe( clean( _src.JS_BUILD ) );
});
/**
* task removes "dist" js files
*/
gulp.task('removeDistFiles', function () {
'use strict';
var dist = _src.JS_DIST + '/' + tagVersion;
return gulp.src(dist).pipe( clean(dist) );
});
/*******************************************/
// Watch
// execute only during continuous development!
gulp.task('watch', function(tag) {
if(tag){
tagVersion = tag;
}
gulp.watch([
_src.JS_SRC,
'!' + _src.JS_LIBS,
], ['jshint', 'copyBuildFiles']);
});
/*******************************************/
// Default Tasks
/**
* Production task for deployment.
* Triggered by Maven Plugin.
* $ gulp production --tag v0.0.9
* WARNING: DO NOT REMOVE THIS TASK!!!
*/
gulp.task('production', function(tag) {
if(tag !== null){
tagVersion = tag;
isProductionBuild = true;
// use run-sequence until gulp v4.0 is released
runSequence(
'requirejs'
);
}
});
/**
* Default task for continuous development.
* $ gulp default --tag v0.0.9
* WARNING: DO NOT REMOVE THIS TASK!!!
*/
gulp.task('default', function(tag) {
if(tag){
tagVersion = tag;
}
runSequence(
'jshint',
'copyBuildFiles',
'watch'
);
});

View File

@@ -13,6 +13,8 @@ requirejs.config({
layout: 'layout',
config: 'app/config', // path for "configuration" files dir
dialog: 'app/ui/dialog', // path for "dialog" files dir
templates: '../../templates', // template dir
img: '../../img', // images dir
// main views
landingpage: './app/landingpage', // initial start "landing page" view
@@ -24,8 +26,6 @@ requirejs.config({
mustache: 'lib/mustache.min', // v1.0.0 Javascript template engine - http://mustache.github.io/
velocity: 'lib/velocity.min', // v1.2.2 animation engine - http://julian.com/research/velocity/
velocityUI: 'lib/velocity.ui.min', // v5.0.4 plugin for velocity - http://julian.com/research/velocity/#uiPack
templates: '../public/templates', // template dir
img: '../public/img', // images dir
slidebars: 'lib/slidebars', // v0.10 Slidebars - side menu plugin http://plugins.adchsm.me/slidebars/
jsPlumb: 'lib/dom.jsPlumb-1.7.6-min', // v1.7.6 jsPlumb (Vanilla)- main map draw plugin https://jsplumbtoolkit.com/
customScrollbar: 'lib/jquery.mCustomScrollbar.concat.min', // v3.0.9 Custom scroll bars - http://manos.malihu.gr/

View File

@@ -274,7 +274,7 @@ define([
};
// initialize carousel ------------------------------------------
var carousel = Gallery([
var carousel = new Gallery([
{
title: 'IGB',
href: 'ui/map',
@@ -389,7 +389,7 @@ define([
titleProperty: 'description'
};
Gallery(thumbLinks, options);
new Gallery(thumbLinks, options);
});
});
};

View File

@@ -77,7 +77,7 @@ define([
// active connections per map (cache object)
var activeConnections = {};
// characterID => systemId<EFBFBD>s are cached temporary where the active user character is in
// characterID => systemIds are cached temporary where the active user character is in
// if a character switches/add system, establish connection with "previous" system
var activeSystemCache = '';
@@ -1833,6 +1833,8 @@ define([
// system name
var currentSystemName = currentSystem.getSystemInfo( ['alias'] );
var systemData = {};
switch(action){
case 'add_system':
// add a new system
@@ -1919,17 +1921,17 @@ define([
});
break;
case 'ingame_show_info':
var systemData = system.getSystemData();
systemData = system.getSystemData();
CCPEVE.showInfo(5, systemData.systemId );
break;
case 'ingame_set_destination':
var systemData = system.getSystemData();
systemData = system.getSystemData();
CCPEVE.setDestination( systemData.systemId );
break;
case 'ingame_add_waypoint':
var systemData = system.getSystemData();
systemData = system.getSystemData();
CCPEVE.addWaypoint( systemData.systemId );
break;

View File

@@ -411,7 +411,7 @@ define([
var contentElement = $('<div>', {
id: config.mapTabIdPrefix + parseInt( options.id ),
class: [config.mapTabContentClass].join(' ')
})
});
contentElement.addClass('tab-pane');
@@ -707,7 +707,7 @@ define([
/**
* collect all data (systems/connections) for export/save from each active map in the map module
* if no change detected -> don<EFBFBD>t attach map data to return array
* if no change detected -> do not attach map data to return array
* @returns {Array}
*/
$.fn.getMapModuleDataForUpdate = function(){

View File

@@ -32,7 +32,7 @@ define([
if( !CCP.isInGameBrowser() ){
headlineElement.delay(300).velocity('transition.shrinkIn', {
duration: 500
}).delay(800)
}).delay(800);
headlineElement.velocity({
scale: 1.05

View File

@@ -30,7 +30,7 @@ define([
pageElement.find('h1').delay(300).velocity('transition.shrinkIn', {
duration: 500
}).delay(800)
}).delay(800);
pageElement.find('h1').velocity({
scale: 1.05

View File

@@ -48,8 +48,8 @@ define([
var closest = [];
var p1 = points[i];
for(var j = 0; j < points.length; j++) {
var p2 = points[j]
if(!(p1 === p2)) {
var p2 = points[j];
if(p1 !== p2) {
var placed = false;
for(var k = 0; k < connectionCount; k++) {
if(!placed) {
@@ -60,10 +60,10 @@ define([
}
}
for(var k = 0; k < connectionCount; k++) {
for(var m = 0; k < connectionCount; m++) {
if(!placed) {
if(getDistance(p1, p2) < getDistance(p1, closest[k])) {
closest[k] = p2;
if(getDistance(p1, p2) < getDistance(p1, closest[m])) {
closest[m] = p2;
placed = true;
}
}
@@ -74,9 +74,9 @@ define([
}
// assign a circle to each point
for(var i in points) {
var c = new Circle(points[i], 2+Math.random()*2, 'rgba(255,255,255,0.3)');
points[i].circle = c;
for(var n in points) {
var c = new Circle(points[n], 2+Math.random()*2, 'rgba(255,255,255,0.3)');
points[n].circle = c;
}
};

View File

@@ -152,7 +152,7 @@ define([
// hide/disable description field
// hide tool button
descriptionButton.hide()
descriptionButton.hide();
showToolsActionElement();
}

41
package.json Normal file
View File

@@ -0,0 +1,41 @@
{
"name": "pathfinder",
"version": "1.0.0",
"description": "System mapping tool for EVE ONLINE",
"main": "index.php",
"dependencies": {
"requirejs": "^2.1.20"
},
"devDependencies": {
"gulp": "^3.9.0",
"gulp-clean": "^0.3.1",
"gulp-if": "^1.2.5",
"gulp-jshint": "^1.11.2",
"gulp-notify": "^2.2.0",
"gulp-param": "^0.6.3",
"gulp-plumber": "^1.0.1",
"jshint": "^2.8.0",
"jshint-stylish": "^2.0.1",
"requirejs": "^2.1.20",
"run-sequence": "^1.1.2"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/exodus4d/pathfinder.git"
},
"keywords": [
"Pathfinder",
"Exodus 4D",
"EVE ONLINE",
"Wormhole"
],
"author": "Exodus 4D",
"license": "ISC",
"bugs": {
"url": "https://github.com/exodus4d/pathfinder/issues"
},
"homepage": "https://github.com/exodus4d/pathfinder#readme"
}

2
public/js/v0.0.10/app.js Normal file
View File

@@ -0,0 +1,2 @@
var mainScriptPath=document.body.getAttribute("data-script"),jsBaseUrl=document.body.getAttribute("data-js-path");requirejs.config({baseUrl:"js",paths:{layout:"layout",config:"app/config",dialog:"app/ui/dialog",templates:"../../templates",img:"../../img",landingpage:"./app/landingpage",mappage:"./app/mappage",jquery:"lib/jquery-1.11.3.min",bootstrap:"lib/bootstrap.min",text:"lib/requirejs/text",mustache:"lib/mustache.min",velocity:"lib/velocity.min",velocityUI:"lib/velocity.ui.min",slidebars:"lib/slidebars",jsPlumb:"lib/dom.jsPlumb-1.7.6-min",customScrollbar:"lib/jquery.mCustomScrollbar.concat.min",datatables:"lib/datatables/jquery.dataTables.min",datatablesResponsive:"lib/datatables/extensions/responsive/dataTables.responsive",datatablesTableTools:"lib/datatables/extensions/tabletools/js/dataTables.tableTools",xEditable:"lib/bootstrap-editable.min",morris:"lib/morris.min",raphael:"lib/raphael-min",bootbox:"lib/bootbox.min",easyPieChart:"lib/jquery.easypiechart.min",dragToSelect:"lib/jquery.dragToSelect",hoverIntent:"lib/jquery.hoverIntent.minified",fullScreen:"lib/jquery.fullscreen.min",select2:"lib/select2.min",validator:"lib/validator.min",lazylinepainter:"lib/jquery.lazylinepainter-1.5.1.min",blueImpGallery:"lib/blueimp-gallery",blueImpGalleryHelper:"lib/blueimp-helper",blueImpGalleryBootstrap:"lib/bootstrap-image-gallery",bootstrapConfirmation:"lib/bootstrap-confirmation",bootstrapToggle:"lib/bootstrap2-toggle.min",easePack:"lib/EasePack.min",tweenLite:"lib/TweenLite.min",pnotify:"lib/pnotify/pnotify.core","pnotify.buttons":"lib/pnotify/pnotify.buttons","pnotify.confirm":"lib/pnotify/pnotify.confirm","pnotify.nonblock":"lib/pnotify/pnotify.nonblock","pnotify.desktop":"lib/pnotify/pnotify.desktop","pnotify.history":"lib/pnotify/pnotify.history","pnotify.callbacks":"lib/pnotify/pnotify.callbacks","pnotify.reference":"lib/pnotify/pnotify.reference"},shim:{bootstrap:{deps:["jquery"]},velocity:{deps:["jquery"]},velocityUI:{deps:["velocity"]},slidebars:{deps:["jquery"]},customScrollbar:{deps:["jquery"]},datatables:{deps:["jquery"]},datatablesBootstrap:{deps:["datatables"]},datatablesResponsive:{deps:["datatables"]},datatablesTableTools:{deps:["datatables"]},xEditable:{deps:["bootstrap"]},bootbox:{deps:["jquery","bootstrap"],exports:"bootbox"},morris:{deps:["jquery","raphael"],exports:"Morris"},pnotify:{deps:["jquery"]},easyPieChart:{deps:["jquery"]},dragToSelect:{deps:["jquery"]},hoverIntent:{deps:["jquery"]},fullScreen:{deps:["jquery"]},select2:{deps:["jquery"],exports:"Select2"},validator:{deps:["jquery","bootstrap"]},lazylinepainter:{deps:["jquery","bootstrap"]},blueImpGallery:{deps:["jquery"]},bootstrapConfirmation:{deps:["bootstrap"]},bootstrapToggle:{deps:["jquery"]}}});require.config({baseUrl:jsBaseUrl});requirejs([mainScriptPath]);
//# sourceMappingURL=app.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"app.js.map","sources":["app.js.src.js"],"names":["mainScriptPath","document","body","getAttribute","jsBaseUrl","requirejs","config","baseUrl","paths","layout","dialog","templates","img","landingpage","mappage","jquery","bootstrap","text","mustache","velocity","velocityUI","slidebars","jsPlumb","customScrollbar","datatables","datatablesResponsive","datatablesTableTools","xEditable","morris","raphael","bootbox","easyPieChart","dragToSelect","hoverIntent","fullScreen","select2","validator","lazylinepainter","blueImpGallery","blueImpGalleryHelper","blueImpGalleryBootstrap","bootstrapConfirmation","bootstrapToggle","easePack","tweenLite","pnotify","pnotify.buttons","pnotify.confirm","pnotify.nonblock","pnotify.desktop","pnotify.history","pnotify.callbacks","pnotify.reference","shim","deps","datatablesBootstrap","exports","require"],"mappings":"AACA,GAAIA,gBAAiBC,SAASC,KAAKC,aAAa,eAI5CC,UAAYH,SAASC,KAAKC,aAAa,eAG3CE,WAAUC,QACNC,QAAS,KAETC,OACIC,OAAQ,SACRH,OAAQ,aACRI,OAAQ,gBACRC,UAAW,kBACXC,IAAK,YAGLC,YAAa,oBACbC,QAAS,gBAETC,OAAQ,wBACRC,UAAW,oBACXC,KAAM,qBACNC,SAAU,mBACVC,SAAU,mBACVC,WAAY,sBACZC,UAAW,gBACXC,QAAS,4BACTC,gBAAiB,yCACjBC,WAAY,uCAEZC,qBAAsB,6DAEtBC,qBAAsB,gEACtBC,UAAW,6BACXC,OAAQ,iBACRC,QAAS,kBACTC,QAAS,kBACTC,aAAc,8BACdC,aAAc,0BACdC,YAAa,kCACbC,WAAY,4BACZC,QAAS,kBACTC,UAAW,oBACXC,gBAAiB,uCACjBC,eAAgB,sBAChBC,qBAAsB,qBACtBC,wBAAyB,8BACzBC,sBAAuB,6BACvBC,gBAAiB,4BAGjBC,SAAU,mBACVC,UAAW,oBAGXC,QAAS,2BACTC,kBAAmB,8BACnBC,kBAAmB,8BACnBC,mBAAoB,+BACpBC,kBAAmB,8BACnBC,kBAAmB,8BACnBC,oBAAqB,gCACrBC,oBAAqB,iCAGzBC,MACIrC,WACIsC,MAAO,WAEXnC,UACImC,MAAO,WAEXlC,YACIkC,MAAO,aAEXjC,WACIiC,MAAO,WAEX/B,iBACI+B,MAAO,WAEX9B,YACI8B,MAAO,WAEXC,qBACID,MAAO,eAEX7B,sBACI6B,MAAO,eAEX5B,sBACI4B,MAAO,eAEX3B,WACI2B,MAAO,cAEXxB,SACIwB,MAAO,SAAU,aACjBE,QAAS,WAEb5B,QACI0B,MAAO,SAAU,WACjBE,QAAS,UAEbX,SACIS,MAAQ,WAEZvB,cACIuB,MAAQ,WAEZtB,cACIsB,MAAQ,WAEZrB,aACIqB,MAAQ,WAEZpB,YACIoB,MAAQ,WAEZnB,SACImB,MAAQ,UACRE,QAAS,WAEbpB,WACIkB,MAAQ,SAAU,cAEtBjB,iBACIiB,MAAQ,SAAU,cAEtBhB,gBACIgB,MAAQ,WAEZb,uBACIa,MAAQ,cAEZZ,iBACIY,MAAQ,aAQpBG,SAAQnD,QACJC,QAASH,WAIbC,YAAYL"}

View File

@@ -13,6 +13,8 @@ requirejs.config({
layout: 'layout',
config: 'app/config', // path for "configuration" files dir
dialog: 'app/ui/dialog', // path for "dialog" files dir
templates: '../../templates', // template dir
img: '../../img', // images dir
// main views
landingpage: './app/landingpage', // initial start "landing page" view
@@ -24,8 +26,6 @@ requirejs.config({
mustache: 'lib/mustache.min', // v1.0.0 Javascript template engine - http://mustache.github.io/
velocity: 'lib/velocity.min', // v1.2.2 animation engine - http://julian.com/research/velocity/
velocityUI: 'lib/velocity.ui.min', // v5.0.4 plugin for velocity - http://julian.com/research/velocity/#uiPack
templates: '../public/templates', // template dir
img: '../public/img', // images dir
slidebars: 'lib/slidebars', // v0.10 Slidebars - side menu plugin http://plugins.adchsm.me/slidebars/
jsPlumb: 'lib/dom.jsPlumb-1.7.6-min', // v1.7.6 jsPlumb (Vanilla)- main map draw plugin https://jsplumbtoolkit.com/
customScrollbar: 'lib/jquery.mCustomScrollbar.concat.min', // v3.0.9 Custom scroll bars - http://manos.malihu.gr/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long