diff --git a/CHANGELOG.md b/CHANGELOG.md index 75fd08c4..d3d512f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## v0.2.12 +* Project and packages synchronization based on the bower.json file: + - Keep track of the project status. + - Synchronize with the current packages installed + - Synchronize with the bower.json definition. +* Keep track of bower.json changes. +* Tests clean up. +* Bug fixing. + ## v0.2.11 * Fixing bug when loading project dependencies. diff --git a/nls/es/strings.js b/nls/es/strings.js index 7d7b03c6..647c044e 100644 --- a/nls/es/strings.js +++ b/nls/es/strings.js @@ -74,5 +74,9 @@ define({ "SUMMARY_ERROR": "Oops! OcurriĆ³ un error.", "SYNC_WITH_PROJECT_TITLE": "Sincronizar con paquetes del proyecto", "SYNC_WITH_BOWER_JSON_TITLE": "Sincronizar con bower.json", - "PROJECT_OUT_OF_SYNC_MESSAGE": "No sincronizado" + "SYNC_PROJECT_MESSAGE": "Sincronizando proyecto", + "SYNC_PROJECT_SUCCESS_MESSAGE": "Proyecto sincronizado", + "PROJECT_OUT_OF_SYNC_MESSAGE": "No sincronizado", + "PKG_STATUS_MISSING": "No instalado", + "PKG_STATUS_VERSIONS": "Versiones no coinciden" }); diff --git a/nls/root/strings.js b/nls/root/strings.js index e49e4345..729d524a 100644 --- a/nls/root/strings.js +++ b/nls/root/strings.js @@ -75,5 +75,10 @@ define({ "SUMMARY_ERROR": "Oops! An error ocurred.", "SYNC_WITH_PROJECT_TITLE": "Synchronize with project packages", "SYNC_WITH_BOWER_JSON_TITLE": "Synchronize with bower.json", - "PROJECT_OUT_OF_SYNC_MESSAGE": "Out of sync" + "SYNC_PROJECT_MESSAGE": "Synchronizing project", + "SYNC_PROJECT_SUCCESS_MESSAGE": "Project synchronized", + "PROJECT_OUT_OF_SYNC_MESSAGE": "Out of sync", + "PKG_STATUS_MISSING": "Missing", + "PKG_STATUS_NOT_TRACKED": "Not tracked", + "PKG_STATUS_VERSIONS": "Versions don\'t match" }); diff --git a/package.json b/package.json index cec7b938..686dc66a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "brackets-bower", "title": "Brackets Bower", - "version": "0.2.11", + "version": "0.2.12", "description": "Manage your application's front-end dependencies using Bower. You can install and prune dependencies using the bower.json file and configure Bower through .bowerrc. Also, quickly install front-end packages by hitting Ctrl/Cmd-Alt-B, then start typing the name of a package. Once you see the package you want, hit Enter and the package will be installed into your project folder. NOTE: To install some packages, you must have Git installed.", "author": "Albertina Durante (https://github.com/albertinad)", "homepage": "https://github.com/albertinad/brackets-bower", @@ -34,6 +34,7 @@ "bower", "package manager", "javascript", + "JavaScript", "libraries", "dependencies", "packages", diff --git a/src/panel/controllers/PanelController.js b/src/panel/controllers/PanelController.js index 982fc512..df03327b 100644 --- a/src/panel/controllers/PanelController.js +++ b/src/panel/controllers/PanelController.js @@ -242,11 +242,11 @@ define(function (require, exports, module) { syncOption = ProjectManager.SyncOptions.MATCH_PROJECT_FOLDER; } - var statusId = StatusBarController.post("Synchronizing project", true); + var statusId = StatusBarController.post(Strings.SYNC_PROJECT_MESSAGE, true); ProjectManager.synchronizeProject(syncOption).then(function () { - StatusBarController.update(statusId, "Successfuly synchronized", false); + StatusBarController.update(statusId, Strings.SYNC_PROJECT_SUCCESS_MESSAGE, false); }).fail(function (error) { that._view.syncFailed(); diff --git a/src/project/PackageFactory.js b/src/project/PackageFactory.js index 952f4b1d..ded3e335 100644 --- a/src/project/PackageFactory.js +++ b/src/project/PackageFactory.js @@ -256,9 +256,12 @@ define(function (require, exports, module) { Package.prototype.isVersionInSync = function () { var isInSync; - if ((this._bowerJsonVersion !== null) && (semver.validRange(this._bowerJsonVersion) !== null)) { + if (this._version !== null && this._bowerJsonVersion !== null && + semver.validRange(this._bowerJsonVersion) !== null) { + isInSync = semver.satisfies(this._version, this._bowerJsonVersion); } else { + isInSync = true; } diff --git a/templates/packages-section.html b/templates/packages-section.html index 026520ef..2c1ff77b 100644 --- a/templates/packages-section.html +++ b/templates/packages-section.html @@ -31,16 +31,22 @@ {{ #isNotTracked }}
-
Not Tracked
+
{{ Strings.PKG_STATUS_NOT_TRACKED }}
{{ /isNotTracked }} {{ #isMissing }}
-
Missing
+
{{ Strings.PKG_STATUS_MISSING }}
{{ /isMissing }} + {{ ^isVersionInSync }} +
+
{{ Strings.PKG_STATUS_VERSIONS }}
+
+ {{ /isVersionInSync }} +
{{ #isProductionDependency }}
Prod