- Get webpack stats into json file
NODE_ENV=production ./node_modules/.bin/webpack --config config/webpack.config.js --json > stats.json- Upload your
stats.jsonfile to webpack-visualizer
| (function() { | |
| 'use strict'; | |
| angular | |
| .module('app.services') | |
| .factory('$ionicPlatformManager', $ionicPlatformManager) | |
| ; | |
| /* @ngInject */ |
| (function() { | |
| 'use strict'; | |
| // use new relic if license key exists | |
| if (typeof process.env.NEW_RELIC_LICENSE_KEY === 'string') { | |
| require('newrelic'); | |
| } | |
| var express = require('express'), |
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
NODE_ENV=production ./node_modules/.bin/webpack --config config/webpack.config.js --json > stats.jsonstats.json file to webpack-visualizer| UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 11): Error: expect(received).toEqual(expected) | |
| Expected value to equal: | |
| [{"payload": {"id": "operatingsystem", "search": "/hosts?search=os_title=~VAL~", "title": "OS Distribution", "url": "statistics/operatingsystem"}, "type": "STATISTICS_DATA_REQUEST"}, {"payload": {"id": "architecture", "search": "/hosts?search=facts.architecture=~VAL~", "title": "Architecture Distribution", "url": "statistics/architecture"}, "type": "STATISTICS_DATA_REQUEST"}, {"payload": {"data": [["centOS 7.1", 6]], "id": "operatingsystem", "search": "/hosts?search=os_title=~VAL~", "title": "OS Distribution", "url": "statistics/operatingsystem"}, "type": "STATISTICS_DATA_SUCCESS"}, {"payload": {"data": [["x86_64", 6]], "id": "architecture", "search": "/hosts?search=facts.architecture=~VAL~", "title": "Architecture Distribution", "url": "statistics/architecture"}, "type": "STATISTICS_DATA_SUCCESS"}] | |
| Received: | |
| + Array [] | |
| Difference: | |
| - Expected |
| def get_resource | |
| instance_variable_get("@#{controller_name.singularize}") | |
| end | |
| def get_resource_label(resource) | |
| resource.try(:to_label) || resource.try(:to_s) unless resource.new_record? | |
| end | |
| def get_resource_menu(resource) | |
| label = get_resource_label(resource) |
Cancel 1 last commit, and keep the changes:
git reset HEAD~1Can replace the number 1 to cancel more than one commit at once:
git reset HEAD~5Can cancel the commit and remove the changes (dangerous) :