2015-06-22 54 views
0

我已經構建了一個測試應用程序,它有吞噬角。我認爲源地圖是自動生成的。我構建應用程序後,當我看廠商xxx.js,它看起來像:源地圖行爲 - 如何在縮小之前查看原始javascript

     /*! 
         * jQuery JavaScript Library v2.1.4 
         * http://jquery.com/ 
         * 
         * Includes Sizzle.js 
         * http://sizzlejs.com/ 
         * 
         * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors 
         * Released under the MIT license 
         * http://jquery.org/license 
         * 
         * Date: 2015-04-28T16:01Z 
         */ 
         !function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t="length"in e&&e.length,n=Q.type(

這仍然是精縮吧?

如何查看原始JavaScript文件?

PS。這就是app-xxx.js的樣子:

    !function() { 
         "use strict"; 
         angular.module("test", ["ngAnimate", "ui.router", "ui.bootstrap"]) 
        }(), function() { 
         "use strict"; 
         function t() { 
          function t() { 
           return n 
          } 
          var n = [{title: "AngularJS",url: "https://angularjs.org/",description: "HTML enhanced for web apps!",logo: "angular.png"}, {title: "BrowserSync",url: "http://browsersync.io/",description: "Time-saving synchronised browser testing.",logo: "browsersync.png"}, {title: "GulpJS",url: "http://gulpjs.com/",description: "The streaming build system.",logo: "gulp.png"}, {title: "Jasmine",url: "http://jasmine.github.io/",description: "Behavior-Driven JavaScript.",logo: "jasmine.png"}, {title: "Karma",url: "http://karma-runner.github.io/",description: "Spectacular Test Runner for JavaScript.",logo: "karma.png"}, {title: "Protractor",url: "https://github.com/angular/protractor",description: "End to end test framework for AngularJS applications built on top of WebDriverJS.",logo: "protractor.png"}, {title: "Bootstrap",url: "http://getbootstrap.com/",description: "Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.",logo: "bootstrap.png"}, {title: "Angular UI Bootstrap",url: "http://angular-ui.github.io/bootstrap/",description: "Bootstrap components written in pure AngularJS by the AngularUI Team.",logo: "ui-bootstrap.png"}, {title: "Stylus",url: "http://learnboost.github.io/stylus/",description: "Stylus is a revolutionary new language, providing an efficient, dynamic, and expressive way to generate CSS. Supporting both an indented syntax and regular CSS style.",logo: "stylus.png"}]; 
          this.getTec = t 
         } 
         angular.module("test").service("webDevTec", t) 
        }(), function() { 
         "use strict"; 
         function t() { 

回答

1

我使用單獨的gulp任務進行開發與生產。所以當我運行gulp --debug時,它將跳過縮小構建步驟。所以如果你沒有這樣的一步,那可能值得設置。

看看npm包:gulp-ifyargs

我對源地圖並不熟悉,但我相信在Chrome開發工具中點擊Pretty JavaScript/CSS按鈕可能會訣竅...?

相關問題