Comments (14)
I'm not really a Node.js person, I always go with babel. But I thought when you import the module in any system, the systems configuration transpiles the script? Shouldn't the babel configuration of the repository be ignored or overwritten?
from country-list-js.
could we chat? are you on Telegram? I'm @ekkis there. or we could meet on IRC?
from country-list-js.
I have a class right now. I do have telegram but not using at this point. I'll install it when I get back.
from country-list-js.
ok. ping me when you have a bit of time
from country-list-js.
so, in fact, the only reason to run babel is for the tests. I've ripped it all out but not being a big browserify guy I'm having issues making the npm build
work. it seems it's having a hard time minifying the code:
aprilis:country-list-js ekkis$ npm run-script build
> [email protected] build /Users/ekkis/dev/country-list-js
> gulp
[20:38:37] Using gulpfile ~/dev/country-list-js/gulpfile.js
[20:38:37] Starting 'watch'...
[20:38:37] Finished 'watch' after 11 ms
[20:38:37] Starting 'compile'...
events.js:174
throw er; // Unhandled 'error' event
^
GulpUglifyError: unable to minify JavaScript
at createError (/Users/ekkis/dev/country-list-js/node_modules/gulp-uglify/lib/create-error.js:5:14)
at /Users/ekkis/dev/country-list-js/node_modules/gulp-uglify/lib/minify.js:56:15
at DestroyableTransform._transform (/Users/ekkis/dev/country-list-js/node_modules/gulp-uglify/composer.js:12:19)
at DestroyableTransform.Transform._read (/Users/ekkis/dev/country-list-js/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at DestroyableTransform.Transform._write (/Users/ekkis/dev/country-list-js/node_modul
in the gulpfile.js
I took out line 2 let babel = require('babelify');
which didn't seem to be used anyway, and in the package.json
I removed all the dependencies on babel stuff and the "browserify" section, which only seemed to address babelify. I also removed the .babelrc
help?
from country-list-js.
in fact, gulp-browserify has been retired so we should yank it anyway: https://github.com/deepak1556/gulp-browserify
from country-list-js.
ok, I figured out why it won't minify... uglify doesn't support => functions. grr... the suggested solution is to babelise but since we're trying to get rid of babel, I'm going to have to convert all that pretty ES6 to old style :(
from country-list-js.
Got a class break. Aren't we supposed to write CommonJS/ES5 for npm packages? I wrote a package in ES6 and now it has to be explicitly mentioned in webpack configuration to be compiled.
https://github.com/themexpert/react-filemanager
from country-list-js.
I write for node in ES6. the trouble with this particular package is the need for web support where it has to be browserified. the minifier (uglify) doesn't know what to to with ES6
from country-list-js.
what timezone are you in?
from country-list-js.
I'd love to be able to keep the ES6, but with uglify installed:
$ echo "var x = () => null;" > t.js
$ uglifyjs t.js
and I get:
Parse error at t.js:1,9
var x = () => null;
^
ERROR: Unexpected token: punc ยซ)ยป
at JS_Parse_Error.get (eval at (/Users/ekkis/.nvm/versions/node/v11.5.0/lib/node_modules/uglify-js/tools/node.js:20:1), :71:23)
at fatal (/Users/ekkis/.nvm/versions/node/v11.5.0/lib/node_modules/uglify-js/bin/uglifyjs:296:53)
at run (/Users/ekkis/.nvm/versions/node/v11.5.0/lib/node_modules/uglify-js/bin/uglifyjs:240:9)
at Object. (/Users/ekkis/.nvm/versions/node/v11.5.0/lib/node_modules/uglify-js/bin/uglifyjs:165:5)
at Module._compile (internal/modules/cjs/loader.js:721:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:774:12)
so it obviously doesn't know what to do with it
from country-list-js.
ok. I found the more modern gulp-uglify-es
so I've rewritten the gulp file. I get to keep my ES6 - yea! and we get to keep support for the browser. see pull request
from country-list-js.
GitHub giving me notification about possible vulnerability of some package that are dependency of the devDependencies used in this package. How am I supposed to fix that!
from country-list-js.
a vulnerability in devDependencies does not affect users of the package, only the package builder, so don't worry about it. there are many packages out there that need fixing
from country-list-js.
Related Issues (20)
- Json hasn't all states for countries HOT 15
- Enhancement request: Search by dialling code HOT 5
- Neighbours HOT 1
- Political subdivisions HOT 2
- Wiki
- French regions should not be in the country list. HOT 3
- Cache issue with code iso2 and iso3 HOT 10
- We should have timezone HOT 3
- Api not working 404 page not found HOT 1
- In Spain there are two provinces left HOT 10
- Create support for political subdivision meta-data
- country list should be in alphabetical order HOT 1
- Phone number formats
- The package doesn't support TypeScript HOT 4
- Italy don't have provinces HOT 3
- Make it clearer on how to use on the web with country.min.js HOT 3
- Italian provinces gives null HOT 3
- Which ISO standards for country name? HOT 1
- Missing phone country codes? eg AC/+247 (ascension island) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from country-list-js.