Open syntaxseed opened 5 years ago
OMG, installed babel-cli and babel-minify npm packages and my node modules now has 168 directories and 1 reported vulnerability.
There must be a better way.
Been trying to get this to work with webpack, but webpack encloses everything in a module scope and nothing is available from index.html. Anyone who can get the basics of combining and minifying the files in the src directory would be a big help.
Working on bundle and es6 migration right now. and faced same problem "nothing is available from index.html". Have some ideas
So, my idea was to create global variables and access them from bundled code. In that case index.html will look like this
<!-- Global variables -->
<script src="filesystem.js"></script>
<script src="customCommands.js"></script>
<!-- Minified build -->
<script src="bundle.min.js"></script>
</body>
</html>
And the project structure:
js
directory is bundled by webpack. Components like filesystem and custom commands to which user have access to change should be defined in src
and have global scope
@syntaxseed dunno how to sync my fork. if I could create branches in this repo it would be lot easier)
@deziev to synk your fork you have to merge or rebase @syntaxseed master branch.
Here you have a more detailed tutorial: https://akrabat.com/the-beginners-guide-to-contributing-to-a-github-project/
You are talking about webpack but there is no webpack configuration file, or even package.json configuration file in master branch. I'd like to help, but I'm missing something here...
I have some ideas to get this bundled, transpiled and minified, but also available from the global context, but if there is some work already done in this direction, would be better than starting from scratch
@EstherAF I tried to get it working with WebPack but failed miserably. 😥
Minified bundle is no longer accurate. Need to configure a Babel process to minify.
Let's discuss - do we need to also transpile to ES5? What is browser support for ES6 these days?