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

Minified bundle no longer accurate. #19

Open
syntaxseed opened this issue Oct 8, 2019 · 7 comments
Open

Minified bundle no longer accurate. #19

syntaxseed opened this issue Oct 8, 2019 · 7 comments
Labels
easy Should be quite easy to complete hacktoberfest Welcoming contributors for Hacktoberfest! help wanted Extra attention or help is needed

Comments

@syntaxseed
Copy link
Owner

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?

@syntaxseed syntaxseed added help wanted Extra attention or help is needed easy Should be quite easy to complete labels Oct 8, 2019
@syntaxseed
Copy link
Owner Author

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.

@syntaxseed
Copy link
Owner Author

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.

@syntaxseed syntaxseed added the hacktoberfest Welcoming contributors for Hacktoberfest! label Oct 10, 2019
@deziev
Copy link
Contributor

deziev commented Oct 10, 2019

Working on bundle and es6 migration right now. and faced same problem "nothing is available from index.html". Have some ideas

@deziev
Copy link
Contributor

deziev commented Oct 10, 2019

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:
image

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 added a commit to deziev/terminalfaker that referenced this issue Oct 10, 2019
Rewrite code to es6; change project structure

syntaxseed#19
deziev added a commit to deziev/terminalfaker that referenced this issue Oct 10, 2019
@EstherAF
Copy link

@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/

@EstherAF
Copy link

EstherAF commented Oct 25, 2019

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

@syntaxseed
Copy link
Owner Author

@EstherAF I tried to get it working with WebPack but failed miserably. 😥

@deziev deziev mentioned this issue Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy Should be quite easy to complete hacktoberfest Welcoming contributors for Hacktoberfest! help wanted Extra attention or help is needed
Projects
None yet
Development

No branches or pull requests

3 participants