diff --git a/app/.htaccess b/.htaccess similarity index 89% rename from app/.htaccess rename to .htaccess index f74179f6..33404c27 100644 --- a/app/.htaccess +++ b/.htaccess @@ -10,7 +10,7 @@ # Activate mod_expires for this directory ExpiresActive on - ExpiresDefault "access plus 365 days" + ExpiresDefault "access" ExpiresByType text/html "access" ExpiresByType application/json "access" diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/app/icons/coriolis.svg b/app/icons/coriolis.svg old mode 100644 new mode 100755 diff --git a/app/icons/github-mark.svg b/app/icons/github-mark.svg old mode 100644 new mode 100755 diff --git a/app/icons/mount-F.svg b/app/icons/mount-F.svg old mode 100644 new mode 100755 diff --git a/app/icons/mount-G.svg b/app/icons/mount-G.svg old mode 100644 new mode 100755 diff --git a/app/icons/mount-T.svg b/app/icons/mount-T.svg old mode 100644 new mode 100755 diff --git a/app/images/bay-1920x1080.jpg b/app/images/bay-1920x1080.jpg old mode 100644 new mode 100755 diff --git a/app/images/deep-space-1920x1080.jpg b/app/images/deep-space-1920x1080.jpg old mode 100644 new mode 100755 diff --git a/app/images/logo/android-chrome-144x144.png b/app/images/logo/android-chrome-144x144.png old mode 100644 new mode 100755 diff --git a/app/images/logo/android-chrome-192x192.png b/app/images/logo/android-chrome-192x192.png old mode 100644 new mode 100755 diff --git a/app/images/logo/android-chrome-72x72.png b/app/images/logo/android-chrome-72x72.png old mode 100644 new mode 100755 diff --git a/app/images/logo/android-chrome-96x96.png b/app/images/logo/android-chrome-96x96.png old mode 100644 new mode 100755 diff --git a/app/images/logo/apple-touch-icon-114x114.png b/app/images/logo/apple-touch-icon-114x114.png old mode 100644 new mode 100755 diff --git a/app/images/logo/apple-touch-icon-120x120.png b/app/images/logo/apple-touch-icon-120x120.png old mode 100644 new mode 100755 diff --git a/app/images/logo/apple-touch-icon-144x144.png b/app/images/logo/apple-touch-icon-144x144.png old mode 100644 new mode 100755 diff --git a/app/images/logo/apple-touch-icon-152x152.png b/app/images/logo/apple-touch-icon-152x152.png old mode 100644 new mode 100755 diff --git a/app/images/logo/apple-touch-icon-180x180.png b/app/images/logo/apple-touch-icon-180x180.png old mode 100644 new mode 100755 diff --git a/app/images/logo/apple-touch-icon-76x76.png b/app/images/logo/apple-touch-icon-76x76.png old mode 100644 new mode 100755 diff --git a/app/images/logo/apple-touch-icon-precomposed.png b/app/images/logo/apple-touch-icon-precomposed.png old mode 100644 new mode 100755 diff --git a/app/images/logo/apple-touch-icon.png b/app/images/logo/apple-touch-icon.png old mode 100644 new mode 100755 diff --git a/app/images/logo/browserconfig.xml b/app/images/logo/browserconfig.xml old mode 100644 new mode 100755 diff --git a/app/images/logo/favicon-194x194.png b/app/images/logo/favicon-194x194.png old mode 100644 new mode 100755 diff --git a/app/images/logo/favicon-96x96.png b/app/images/logo/favicon-96x96.png old mode 100644 new mode 100755 diff --git a/app/images/logo/favicon.ico b/app/images/logo/favicon.ico old mode 100644 new mode 100755 diff --git a/app/images/logo/manifest.json b/app/images/logo/manifest.json old mode 100644 new mode 100755 diff --git a/app/images/logo/mstile-144x144.png b/app/images/logo/mstile-144x144.png old mode 100644 new mode 100755 diff --git a/app/images/logo/mstile-150x150.png b/app/images/logo/mstile-150x150.png old mode 100644 new mode 100755 diff --git a/app/images/logo/mstile-310x150.png b/app/images/logo/mstile-310x150.png old mode 100644 new mode 100755 diff --git a/app/images/logo/mstile-310x310.png b/app/images/logo/mstile-310x310.png old mode 100644 new mode 100755 diff --git a/app/images/logo/mstile-70x70.png b/app/images/logo/mstile-70x70.png old mode 100644 new mode 100755 diff --git a/app/index.html b/app/index.html old mode 100644 new mode 100755 index 7ba78ce8..c2369e2c --- a/app/index.html +++ b/app/index.html @@ -1,7 +1,6 @@ - Coriolis diff --git a/app/js/app.js b/app/js/app.js old mode 100644 new mode 100755 diff --git a/app/js/config.js b/app/js/config.js old mode 100644 new mode 100755 diff --git a/app/js/controllers/controller-comparison.js b/app/js/controllers/controller-comparison.js old mode 100644 new mode 100755 index 0af6c581..9f2bc253 --- a/app/js/controllers/controller-comparison.js +++ b/app/js/controllers/controller-comparison.js @@ -18,7 +18,7 @@ angular.module('app').controller('ComparisonController', ['lodash', '$rootScope' */ $scope.addBuild = function (shipId, buildName, code) { var data = Ships[shipId]; // Get ship properties - var code = code? code : Persist.builds[shipId][buildName]; // Retrieve build code if not passed + code = code? code : Persist.builds[shipId][buildName]; // Retrieve build code if not passed var b = new Ship(shipId, data.properties, data.slots); // Create a new Ship instance Serializer.toShip(b, code); // Populate components from code // Extend ship instance and add properties below @@ -153,7 +153,7 @@ angular.module('app').controller('ComparisonController', ['lodash', '$rootScope' $scope.desc ); return $state.href('comparison', {code: code}, {absolute:true}); - }; + } /* Event listeners */ $scope.$on('close', function() { @@ -161,20 +161,21 @@ angular.module('app').controller('ComparisonController', ['lodash', '$rootScope' }); /* Initialization */ + var shipId, buildName, comparisonData; if ($scope.compareMode) { if ($scope.name == 'all') { - for (var shipId in Persist.builds) { - for (var buildName in Persist.builds[shipId]) { + for (shipId in Persist.builds) { + for (buildName in Persist.builds[shipId]) { $scope.addBuild(shipId, buildName); } } } else { - for (var shipId in Persist.builds) { - for (var buildName in Persist.builds[shipId]) { + for (shipId in Persist.builds) { + for (buildName in Persist.builds[shipId]) { $scope.unusedBuilds.push({id: shipId, buildName: buildName, name: Ships[shipId].properties.name}); } } - var comparisonData = Persist.getComparison($scope.name); + comparisonData = Persist.getComparison($scope.name); if (comparisonData) { defaultFacets = comparisonData.facets; comparisonData.builds.forEach(function (b) { @@ -185,9 +186,9 @@ angular.module('app').controller('ComparisonController', ['lodash', '$rootScope' } } else { try { - var comparisonData = Serializer.toComparison($stateParams.code); + comparisonData = Serializer.toComparison($stateParams.code); defaultFacets = comparisonData.f; - $scope.name = comparisonData.n + $scope.name = comparisonData.n; $scope.predicate = comparisonData.p; $scope.desc = comparisonData.d; comparisonData.b.forEach(function (build) { diff --git a/app/js/controllers/controller-delete.js b/app/js/controllers/controller-delete.js old mode 100644 new mode 100755 diff --git a/app/js/controllers/controller-error.js b/app/js/controllers/controller-error.js old mode 100644 new mode 100755 diff --git a/app/js/controllers/controller-export.js b/app/js/controllers/controller-export.js old mode 100644 new mode 100755 diff --git a/app/js/controllers/controller-import.js b/app/js/controllers/controller-import.js old mode 100644 new mode 100755 diff --git a/app/js/controllers/controller-link.js b/app/js/controllers/controller-link.js old mode 100644 new mode 100755 diff --git a/app/js/controllers/controller-modal.js b/app/js/controllers/controller-modal.js old mode 100644 new mode 100755 diff --git a/app/js/controllers/controller-outfit.js b/app/js/controllers/controller-outfit.js old mode 100644 new mode 100755 diff --git a/app/js/controllers/controller-shipyard.js b/app/js/controllers/controller-shipyard.js old mode 100644 new mode 100755 diff --git a/app/js/directives/directive-area-chart.js b/app/js/directives/directive-area-chart.js old mode 100644 new mode 100755 diff --git a/app/js/directives/directive-bar-chart.js b/app/js/directives/directive-bar-chart.js old mode 100644 new mode 100755 index e791f585..6d8bc328 --- a/app/js/directives/directive-bar-chart.js +++ b/app/js/directives/directive-bar-chart.js @@ -1,4 +1,4 @@ -angular.module('app').directive('barChart', ['$rootScope', function ($rootScope) { +angular.module('app').directive('barChart', function () { function bName (build) { return build.buildName + '\n' + build.name; @@ -118,4 +118,4 @@ angular.module('app').directive('barChart', ['$rootScope', function ($rootScope) } }; -}]); \ No newline at end of file +}); \ No newline at end of file diff --git a/app/js/directives/directive-comparison-table.js b/app/js/directives/directive-comparison-table.js old mode 100644 new mode 100755 diff --git a/app/js/directives/directive-component-select.js b/app/js/directives/directive-component-select.js old mode 100644 new mode 100755 diff --git a/app/js/directives/directive-header.js b/app/js/directives/directive-header.js old mode 100644 new mode 100755 diff --git a/app/js/directives/directive-slot-hardpoint.js b/app/js/directives/directive-slot-hardpoint.js old mode 100644 new mode 100755 diff --git a/app/js/directives/directive-slot-internal.js b/app/js/directives/directive-slot-internal.js old mode 100644 new mode 100755 diff --git a/app/js/factory-utils.js b/app/js/factory-utils.js old mode 100644 new mode 100755 index 60c430f2..20ad7ace --- a/app/js/factory-utils.js +++ b/app/js/factory-utils.js @@ -12,12 +12,12 @@ angular.module('app').factory('Utils', ['$state','$http', function ($state, $htt } function comparisonBBCode(facets, builds, link) { - var colCount = 2, i,j,k, l = []; + var colCount = 2, b, i, j, k, f, fl, p, pl, l = []; for (i = 0; i < facets.length; i++) { if (facets[i].active) { - var f = facets[i]; - var p = f.props; + f = facets[i]; + p = f.props; if (p.length == 1) { l.push('[th][B][COLOR=#FF8C0D]', f.title, '[/COLOR][/B][/th]'); @@ -33,15 +33,15 @@ angular.module('app').factory('Utils', ['$state','$http', function ($state, $htt l.push('[/tr]\n'); for (i = 0; i < builds.length; i++) { - var b = builds[i]; + b = builds[i]; //var href = $state.href('outfit',{shipId: b.id, code: b.code, bn: b.buildName}, {absolute: true}); l.push('[tr][td]', b.name,'[/td][td]', b.buildName ,'[/td]'); for (j = 0, fl = facets.length; j < fl; j++) { if (facets[j].active) { - var f = facets[j]; - var p = f.props; - for (var k = 0, pl = p.length; k < pl; k++) { + f = facets[j]; + p = f.props; + for (k = 0, pl = p.length; k < pl; k++) { l.push('[td="align: right"]', f.fmt(b[p[k]]), ' [size=-2]', f.unit, '[/size][/td]'); } } diff --git a/app/js/service-persist.js b/app/js/service-persist.js old mode 100644 new mode 100755 index 3f1cf3fb..ffa617e3 --- a/app/js/service-persist.js +++ b/app/js/service-persist.js @@ -90,10 +90,10 @@ angular.module('app').service('Persist', ['$window','lodash', function ($window, this.comparisons[name] = { facets: facets, builds: _.map(builds, function (b) { return {shipId: b.id, buildName: b.buildName }; }) - } + }; localStorage.setItem(LS_KEY_COMPARISONS, angular.toJson(this.comparisons)); this.state.hasComparisons = true; - } + }; /** * [getComparison description] @@ -105,7 +105,7 @@ angular.module('app').service('Persist', ['$window','lodash', function ($window, return this.comparisons[name]; } return null; - } + }; /** * Removes the comparison from localstorage. @@ -117,7 +117,7 @@ angular.module('app').service('Persist', ['$window','lodash', function ($window, localStorage.setItem(LS_KEY_COMPARISONS, angular.toJson(this.comparisons)); this.state.hasComparisons = Object.keys(this.comparisons).length > 0; } - } + }; /** * Delete all builds and comparisons from localStorage diff --git a/app/js/service-serializer.js b/app/js/service-serializer.js old mode 100644 new mode 100755 index 8f088cc4..ca4f0586 --- a/app/js/service-serializer.js +++ b/app/js/service-serializer.js @@ -68,11 +68,11 @@ angular.module('app').service('Serializer', ['lodash', function (_) { p: predicate, d: desc? 1 : 0 })).replace(/\//g,'-'); - } + }; this.toComparison = function (code) { return angular.fromJson(LZString.decompressFromBase64(code.replace(/-/g,'/'))); - } + }; /** * Utility function to retrieve a safe string for selected component for a slot. diff --git a/app/js/shipyard/factory-component-set.js b/app/js/shipyard/factory-component-set.js old mode 100644 new mode 100755 diff --git a/app/js/shipyard/factory-ship.js b/app/js/shipyard/factory-ship.js old mode 100644 new mode 100755 diff --git a/app/js/shipyard/module-shipyard.js b/app/js/shipyard/module-shipyard.js old mode 100644 new mode 100755 diff --git a/app/js/shipyard/service-components.js b/app/js/shipyard/service-components.js old mode 100644 new mode 100755 diff --git a/app/less/app.less b/app/less/app.less old mode 100644 new mode 100755 diff --git a/app/less/background-images.less b/app/less/background-images.less old mode 100644 new mode 100755 diff --git a/app/less/buttons.less b/app/less/buttons.less old mode 100644 new mode 100755 diff --git a/app/less/chart-tooltip.less b/app/less/chart-tooltip.less old mode 100644 new mode 100755 diff --git a/app/less/charts.less b/app/less/charts.less old mode 100644 new mode 100755 diff --git a/app/less/colors.less b/app/less/colors.less old mode 100644 new mode 100755 index 8761bae7..312756cf --- a/app/less/colors.less +++ b/app/less/colors.less @@ -20,6 +20,12 @@ @secondary-bg: fadeout(darken(@secondary, @bgDarken), @bgTransparency); // Brown background @warning-bg: fadeout(darken(@warning, @bgDarken), @bgTransparency); // Dark Red + +.fg { + color: @fg; + fill: @fg; +} + .disabled { color: @disabled; fill: @disabled; diff --git a/app/less/comparison.less b/app/less/comparison.less old mode 100644 new mode 100755 diff --git a/app/less/error.less b/app/less/error.less old mode 100644 new mode 100755 diff --git a/app/less/fonts.less b/app/less/fonts.less old mode 100644 new mode 100755 diff --git a/app/less/header.less b/app/less/header.less old mode 100644 new mode 100755 index 9765afa4..cd8c0cf1 --- a/app/less/header.less +++ b/app/less/header.less @@ -80,7 +80,7 @@ header { text-decoration: none; &.name { - font-family: Helvetica, sans-serif; + font-family: Helvetica, Arial, sans-serif; } &:visited { diff --git a/app/less/icons.less b/app/less/icons.less old mode 100644 new mode 100755 diff --git a/app/less/list.less b/app/less/list.less old mode 100644 new mode 100755 index 4f2e2132..af927859 --- a/app/less/list.less +++ b/app/less/list.less @@ -68,8 +68,4 @@ } } - &:nth-child(n+2) { - border-top: 1px solid @primary; - } - } diff --git a/app/less/modal.less b/app/less/modal.less old mode 100644 new mode 100755 diff --git a/app/less/outfit.less b/app/less/outfit.less old mode 100644 new mode 100755 index 2ccc953b..1f02638a --- a/app/less/outfit.less +++ b/app/less/outfit.less @@ -17,15 +17,13 @@ input { background: none; - color: @primary-disabled; - outline: none; line-height: 1.5em; font-size: 0.8em; - border: 1px solid @primary-disabled; box-sizing: border-box; display: inline-block; padding: 0.5em; - &:hover, &:focus { + + &:focus { border: 1px solid @primary; color: @primary; } @@ -54,13 +52,12 @@ #summary { .user-select-none(); - float: right; - min-width: 40em; - margin: 0.25em; - border-top: 2px solid @primary; - border-bottom: 2px solid @primary; - background-color: @primary-bg; - text-align: left; + margin: 0; + border-collapse: collapse; + + tbody td { + padding: 0 0.5em; + } } .toggle { diff --git a/app/less/select.less b/app/less/select.less old mode 100644 new mode 100755 diff --git a/app/less/shipyard.less b/app/less/shipyard.less old mode 100644 new mode 100755 diff --git a/app/less/slot.less b/app/less/slot.less old mode 100644 new mode 100755 diff --git a/app/less/sortable.less b/app/less/sortable.less old mode 100644 new mode 100755 diff --git a/app/less/table.less b/app/less/table.less old mode 100644 new mode 100755 diff --git a/app/less/utilities.less b/app/less/utilities.less old mode 100644 new mode 100755 index 3ee05e1d..e6a3ac11 --- a/app/less/utilities.less +++ b/app/less/utilities.less @@ -29,3 +29,19 @@ -ms-user-select: none; user-select: none; } + +.vertical { + -webkit-transform: rotate(-90deg); + -moz-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + -o-transform: rotate(-90deg); + transform: rotate(-90deg); + + -webkit-transform-origin: 50% 50%; + -moz-transform-origin: 50% 50%; + -ms-transform-origin: 50% 50%; + -o-transform-origin: 50% 50%; + transform-origin: 50% 50%; + + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); +} \ No newline at end of file diff --git a/app/views/_header.html b/app/views/_header.html old mode 100644 new mode 100755 index 53a2c8e2..fcd0d12a --- a/app/views/_header.html +++ b/app/views/_header.html @@ -58,6 +58,4 @@ - - \ No newline at end of file diff --git a/app/views/_modal.html b/app/views/_modal.html old mode 100644 new mode 100755 diff --git a/app/views/_slot-hardpoint.html b/app/views/_slot-hardpoint.html old mode 100644 new mode 100755 diff --git a/app/views/_slot-internal.html b/app/views/_slot-internal.html old mode 100644 new mode 100755 index 272d7d16..a37506db --- a/app/views/_slot-internal.html +++ b/app/views/_slot-internal.html @@ -9,6 +9,8 @@
{{c.c.bins}} Bins
Rate: {{$r.fRound4(c.c.rate/1000)}} T/s
Ammo: {{c.c.ammo}}
+
Cells: {{c.c.cells}}
+
Recharge: {{c.c.recharge}} Mj
Repair: {{c.c.repair}}
{{c.c.range}} KM
Range: {{c.c.rangeRating}}
diff --git a/app/views/modal-about.html b/app/views/modal-about.html old mode 100644 new mode 100755 index 7027f6fe..1883164e --- a/app/views/modal-about.html +++ b/app/views/modal-about.html @@ -4,8 +4,13 @@

