Skip to content

Commit

Permalink
build improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Mrowetz committed Apr 7, 2015
1 parent 550f643 commit 7c6e094
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 23 deletions.
31 changes: 10 additions & 21 deletions Gruntfile.js
@@ -1,10 +1,9 @@
module.exports = function( grunt ) {
"use strict";

require("load-grunt-tasks")(grunt); // npm install --save-dev load-grunt-tasks
require("load-grunt-tasks")(grunt);


var banner = "/*https://github.com/micmro/performance-bookmarklet by Michael Mrowetz @MicMro*/\n";
var banner = "/* https://github.com/micmro/performance-bookmarklet by Michael Mrowetz @MicMro\n build:<%= grunt.template.today(\"dd/mm/yyyy\") %> */\n";

grunt.initConfig({
copy : {
Expand Down Expand Up @@ -34,23 +33,14 @@ module.exports = function( grunt ) {
},
browserify: {
options: {
banner : banner
},
files: {
"dist/performanceBookmarklet.js": ["dist/tempEs5/**/*.js"],
banner: banner
},
dist: {
files: {
"dist/performanceBookmarklet.js": ["dist/tempEs5/**/*.js"],
}
}
},
// concat: {
// options: {
// separator: "\n\n\n",
// banner: "/*https://github.com/micmro/performance-bookmarklet\n by Michael Mrowetz @MicMro*/\n\n(function(){\n\"use strict\";\n\n",
// footer: "\n\n})();",
// },
// dist: {
// src: ["dist/style.js", "src/helpers/helpers.js", "src/helpers/dom.js", "src/helpers/svg.js", "src/init.js", "src/summaryTiles.js", "src/navigationTimeline.js", "src/pieChart.js", "src/table.js", "src/resourcesTimeline.js", "src/consoleOutput.js"],
// dest: "dist/performanceBookmarklet.js",
// },
// },
uglify : {
options: {
compress: {
Expand All @@ -61,9 +51,9 @@ module.exports = function( grunt ) {
},
banner: banner
},
my_target: {
dist: {
files: {
'dist/performanceBookmarklet.min.js': ["dist/performanceBookmarklet.js"]
"dist/performanceBookmarklet.min.js": ["dist/performanceBookmarklet.js"]
}
}
},
Expand Down Expand Up @@ -100,5 +90,4 @@ module.exports = function( grunt ) {
});

grunt.registerTask("default", ["inlineCssToJs", "copy", "babel", "browserify", "uglify", "watch:babel"]);
//grunt.registerTask("default", ["inlineCssToJs", "concat", "uglify", "watch:scripts"]);
};
3 changes: 3 additions & 0 deletions dist/performanceBookmarklet.js
@@ -1,3 +1,6 @@
/* https://github.com/micmro/performance-bookmarklet by Michael Mrowetz @MicMro
build:06/04/2015 */

(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";

Expand Down
3 changes: 2 additions & 1 deletion dist/performanceBookmarklet.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -21,8 +21,8 @@
},
"devDependencies": {
"grunt-babel": "^4.0.0",
"grunt-banner": "^0.3.1",
"grunt-browserify": "^3.6.0",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-copy": "^0.8.0",
"grunt-contrib-uglify": "^0.6.0",
"grunt-contrib-watch": "^0.6.1",
Expand Down

0 comments on commit 7c6e094

Please sign in to comment.