Commit ce14fc55 authored by Eirik Alvær's avatar Eirik Alvær

Made the source maps work.

parent c0ec98b4
......@@ -7,7 +7,7 @@
<script src="//cdn.jsdelivr.net/underscorejs/1.5.2/underscore-min.js" type="text/javascript" encoding="utf-8"></script>
<script src="//code.highcharts.com/highcharts.js" type="text/javascript" encoding="utf-8"></script>
<script src="//code.highcharts.com/highcharts-more.js" type="text/javascript" encoding="utf-8"></script>
<script src="build/spiderwidget/spiderwidget.js" type="text/javascript" encoding="utf-8"></script>
<script src="build/spiderwidget/spiderwidget-min.js" type="text/javascript" encoding="utf-8"></script>
<link rel="stylesheet" type="text/css" href="build/spiderwidget/spiderwidget.css"/>
<link rel="stylesheet" type="text/css" href="build/spiderwidget/red-theme.css"/>
......
......@@ -3,7 +3,6 @@
module.exports = function(grunt) {
// Load libs
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-handlebars-compiler');
......@@ -11,7 +10,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jslint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-mocha');
grunt.loadNpmTasks('grunt-bump');
grunt.loadNpmTasks('grunt-contrib-connect');
......@@ -22,35 +20,23 @@ module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: "\n",
banner: "(function (jQuery, _, Handlebars, Highcharts) {",
footer: "}(jQuery, _, Handlebars, Highcharts));"
},
dist: {
src: [
'buildtmp/compiled-templates.js',
'src/js/common.js',
'src/js/messagebus.js',
'src/js/server.js',
'src/js/table.js',
'src/js/charts.js',
'src/js/spiderwidget.js'
],
dest: 'build/spiderwidget/spiderwidget.js'
}
},
uglify: {
options: {
sourceMap: 'build/spiderwidget/spiderwidget-sourcemap.js',
sourceMapRoot: 'build/spiderwidget/',
sourceMap: true,
sourceMapName: 'build/spiderwidget/spiderwidget-min.map',
compress: true
},
production: {
files: {
'build/spiderwidget/spiderwidget-min.js': 'build/spiderwidget/spiderwidget.js'
'build/spiderwidget/spiderwidget-min.js': [
'buildtmp/compiled-templates.js',
'src/js/common.js',
'src/js/messagebus.js',
'src/js/server.js',
'src/js/table.js',
'src/js/charts.js',
'src/js/spiderwidget.js'
]
}
}
},
......@@ -135,7 +121,7 @@ module.exports = function(grunt) {
livereload: true
},
scripts: {
files: ['src/**/*.js', 'test/**/*.js'],
files: ['src/**/*.js', 'test/**/*.js', 'gruntfile.js'],
tasks: ['default'],
options: {
atBegin: true
......@@ -200,7 +186,6 @@ module.exports = function(grunt) {
grunt.registerTask('build', [
'handlebars',
'test',
'concat',
'sass',
'uglify:production',
'clean:build'
......
......@@ -7,7 +7,7 @@
<script src="//cdn.jsdelivr.net/underscorejs/1.5.2/underscore-min.js" type="text/javascript" encoding="utf-8"></script>
<script src="//code.highcharts.com/highcharts.js" type="text/javascript" encoding="utf-8"></script>
<script src="//code.highcharts.com/highcharts-more.js" type="text/javascript" encoding="utf-8"></script>
<script src="build/spiderwidget/spiderwidget.js" type="text/javascript" encoding="utf-8"></script>
<script src="build/spiderwidget/spiderwidget-min.js" type="text/javascript" encoding="utf-8"></script>
<link rel="stylesheet" type="text/css" href="build/spiderwidget/spiderwidget.css"/>
<link rel="stylesheet" type="text/css" href="build/spiderwidget/red-theme.css"/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment