-
Notifications
You must be signed in to change notification settings - Fork 12
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
Refactoring suggestions #3
Comments
Like caching the bundle once it's generated? The reason why I'm forcing development mode is that I'm also a bit curious as to what mechanism browserify uses to prevent the process from ending...
Async functions make me forget I'm using promises sometimes :)
I mean, that's pretty much already the case. The exclusively browser-side code is in src/entry/ and src/browser/, and src/components/pug-preview.js is designed to work on both platforms. The only slightly tricky business is with the
Unless we decide to move away from Bootstrap (which I used to counter my laziness and lack of talent at CSS), I'm reluctant to discard Sass which does make customizing Bootstrap radically easier. Or of course we can always cheat with the (admittedly gigantic) emscripted version. After all, pug-www is going to be static anyway, so unless the developer is using Windows this shouldn't be a major problem. Or maybe people are. I don't know. |
browserify in development watches the files for changes so it can re-build on the fly. That file watcher keeps the process alive. That's not a deliberate choice, but we need to rebuild on changes in development. Each of the things browserify-middleware does can be enabled/disabled individually. Gzip and caching is not worth worrying about either way. minifying is the only thing that we might want to disable because stop can do it for you, but doing it twice won't really do any harm.
Long term, we could do that. There's no rush on that last part at the moment, but I want to make this as easy as possible for users (including windows users) to contribute to. |
Another thing about node-sass: it provides prebuilt binaries for a wide variety of OS, architectures, and Node.js, so in most cases a compiler toolchain shouldn't be needed. Eventually it took a bit more than expected to fix the Browserify issue, but it works fine now. |
We need to load content from
https://github.com/pugjs/pug-{language}/
when it's not available locally. This is what will happen in the travis deployment. I suggest a few refactorings:en
) with no/en/
url prefixserver.close()
. We can manually disable minification as appropriate, but should do that separately.The text was updated successfully, but these errors were encountered: