Skip to content

Commit

Permalink
[build] added script to update the package.json with semVer + path to…
Browse files Browse the repository at this point in the history
… that bin
  • Loading branch information
Grovkillen committed Dec 30, 2019
1 parent 8d29e69 commit b26e79d
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 16 deletions.
10 changes: 10 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,19 @@ module.exports = function(grunt) {
} else {
version = guiEasy.major + '.' + guiEasy.minor + '.' + guiEasy.minimal;
}
let semVer = guiEasy.major + '.' + guiEasy.minor + '.' + guiEasy.minimal;

let packageJSON = grunt.file.read('package.json');
packageJSON = JSON.parse(packageJSON);
packageJSON.version = guiEasy.major + '.' + guiEasy.minor + '.' + guiEasy.minimal;
packageJSON.bin["index.html.gz"] = "build/" + version + "/";
grunt.file.write('package.json',
JSON.stringify(packageJSON,null,2)
);
grunt.log.ok(version);
// add version as a property for the grunt ini loop
grunt.config("version", version);
grunt.config("semVer", semVer);
grunt.task.run(
'clean',
'uglify',
Expand Down
2 changes: 1 addition & 1 deletion build/0.0.nightly.1/gui.min.js

Large diffs are not rendered by default.

Binary file modified build/0.0.nightly.1/index.htm.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion build/0.0.nightly.1/index.min.html

Large diffs are not rendered by default.

Binary file modified build/0.0.nightly.1/src-0.0.nightly.1.zip
Binary file not shown.
32 changes: 18 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{
"name": "compile-gui-easy",
"version": "1.0.0",
"author": "Jimmy 'Grovkillen' Westberg",
"name": "gui-easy",
"version": "0.0.1",
"author": "Jimmy 'Grovkillen' Westberg <jimmy@grovkillen.com> (https://grovkillen.com)",
"license": "GPL-3.0-or-later",
"description": "A packager for the GUI Easy application for ESP Easy",
"description": "Front End for ESP Easy",
"bin": {
"index.html.gz": "build/<version>/"
},
"repository": {
"type": "git",
"url": "https://github.com/letscontrolit/GUIEasy"
"index.html.gz": "build/0.0.nightly.1/"
},
"repository": "github:letscontrolit/GUIEasy",
"devDependencies": {
"grunt": "^1.0.4",
"grunt-contrib-uglify-es": "^3.3.0",
Expand All @@ -20,9 +17,16 @@
"grunt-contrib-compress": "^1.6.0",
"grunt-zopfli-native": "^2.0.0",
"grunt-processhtml": "^0.4.2",
"grunt-file-append": "^0.0.7"
"grunt-file-append": "^0.0.7",
"npm": "^6.13.4"
},
"scripts": {
"build": "node Gruntfile.js"
},
"dependencies": {
"npm": "^6.13.1"
}
}
"keywords": [
"ESP Easy",
"CSS framework",
"GUI",
"Frontend"
]
}

0 comments on commit b26e79d

Please sign in to comment.