Coriolis was created for non-commercial purposes. It is not endorsed by nor reflects the views or opinions of Frontier Developments.

-

Github

-github.com/cmmcleod/coriolis +
+ + + +

Github

+ github.com/cmmcleod/coriolis +

Coriolis is an open source project. Checkout the list of upcoming features and to-do list on github. Any and all contributions and feedback are welcome. If you encounter any bugs please report them and provide as much detail as possible. diff --git a/app/views/modal-delete.html b/app/views/modal-delete.html old mode 100644 new mode 100755 diff --git a/app/views/modal-export.html b/app/views/modal-export.html old mode 100644 new mode 100755 index e9385203..bb8640c8 --- a/app/views/modal-export.html +++ b/app/views/modal-export.html @@ -1,5 +1,5 @@

- +
\ No newline at end of file diff --git a/app/views/modal-import.html b/app/views/modal-import.html old mode 100644 new mode 100755 diff --git a/app/views/modal-link.html b/app/views/modal-link.html old mode 100644 new mode 100755 index 4f9880f5..fbc955b3 --- a/app/views/modal-link.html +++ b/app/views/modal-link.html @@ -1,9 +1,9 @@

Permalink


URL

- +

Shortened

- +

diff --git a/app/views/page-comparison.html b/app/views/page-comparison.html old mode 100644 new mode 100755 index dcde16a3..f330c19e --- a/app/views/page-comparison.html +++ b/app/views/page-comparison.html @@ -48,7 +48,7 @@ - + diff --git a/app/views/page-error.html b/app/views/page-error.html old mode 100644 new mode 100755 diff --git a/app/views/page-outfit.html b/app/views/page-outfit.html old mode 100644 new mode 100755 index 2713a7c6..ce163c4d --- a/app/views/page-outfit.html +++ b/app/views/page-outfit.html @@ -1,12 +1,63 @@
+ +
+

