JSRocksHQ / harmonic

The next static site generator
http://harmonicjs.com/
MIT License
282 stars 26 forks source link

Fix #99 #104

Closed UltCombo closed 9 years ago

UltCombo commented 9 years ago

harmonic run opens web browser and harmonic new_post|page opens the markdown files in the text editor by default (prevent it passing a --no-open flag), fix #99. Details in the commit messages.

UltCombo commented 9 years ago

@jaydson indeed, the build is failing on Travis too. Weird, it was passing when I first pushed those commits, something might have changed in gulp-6to5 or 6to5.

UltCombo commented 9 years ago

I'll debug this when I get home.

UltCombo commented 9 years ago

Found the issue. The new gulp-6to5 version depends on the 6to5-core package instead of 6to5, that's why the require fails. This error is new, guess this is one more reason we should use a direct dependency then.

UltCombo commented 9 years ago

@sebmck sorry to bother you, but what is the correct approach in this case -- we are shipping 6to5'ed code, but still need to require 6to5/polyfill in order for certain features to work.

In this case, should we have 6to5/6to5-core as a dependency of the 6to5'ed package so that it can require('6to5/polyfill')? Isn't there a 6to5-polyfill or such to add as a dependency of the 6to5'ed package instead of depending on the whole transpiler?

sebmck commented 9 years ago

@UltCombo 6to5-core is exactly the same as 6to5 except it lacks the CLI which results in fewer dependencies to install etc. It includes all the same files so you can require 6to5-core/polyfill all the same.

Unfortunately there's no 6to5-polyfill package but I'm not sure if it'd be worth the extra package as it's literally only:

require("core-js/shim");
require("regenerator/runtime");
UltCombo commented 9 years ago

@sebmck makes sense, thanks!

sebmck commented 9 years ago

@UltCombo No problem! Feel free to ping me in any issues as I'm more than happy to help.

UltCombo commented 9 years ago

@sebmck thanks again!

@jaydson please take a look. I've added core-js and regenerator as dependencies so consumers running npm install won't have to pull the whole 6to5 package.

jaydson commented 9 years ago

Working just fine :) Thanks @UltCombo and @sebmck !

UltCombo commented 9 years ago

Yaay :smile: