-
-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Initial Webpack work #1306
Conversation
@@ -197,7 +200,7 @@ | |||
function unzipManifest(blob) { | |||
return $q(function(resolve, reject) { | |||
zip.useWebWorkers = true; | |||
zip.workerScriptsPath = "vendor/zip.js/WebContent/"; | |||
zip.workerScriptsPath = 'zipjs/'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'zip' is not defined no-undef
@@ -197,7 +200,7 @@ | |||
function unzipManifest(blob) { | |||
return $q(function(resolve, reject) { | |||
zip.useWebWorkers = true; | |||
zip.workerScriptsPath = "vendor/zip.js/WebContent/"; | |||
zip.workerScriptsPath = 'zipjs/'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'zip' is not defined no-undef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sssh!
'Longer term' (as in it's probably not needed to merge this into master) we would want to understand how and where all the external dependencies are used and remove that ugly block of Also now that everything is seperate modules, we can remove the IIFE and |
Wonderful! What would it take to plug babel into the process so we can use babili and ng-annotate? |
Babel is already operating over all the javascripts, so any additional plugins should be fairly easy. I'm not sure how Babili would go though. Last time I used it (a while ago) I had much difficulty getting it to do anything, so we can see how that goes I guess 😄 |
|
🤔 just plain |
|
@joshhunt This is what I had to do to get it to work in Windows... EDIT: styles are not working but |
The webpack.js change I guess would be due to different versions of node that were running locally. Dropping down to a prev webpack version though is quite interesting though. I'll take at a look at them all and see what we can do. |
Yep, I was running an older version of node... |
@SunburnedGoose you forgot to |
@joshhunt delphiactual@d73a87a fixed it for me they have not pushed new builds out yet that have the rc support but they are in their master branches |
@joshhunt sent you a PR that loads font-awesome and gets webpack to work on windows. |
@delphiactual 💃 great stuff! @SunburnedGoose that exit status code is a bit funky. Looks like it might be related to sass/node-sass#1283 or npm/npm#11024. does |
What is people's thoughts on the best way for generating the complete build, in regards to loading it up for the Chrome Extension? You'll note at the moment that the options url (and the url for DIM I guess) is now I'm thinking to utilise I'm not 100% across how all this Chrome stuff works, so I'll have to defer to the expertise of others here. |
Load fontawesome + Better Windows support?
} | ||
}, | ||
setHash: 0 | ||
}; | ||
console.log({set}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A space is required after '{' object-curly-spacing
A space is required before '}' object-curly-spacing
} | ||
}, | ||
setHash: 0 | ||
}; | ||
console.log({set}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A space is required after '{' object-curly-spacing
A space is required before '}' object-curly-spacing
I did have to run |
}, | ||
STAT_STRENGTH: { | ||
value: 0, | ||
tier: 0, | ||
name: 'Strength', | ||
icon: 'images/Strength.png' | ||
icon: require('app/images/Strength.png'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the code you changed is just for in LoadoutBuilder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh - that's why find wasnt working ;)
require stat icons
… through html-loader
Hmm... In thinking about this more, perhaps requiring developers to re-add the chrome extension isnt the best approach here (its a bit annoying, and would require updating the Bungie API origin header). Ideally, I would prefer to build into What if we instead rename Or are we okay with the one-time only pain of having to readd the extension and updating API settings? |
Origin header takes a wildcard * btw. |
@joshhunt After some googling, it seems that error was a regression in node v7.1 which is what I had :/ Updated to v7.3 and it works. |
Ahh neat - I'm glad to hear that. I'm pretty happy with the work that's here - I think this is at least at a state where it can go into DIM/webpack, if not dev. The only thing left I think is to make sure that the packaging for Chrome Webstore is all good. Don't really know much about that one... There's more that can be done, but I think this represents a pretty good 'MVP' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this differentiate between iOS Safari and Desktop Safari when supporting the last two versions? Just curious about the addition and removal of the Safari filter.
Honestly, it was only there because I copied the config from the babel-present-env readme, and then I just removed it because I thought prev 2 versions is good enough. I'm indifferent as to what's actually used. 'Safari' is just for desktop. iOS is for iOS. See browserlist. |
Looks great and works fine on my end. |
As has been discussed over in #869, this represents the bulk of the initial work in getting Webpack up and running for bundling all of DIM.
Run it (at the moment) with
npm start -s -- --watch
. Everything should be mostly working (at least, everything looks alright. I can't transfer items atm due to aOriginHeaderDoesNotMatchKey
error, I'm not sure if that's just Bungie updating slowly or an error I've introduced).Note that I've updated the chrome
manifest.json
to point to the newgenerated/index.html
, so you'll need to reload the extension.We have all of the dependencies and application scripts bundle up into one JS file, as well as getting Webpack to manage styles and some static assets.
TODO:
@import
them in themain.scss
file.file-loader
+const spartanUrl = require('./images/spartan.png')
might be appropriate.