+
+ + + + + + +
+
+ +
Available
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
ManuverabilityMassCargoFuelArmourShieldsJump RangeInsuranceCost
AgilityThrustersBoostUnladenLadenUnladenLaden
{{ship.agility}}/10{{fRound(ship.speed)}} m/s{{fRound(ship.boost)}} m/s{{fRound(ship.unladenMass)}} T{{fRound(ship.ladenMass)}} T{{fRound(ship.cargoCapacity)}} T{{fRound(ship.fuelCapacity)}} T{{ship.armourTotal}} ({{ship.armour}} + {{ship.armourAdded}}){{fRound(ship.shieldStrength)}} Mj ({{fRPct(ship.shieldMultiplier)}}){{fRound(ship.unladenJumpRange)}} LY{{fRound(ship.ladenJumpRange)}} LY{{fCrd(ship.totalCost * insurance.current.pct)}} CR{{fCrd(ship.totalCost)}} CR
+
-

HardPoints

+

HardPoints

-
@@ -80,9 +131,9 @@
Power Distributor
{{pd.id}}
-
Sys: {{pd.c.weaponcapacity}} Mj {{pd.c.weaponrecharge}} Mj/s
-
Wep: {{pd.c.systemcapacity}} Mj {{pd.c.systemrecharge}} Mj/s
-
Eng: {{pd.c.enginecapacity}} Mj {{pd.c.enginerecharge}}Mj/s
+
Sys: {{pd.c.weaponcapacity}} Mj / {{pd.c.weaponrecharge}} MW
+
Wep: {{pd.c.systemcapacity}} Mj / {{pd.c.systemrecharge}} MW
+
Eng: {{pd.c.enginecapacity}} Mj / {{pd.c.enginerecharge}} MW
{{pd.c.mass}} T
@@ -119,71 +170,7 @@ -
-
-

-
- - - - - -
-
- -
-
Maneuverability
-
-
Boost
{{fRound(ship.boost)}} m/s
-
Speed
{{fRound(ship.speed)}} m/s
-
Agility
{{ship.agility}} / 10
-
-
- -
-
Shields
-
- -
Strength
{{fRound(ship.shieldStrength)}} Mj
-
Multiplier
{{fRPct(ship.shieldMultiplier)}}
-
-
- -
-
Armor
-
-
Total
{{ship.armourTotal}}
-
Added
{{ship.armourAdded}}
-
Base
{{ship.armour}}
-
-
- -
-
Mass
-
-
Laden
{{fRound(ship.ladenMass)}} T
-
Unladen
{{fRound(ship.unladenMass)}} T
-
-
- -
-
Capacity
-
-
Cargo
{{fRound(ship.cargoCapacity)}} T
-
Fuel
{{fRound(ship.fuelCapacity)}} T
-
-
- +
Power Use
@@ -224,22 +211,11 @@
-
Jump Range
-
+
Jump Range
+
-
-
-
Laden
-
{{fRound(ship.ladenJumpRange)}} LY
-
-
-
Unladen
-
{{fRound(ship.unladenJumpRange)}} LY
-
-
-
Costs
diff --git a/app/views/page-shipyard.html b/app/views/page-shipyard.html old mode 100644 new mode 100755 diff --git a/bower.json b/bower.json old mode 100644 new mode 100755 diff --git a/data/components/bulkheads.json b/data/components/bulkheads.json old mode 100644 new mode 100755 diff --git a/data/components/common/frame_shift_drive.json b/data/components/common/frame_shift_drive.json old mode 100644 new mode 100755 diff --git a/data/components/common/fuel_tank.json b/data/components/common/fuel_tank.json old mode 100644 new mode 100755 diff --git a/data/components/common/life_support.json b/data/components/common/life_support.json old mode 100644 new mode 100755 diff --git a/data/components/common/power_distributor.json b/data/components/common/power_distributor.json old mode 100644 new mode 100755 diff --git a/data/components/common/power_plant.json b/data/components/common/power_plant.json old mode 100644 new mode 100755 diff --git a/data/components/common/sensors.json b/data/components/common/sensors.json old mode 100644 new mode 100755 diff --git a/data/components/common/thrusters.json b/data/components/common/thrusters.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/beam_laser.json b/data/components/hardpoints/beam_laser.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/burst_laser.json b/data/components/hardpoints/burst_laser.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/cannon.json b/data/components/hardpoints/cannon.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/cargo_scanner.json b/data/components/hardpoints/cargo_scanner.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/countermeasures.json b/data/components/hardpoints/countermeasures.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/fragment_cannon.json b/data/components/hardpoints/fragment_cannon.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/frame_shift_wake_scanner.json b/data/components/hardpoints/frame_shift_wake_scanner.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/kill_warrant_scanner.json b/data/components/hardpoints/kill_warrant_scanner.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/mine_launcher.json b/data/components/hardpoints/mine_launcher.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/mining_laser.json b/data/components/hardpoints/mining_laser.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/missile_rack.json b/data/components/hardpoints/missile_rack.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/multi_cannon.json b/data/components/hardpoints/multi_cannon.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/plasma_accelerator.json b/data/components/hardpoints/plasma_accelerator.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/pulse_laser.json b/data/components/hardpoints/pulse_laser.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/rail_gun.json b/data/components/hardpoints/rail_gun.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/shield_booster.json b/data/components/hardpoints/shield_booster.json old mode 100644 new mode 100755 diff --git a/data/components/hardpoints/torpedo_pylon.json b/data/components/hardpoints/torpedo_pylon.json old mode 100644 new mode 100755 diff --git a/data/components/internal/auto_field_maintenance_unit.json b/data/components/internal/auto_field_maintenance_unit.json old mode 100644 new mode 100755 diff --git a/data/components/internal/cargo_rack.json b/data/components/internal/cargo_rack.json old mode 100644 new mode 100755 diff --git a/data/components/internal/docking_computer.json b/data/components/internal/docking_computer.json old mode 100644 new mode 100755 diff --git a/data/components/internal/frame_shift_drive_interdictor.json b/data/components/internal/frame_shift_drive_interdictor.json old mode 100644 new mode 100755 diff --git a/data/components/internal/fuel_scoops.json b/data/components/internal/fuel_scoops.json old mode 100644 new mode 100755 diff --git a/data/components/internal/hatch_breaker_limpet_controller.json b/data/components/internal/hatch_breaker_limpet_controller.json old mode 100644 new mode 100755 diff --git a/data/components/internal/hull_reinforcement_package.json b/data/components/internal/hull_reinforcement_package.json old mode 100644 new mode 100755 diff --git a/data/components/internal/refinery.json b/data/components/internal/refinery.json old mode 100644 new mode 100755 diff --git a/data/components/internal/scanners.json b/data/components/internal/scanners.json old mode 100644 new mode 100755 diff --git a/data/components/internal/shield_cell_bank.json b/data/components/internal/shield_cell_bank.json old mode 100644 new mode 100755 diff --git a/data/components/internal/shield_generator.json b/data/components/internal/shield_generator.json old mode 100644 new mode 100755 diff --git a/data/ships/adder.json b/data/ships/adder.json old mode 100644 new mode 100755 diff --git a/data/ships/anaconda.json b/data/ships/anaconda.json old mode 100644 new mode 100755 diff --git a/data/ships/asp.json b/data/ships/asp.json old mode 100644 new mode 100755 diff --git a/data/ships/cobra_mk_iii.json b/data/ships/cobra_mk_iii.json old mode 100644 new mode 100755 diff --git a/data/ships/eagle.json b/data/ships/eagle.json old mode 100644 new mode 100755 diff --git a/data/ships/federal_dropship.json b/data/ships/federal_dropship.json old mode 100644 new mode 100755 diff --git a/data/ships/fer_de_lance.json b/data/ships/fer_de_lance.json old mode 100644 new mode 100755 diff --git a/data/ships/hauler.json b/data/ships/hauler.json old mode 100644 new mode 100755 diff --git a/data/ships/imperial_clipper.json b/data/ships/imperial_clipper.json old mode 100644 new mode 100755 diff --git a/data/ships/orca.json b/data/ships/orca.json old mode 100644 new mode 100755 diff --git a/data/ships/python.json b/data/ships/python.json old mode 100644 new mode 100755 diff --git a/data/ships/sidewinder.json b/data/ships/sidewinder.json old mode 100644 new mode 100755 diff --git a/data/ships/type_6_transporter.json b/data/ships/type_6_transporter.json old mode 100644 new mode 100755 diff --git a/data/ships/type_7_transport.json b/data/ships/type_7_transport.json old mode 100644 new mode 100755 diff --git a/data/ships/type_9_heavy.json b/data/ships/type_9_heavy.json old mode 100644 new mode 100755 diff --git a/data/ships/viper.json b/data/ships/viper.json old mode 100644 new mode 100755 diff --git a/data/ships/vulture.json b/data/ships/vulture.json old mode 100644 new mode 100755 diff --git a/gulpfile.js b/gulpfile.js old mode 100644 new mode 100755 index 3bb6f755..84622a37 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,4 +1,5 @@ var gulp = require('gulp'), + exec = require('gulp-exec'), less = require('gulp-less'), jshint = require('gulp-jshint'), minifyCSS = require('gulp-minify-css'), @@ -13,13 +14,15 @@ var gulp = require('gulp'), runSequence = require('run-sequence'), exec = require('child_process').exec, RevAll = require('gulp-rev-all'), - ftp = require( 'vinyl-ftp' ), + scp = require( 'gulp-scp2' ), gutil = require( 'gulp-util' ), svgstore = require( 'gulp-svgstore' ), svgmin = require( 'gulp-svgmin' ), jsonlint = require("gulp-jsonlint"), pkg = require('./package.json'); +var cdnHostStr = ''; + gulp.task('less', function() { return gulp.src('app/less/app.less') .pipe(less({paths: ['less/app.less']}).on('error',function(e){ @@ -32,15 +35,13 @@ gulp.task('less', function() { .pipe(gulp.dest('build')); }); -gulp.task('lint', ['js-lint, json-lint']); - gulp.task('js-lint', function() { return gulp.src('app/js/**/*.js') .pipe(jshint({ undef: true, unused: true, curly: true, - predef: [ 'angular','DB','d3', 'ga', 'GAPI_KEY', 'document' ] + predef: [ 'angular','DB','d3', 'ga', 'GAPI_KEY', 'document' , 'LZString' ] })) .pipe(jshint.reporter('default')); }); @@ -174,7 +175,7 @@ gulp.task('watch', function() { }); gulp.task('cache-bust', function(done) { - var revAll = new RevAll({ dontRenameFile: ['.html','db.json'] }); + var revAll = new RevAll({ prefix: cdnHostStr, dontRenameFile: ['.html','db.json'] }); var stream = gulp.src('build/**') .pipe(revAll.revision()) .pipe(gulp.dest('build')) @@ -194,23 +195,22 @@ gulp.task('cache-bust', function(done) { stream.on('error', done); }); -gulp.task('upload', function() { - var conn = ftp.create({ - host: process.env.CORIOLIS_FTP_HOST, - user: process.env.CORIOLIS_FTP_USER, - password: process.env.CORIOLIS_FTP_PASS, - parallel: 5, - log: gutil.log - }); - - return gulp.src(['build/**'], { base: 'build', buffer: true }) - .pipe(conn.dest('/')); - +gulp.task('upload', function(done) { + exec([ + "rsync -e 'ssh -i ", process.env.CORIOLIS_PEM, "' -a --delete build/ ", process.env.CORIOLIS_USER, "@", process.env.CORIOLIS_HOST, ":~/www" + ].join(''), + done + ); }); +gulp.task('lint', ['js-lint', 'json-lint']); gulp.task('clean', function (done) { del(['build'], done); }); gulp.task('build', function (done) { runSequence('clean', ['html2js','jsonToDB'], ['generateIndexHTML','bower','js','less','copy'], done); }); -gulp.task('deploy', function (done) { runSequence('build','cache-bust', 'upload', done); }); + +gulp.task('deploy', function (done) { + cdnHostStr = '//cdn.' + process.env.CORIOLIS_HOST; + runSequence('build','cache-bust', 'upload', done); +}); gulp.task('dev', function (done) { runSequence('build', 'serve','watch', done); }); gulp.task('default', ['dev']); diff --git a/nginx.conf b/nginx.conf old mode 100644 new mode 100755 index d4ccc2d4..701e13d3 --- a/nginx.conf +++ b/nginx.conf @@ -11,6 +11,7 @@ events { http { access_log off; + charset UTF-8; types { text/html html htm shtml; diff --git a/package.json b/package.json index 70d0b06e..87208da5 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "gulp": "^3.8.11", "gulp-angular-templatecache": "^1.6.0", "gulp-concat": "^2.5.2", + "gulp-exec": "^2.1.1", "gulp-htmlmin": "^1.1.1", "gulp-jshint": "^1.10.0", "gulp-jsonlint": "^1.0.2", @@ -28,7 +29,6 @@ "json-concat": "0.0.0", "main-bower-files": "^2.6.2", "run-sequence": "^1.0.2", - "uglify-js": "^2.4.19", - "vinyl-ftp": "^0.4.1" + "uglify-js": "^2.4.19" } } diff --git a/scripts/json-to-db.js b/scripts/json-to-db.js old mode 100644 new mode 100755