Skip to content

Commit

Permalink
Basic webpack4 builds but does not load. Errors on JBrowse/ConfigAdap…
Browse files Browse the repository at this point in the history
…ter/conf
  • Loading branch information
cmdcolin committed May 9, 2018
1 parent 7050c10 commit ae776b3
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 32 deletions.
6 changes: 3 additions & 3 deletions src/JBrowse/Browser.js
Expand Up @@ -53,7 +53,7 @@ define( [
'JBrowse/View/StandaloneDatasetList',
'dijit/focus',
'../lazyload.js', // for dynamic CSS loading
'dojo/text!./package.json',
'JBrowse/package',


// extras for webpack
Expand Down Expand Up @@ -252,7 +252,7 @@ _initialLocation: function() {
version: function() {
// when a build is put together, the build system assigns a string
// to the variable below.
return JSON.parse(packagejson).version;
return packagejson.version;
}.call(),


Expand Down Expand Up @@ -1401,7 +1401,7 @@ browserMeta: function() {
+ ' <div class="tagline">A next-generation genome browser<br> built with JavaScript and HTML5.</div>'
+ ' <a class="mainsite" target="_blank" href="http://jbrowse.org">JBrowse website</a>'
+ ' <div class="gmod">JBrowse is a <a target="_blank" href="http://gmod.org">GMOD</a> project.</div>'
+ ' <div class="copyright">'+JSON.parse(packagejson).copyright+'</div>'
+ ' <div class="copyright">'+packagejson.copyright+'</div>'
+ ((Object.keys(this.plugins).length>1&&!this.config.noPluginsForAboutBox) ? (
' <div class="loaded-plugins">Loaded plugins<ul class="plugins-list">'
+ array.map(Object.keys(this.plugins), function(elt) {
Expand Down
25 changes: 25 additions & 0 deletions src/JBrowse/package.js
@@ -0,0 +1,25 @@
define(function() {
return {
"name": "JBrowse",
"version": "1.15.0-alpha.0",
"copyright":"© 2007-2017 The Evolutionary Software Foundation",
"main": "main",
"dependencies": {
"dojo": "current",
"dijit": "current",
"dojox": "current",
"util": "current"
},
"description": "A modern client-side genome browser.",
"licenses": [
{
"type": "LGPL-2.1",
"url": "https://raw.github.com/GMOD/jbrowse/master/LICENSE"
}
],
"bugs": "https://github.com/gmod/jbrowse/issues",
"keywords": ["JavaScript", "JBrowse", "Genome Browser", "Genomics", "Bioinformatics"],
"homepage": "http://jbrowse.org",
"dojoBuild": "JBrowse.profile.js"
}
})
23 changes: 0 additions & 23 deletions src/JBrowse/package.json

This file was deleted.

9 changes: 3 additions & 6 deletions webpack.config.js
Expand Up @@ -3,11 +3,10 @@ require('babel-polyfill')

const DojoWebpackPlugin = require("dojo-webpack-plugin")
const CopyWebpackPlugin = require("copy-webpack-plugin")
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const CleanWebpackPlugin = require('clean-webpack-plugin');
const CleanWebpackPlugin = require("clean-webpack-plugin");

const path = require("path")
const glob = require('glob')
const glob = require("glob")
const webpack = require("webpack")

// if JBROWSE_BUILD_MIN env var is 1 or true, then we also minimize the JS
Expand Down Expand Up @@ -56,7 +55,7 @@ var webpackConf = {
),

new webpack.NormalModuleReplacementPlugin(/^dojo\/text!/, function(data) {
data.request = data.request.replace(/^dojo\/text!/, "!!raw-loader!");
data.request = data.request.replace(/^dojo\/text!/, "!raw-loader!");
}),

new webpack.NormalModuleReplacementPlugin(
Expand Down Expand Up @@ -117,8 +116,6 @@ if (DEBUG) {
webpackConf.devtool = 'source-map'
webpackConf.entry.run_jasmine = 'tests/js_tests/main.js'
webpackConf.plugins.push( new webpack.optimize.AggressiveMergingPlugin() )
} else {
webpackConf.plugins.push( new UglifyJsPlugin({maxConcurrentCallsPerWorker: 1}))
}

module.exports = webpackConf

0 comments on commit ae776b3

Please sign in to comment.