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

Add option for verifying and minifying files #548

Closed
dethe opened this issue Feb 8, 2014 · 8 comments
Closed

Add option for verifying and minifying files #548

dethe opened this issue Feb 8, 2014 · 8 comments
Assignees

Comments

@dethe
Copy link
Member

dethe commented Feb 8, 2014

bin/build should have command-line options for minifying the resulting files and for verifying the javascript and css files.

Maybe even an option to build the html files to load css/js files directly without concatenating, so they don't have to be continually rebuilt in dev mode?

@dethe dethe added this to the Beta + IDE milestone Feb 8, 2014
@CelticMinstrel
Copy link
Contributor

Also, why does it report success when (for example) a JSON file has been found to have incorrect syntax?

@dethe
Copy link
Member Author

dethe commented Feb 9, 2014

That would be a bug.

@ztsai
Copy link

ztsai commented Feb 9, 2014

Just wondering if it's possible to have a dev environment where we don't need to run bin/build every time we make changes? It's especially annoying when I'm debugging, because I'll need to rebuild every time after I make some minor js changes. (and I'll often forget to do that......)
I'm thinking about a watch option that watches changes in js files and rebuild automatically, or even better, ability to run the server without building (I am not sure if it's feasible as I only scan through the build file, but maybe we can chain js files with requriejs?)

@dethe
Copy link
Member Author

dethe commented Feb 9, 2014

I think that's one of the next things I'll work on.

@CelticMinstrel
Copy link
Contributor

I get the impression that running without building first is pretty infeasible, but there might be a way I've not thought of.

@dethe
Copy link
Member Author

dethe commented Feb 9, 2014

Now that we build the html files from templates, we could insert tags to load all the files in dev mode. We could have flags on bin/build to optionally lint/validate/minimize the files before linking them. For the runtime files it's a bit trickier, but in order to support offline we're going to have to use our local iframerunner.html anyway (not as secure, but it may be premature to worry about that), so we could templatize that too and load the runtime files directly instead of passing a link to the library from IDE to iframe. The hardest bit will be the code generated from blocks, but if we get enough value from this, that may be do-able.

One thing that came up when talking to students was whether we should standardize on var functionName = function functionName(/* args */){ /* body */); or on function functionName(/* args */){ /* body */ and now I remember why it should be the first (and unfortunately more verbose) one: In strict mode, function statements inside functions are prohibited. Since we're wrapping everything in IIFEs, we'll need to use var functionName = function ....

@dethe
Copy link
Member Author

dethe commented Feb 24, 2014

All of this is part of #269

@dethe dethe self-assigned this Feb 24, 2014
@dethe dethe modified the milestones: 1.0 Launch, Beta + IDE Jul 6, 2014
@dethe dethe modified the milestones: 1.0 Launch, Custom Elements Jan 6, 2015
@dethe
Copy link
Member Author

dethe commented Jan 16, 2015

As of the current developer branch there is no need for a build step any more.

@dethe dethe closed this as completed Jan 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants