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

do not minify build #2

Closed
Guria opened this issue Oct 4, 2016 · 4 comments
Closed

do not minify build #2

Guria opened this issue Oct 4, 2016 · 4 comments

Comments

@Guria
Copy link

Guria commented Oct 4, 2016

typescript-standard is not intended tobe part of browser bundle. There is no good reason to uglify build.
It's not usual to make minification for node modules and it also affects error outputs.
Eg, I have now completely useless error like:

turn r.m=t,r.c=n,r.p="",r(0)}([function(t,r,n){"use strict";var i=n(1),e=n(13),o=n(11),a=n(10),u=o.argv.slice(2),s=u.filter(function(t){return!t.startsWith("-")}),c=u.in
cludes("--pretty"),f=u.includes("--verbose"),l=null;parseInt(o.version.match(/v(\d+)\./)[1],10)<4&&(console.error("standard: Node v4 or greater is required. `standard` d
id not run."),o.exit(1)),s.length&&(l=a.expend(s));var d=e.ValidatorOutputFormat.PROSE_OUTPUT;c?d=e.ValidatorOutputFormat.STYLISH_OUTPUT:f&&(d=e.ValidatorOutputFormat.VE
RBOSE_OUTPUT);var p=function(t){return t.failureCount>0&&console.log(t.output),!1};i.lint({format:d,files:l,callback:p})},function(t,r,n){"use strict";function i(t){void
 0===t&&(t={});var r=new o.ValidatorConfigParser,n=t.files&&t.files.length?t.files:r.files(),i=r.options(t.format||a.                                                    

TypeError: u.includes is not a function                                                                                                                                  
    at Object.t (d:\ws\testapp\node_modules\typescript-standard\bin\cli.js:2:337)                                                                                        
    at r (d:\ws\testapp\node_modules\typescript-standard\bin\cli.js:2:107)                                                                                               
    at d:\ws\testapp\node_modules\typescript-standard\bin\cli.js:2:194                                                                                                   
    at Object.<anonymous> (d:\ws\testapp\node_modules\typescript-standard\bin\cli.js:2:199)                                                                              
    at Module._compile (module.js:409:26)                                                                                                                                
    at Object.Module._extensions..js (module.js:416:10)                                                                                                                  
    at Module.load (module.js:343:32)                                                                                                                                    
    at Function.Module._load (module.js:300:12)                                                                                                                          
    at Function.Module.runMain (module.js:441:10)                                                                                                                        
    at startup (node.js:139:18)
@Guria
Copy link
Author

Guria commented Oct 4, 2016

More over. You don't need a webpack at all. Just use tsc to compile sources. There is no a good reason to make a bundle too.

@e2tox e2tox closed this as completed in 9d41c45 Oct 16, 2016
@e2tox
Copy link
Owner

e2tox commented Oct 16, 2016

Fixed. Thank you for pointing out this issue. It took long time to close this issue because I was busy on release another typescript library last week.

@e2tox
Copy link
Owner

e2tox commented Oct 16, 2016

One more issue after I checked in this file

#!/usr/bin/env node
require('../release/bin/cli')

This repository become 99% typescript and 1% javascript. 💔

I think it's better just remove UglifyJsPlugin from webpack because I still not find a way to generate above file using tsc.

e2tox added a commit that referenced this issue Oct 16, 2016
@Guria
Copy link
Author

Guria commented Oct 16, 2016

There is nothing wrong to write entry points in plain js. :) Just don't count it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants