Skip to content
This repository was archived by the owner on Apr 5, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 47 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = function (grunt) {
const path = require('path');

module.exports = function (grunt) {

//the following files are to be included in every bundle
coreSrcFiles = [
Expand Down Expand Up @@ -196,6 +198,48 @@
}
}
},
webpack: {
config: {
mode: 'production',
entry: [
'./src/idd/idd.assembled.js'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider rename to idd.selfcontained.js.

],
output: {
filename: 'idd.assembled.js',
path: path.resolve(__dirname, 'dist')
},
optimization: {
minimize: true
},
stats: {
warnings: false
},
module: {
rules: [
{
test: /\.css$/,
use: [
'style-loader',
'css-loader'
]
},
{
test: /\.(jpe?g|png|ttf|eot|svg|woff(2)?)(\?[a-z0-9=&.]+)?$/,
use: {
loader: 'base64-inline-loader',
options: {
limit: 3000,
name: '[name].[ext]',

fallback: "file-loader",
name: '[name].[ext]',
}
}
},
]
}
}
},
});

grunt.loadNpmTasks('grunt-contrib-uglify');
Expand All @@ -205,8 +249,9 @@
grunt.loadNpmTasks('grunt-base64');
grunt.loadNpmTasks("grunt-ts");
grunt.loadNpmTasks('grunt-tsd');
grunt.loadNpmTasks('grunt-webpack');

grunt.registerTask('update-tsd', ['tsd']);
grunt.registerTask('default', ['concat:heatmap_worker', 'base64', 'concat:heatmap_worker_embedded', 'concat:styles', 'concat:dist_ko', 'ts:dist', 'concat:dist', 'uglify', 'copy', 'concat:umd', 'concat:umdTs', 'ts:testGlobal', 'ts:test', 'jasmine']);
grunt.registerTask('default', ['concat:heatmap_worker', 'base64', 'concat:heatmap_worker_embedded', 'concat:styles', 'concat:dist_ko', 'ts:dist', 'concat:dist', 'uglify', 'copy', 'concat:umd', 'concat:umdTs', 'ts:testGlobal', 'ts:test', 'jasmine', 'webpack']);
grunt.registerTask('test', ['jasmine']);
};
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,20 @@
"svg.js": "~2.3.6"
},
"devDependencies": {
"base64-inline-loader": "^1.1.1",
"css-loader": "^2.1.1",
"grunt": "^0.4.5",
"grunt-base64": "^0.1.0",
"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-copy": "^0.8.2",
"grunt-contrib-jasmine": "^1.0.0",
"grunt-contrib-uglify": "^0.9.1",
"grunt-ts": "^5.2.0",
"grunt-tsd": "^0.1.0"
"grunt-tsd": "^0.1.0",
"grunt-webpack": "^3.1.3",
"script-loader": "^0.7.2",
"style-loader": "^0.23.1",
"webpack": "^4.29.6"
},
"scripts": {
"test": "grunt default test --verbose"
Expand Down
5 changes: 5 additions & 0 deletions src/idd/idd.assembled.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import "script-loader!jquery"
import "script-loader!rx"
import "script-loader!jquery-mousewheel"
import "script-loader!../../dist/idd.js"
import '../../dist/idd.css';
Loading