Skip to content
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

Use ES6 modules, use webpack bundler (cont.) #283

Merged
merged 39 commits into from May 4, 2017
Merged

Use ES6 modules, use webpack bundler (cont.) #283

merged 39 commits into from May 4, 2017

Conversation

tyrasd
Copy link
Owner

@tyrasd tyrasd commented Feb 18, 2017

continuation of #282 (moving onto a branch on the main github repo for easier collaboration @simon04).

  • install packages from npm via
  • use ES6 module export/import
  • use webpack for bundling the ide (index.html)
  • use webpack for bundling the interactive map (map.html)
  • make the tests run again
  • get rid of *_packaged.html files
  • switch to different publishing mechanism: use gh-pages branch to contain only bundled stuff (like this maybe)?

@tyrasd tyrasd assigned tyrasd and unassigned tyrasd Feb 18, 2017
@tyrasd tyrasd added the todo label Feb 18, 2017
@tyrasd tyrasd changed the title [WIP] Use ES6 modules, use webpack bundler (part II) [WIP] Use ES6 modules, use webpack bundler (cont.) Feb 18, 2017
js/ide.js Outdated
@@ -7,7 +7,7 @@ import CodeMirror from 'codemirror/lib/codemirror.js';
import moment from 'moment';
import tokml from 'tokml';
import togpx from 'togpx';
import * as _saveAs from 'file-saver';
import {saveAs} from 'file-saver';
Copy link
Owner Author

Choose a reason for hiding this comment

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

thanks. I couldn't find out how to get this to run properly on the weekend. I still have to get used to the new import syntax 🤷‍♂️

Copy link
Collaborator

Choose a reason for hiding this comment

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

The best introduction into ES6 modules I've found is the chapter in Exploring ES6.

Required for older browsers and tests on PhantomJS.
@simon04
Copy link
Collaborator

simon04 commented Mar 5, 2017

Jay, all tests finally succeed. I also removed the _packaged.html files.

For publishing, I'd recommend the NPM package gh-pages. Its usage is as simple as npm run build && gh-pages build/.

@tyrasd
Copy link
Owner Author

tyrasd commented Mar 6, 2017

Great! Thanks for the effort, Simon!

Is it correct that now everything is done except for the publishing step (which I'll take a look at asap – and thanks for the tip with the gh-pages package)?

@tyrasd tyrasd changed the title [WIP] Use ES6 modules, use webpack bundler (cont.) Use ES6 modules, use webpack bundler (cont.) Mar 6, 2017
@simon04
Copy link
Collaborator

simon04 commented Mar 6, 2017

Now, copying the icons/ to build/ is also handled by webpack. I think, all tasks are done. But please also try building the application and inspect the output in build/.

For running gh-pages build/, please be aware that this command not only makes a commit, but immediately pushes the result.

@tyrasd tyrasd merged commit bcf1bc4 into master May 4, 2017
@mmd-osm
Copy link
Contributor

mmd-osm commented May 5, 2017

Somehow this change seems to have broken the shortlink feature: the share button only produces lengthy URLs rather than the /s/xyz redirect.

@tyrasd
Copy link
Owner Author

tyrasd commented May 5, 2017

@mmd-osm thanks for spotting that! I think I probably just forgot to set the respective setting when re-deploying on overpass-turbo.eu.

@tyrasd
Copy link
Owner Author

tyrasd commented May 5, 2017

it should work again now. let me know if you find any more regressions. 👍

@mmd-osm
Copy link
Contributor

mmd-osm commented May 7, 2017

I'm not sure about this one. There's a "/missing translation/" shown instead of some German text in Autorun mode: http://overpass-turbo.eu/s/oSq

grafik

@tyrasd
Copy link
Owner Author

tyrasd commented May 7, 2017

👍 It's a regression. And I see this also in the English UI.

tyrasd added a commit that referenced this pull request May 7, 2017
tyrasd added a commit that referenced this pull request May 7, 2017
@mmd-osm
Copy link
Contributor

mmd-osm commented May 8, 2017

Here's another one...

[bbox:{{bbox}}];
node[place=village];
out;

{{style:
node{
  text: eval('tag("name")');
}
}}

Fails with: Error while evaluating mapcss evals TypeError: o.a.evalparser is undefined

@mmd-osm
Copy link
Contributor

mmd-osm commented May 11, 2017

Hmmm.. somehow, a recent deployment broke the shortlink feature again.

@tyrasd tyrasd deleted the es6-webpack branch May 11, 2017 11:07
@tyrasd
Copy link
Owner Author

tyrasd commented May 11, 2017

oops. 🙈 It should now work again.

@mmd-osm
Copy link
Contributor

mmd-osm commented May 12, 2017

There's still something wrong with the new deployment: overpass-turbo.eu reports as "(beta)", and all of my saved queries are gone in the meantime - even the overpass-ide_code in localStorage got overwritten by some other query. :(

@tyrasd
Copy link
Owner Author

tyrasd commented May 12, 2017

sorry again, I really have to fix up my deploy scripts 😒

It should work again now.

even the overpass-ide_code in localStorage

Are you sure? I don't think that's something that could have happened only by me messing up the build parameters here. For me, my saved queries are accessible again now.

@mmd-osm
Copy link
Contributor

mmd-osm commented May 12, 2017

Great, thanks a lot for the quick fix!

Are you sure? I don't think that's something that could have happened only by me messing up the build parameters here. For me, my saved queries are accessible again now.

Yes, you're right. I only looked at the Firefox dev tools, which seems to limit the variable length. All good in turbo now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants