<p dir="auto">Just a suggestion: do not ignore the src and examples folders when installing three.js from npm and/or bower.</p>
<p dir="auto">This would not break compatibility with existing projects that use npm or bower to install three.js, but provide a valid use case: it would allow to integrate a custom build process for three.js into our existing build pipelines for our apps.</p>
<p dir="auto">The current way for custom builds as outlined in <a href="https://github.com/mrdoob/three.js/wiki/build.py,-or-how-to-generate-a-compressed-Three.js-file">https://github.com/mrdoob/three.js/wiki/build.py,-or-how-to-generate-a-compressed-Three.js-file</a> is focused on a manual process: clone the repo, run the build, and add the finished custom JS file to your app's git repo. However that cannot be automated conveniently within the context of existing build processes for our own apps. Upon updates of three.js you have to repeat these steps every time.</p>
<p dir="auto">On the other hand if the src and examples files would not be excluded, one could use the package managing power of npm or bower to include your three.js dependency in your project (with the ability to target specific versions, version ranges, the dev branch...), and have your build workflow of choice (gulp, grunt, whatever) automate the custom build process, as it would be able to pick the individual src files from the installed package (node_modules/bower_components) now. This would allow for effortless updates, integration in CI server workflows etc.</p>
<p dir="auto">I can file a PR (easy enough ;)), just wanted to know if there might be objections?</p>
<p dir="auto">The main source code has recently been ported to ES2015 modules (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="164650131" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/9310" data-hovercard-type="pull_request" data-hovercard-url="/mrdoob/three.js/pull/9310/hovercard" href="https://github.com/mrdoob/three.js/pull/9310">#9310</a>); however, some parts are still relying on global namespace pollution and have thus become unusable.</p>
<p dir="auto">Specifically the things in <code class="notranslate">/examples/js/</code> haven't been transformed to support modules yet; this makes them currently unusable from within environments such as webpack or SystemJS.</p>
<p dir="auto">Edit, 11-20-2016: They <em>can</em> be used, but it requires a lot of setup: <a href="https://github.com/systemjs/systemjs/issues/666" data-hovercard-type="issue" data-hovercard-url="/systemjs/systemjs/issues/666/hovercard">SystemJS</a>, <a href="https://github.com/webpack/imports-loader">webpack</a>. If you need assistance with these: Sorry, but this is the wrong thread to announce it! 😄</p>