react-phone-input
Advanced tools
Comparing version 0.9.1 to 0.10.0
{ | ||
"name": "react-phone-input", | ||
"version": "0.9.1", | ||
"version": "0.10.0", | ||
"description": "A react component to format phone numbers", | ||
"main": "build/index.js", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"dev": "webpack-dev-server --devtool eval --reload --progress --colors --content-base dist", | ||
"build": "babel src/index.js > build/index.js" | ||
"dev": "TARGET=dev webpack-dev-server --progress", | ||
"build": "TARGET=build webpack -p --progress" | ||
}, | ||
@@ -28,11 +28,13 @@ "repository": { | ||
"devDependencies": { | ||
"babel-core": "^5.1.11", | ||
"babel-loader": "^5.0.0", | ||
"css-loader": "^0.11.0", | ||
"file-loader": "^0.8.1", | ||
"jsx-loader": "^0.13.1", | ||
"less": "^2.5.0", | ||
"less-loader": "^2.2.0", | ||
"style-loader": "^0.11.0", | ||
"webpack": "^1.8.9" | ||
"babel-core": "^5.8.25", | ||
"babel-loader": "^5.3.2", | ||
"babel-runtime": "^5.8.25", | ||
"css-loader": "^0.19.0", | ||
"file-loader": "^0.8.4", | ||
"less": "^2.5.3", | ||
"less-loader": "^2.2.1", | ||
"style-loader": "^0.12.4", | ||
"url-loader": "^0.5.6", | ||
"webpack": "^1.12.2", | ||
"webpack-merge": "^0.2.0" | ||
}, | ||
@@ -39,0 +41,0 @@ "dependencies": {}, |
@@ -8,2 +8,4 @@ // TODO - fix the onlyContries props. Currently expects that as an array of country object, but users should be able to send in array of country isos | ||
var style = require('./react-phone-input-style.less'); | ||
var isModernBrowser = Boolean(document.createElement('input').setSelectionRange); | ||
@@ -527,1 +529,5 @@ | ||
export default ReactPhoneInput; | ||
// React.render( | ||
// <ReactPhoneInput defaultCountry={'us'} preferredCountries={['us', 'de']}/>, | ||
// document.getElementById('content')); |
var path = require('path'); | ||
var nodeModulesDir = path.join(__dirname, 'node_modules'); | ||
var webpack = require('webpack'); | ||
var merge = require('webpack-merge'); | ||
var config = { | ||
entry: path.resolve(__dirname, 'src/index.js'), | ||
output: { | ||
path: path.resolve(__dirname, 'dist'), | ||
filename: 'bundle.js' | ||
}, | ||
var pkg = require('./package.json'); | ||
var TARGET = process.env.TARGET; | ||
var ROOT_PATH = path.resolve(__dirname); | ||
var nodeModulesDir = path.join(ROOT_PATH, 'node_modules'); | ||
//Common configuration settings | ||
var common = { | ||
entry: path.resolve(ROOT_PATH, 'src/index.js'), | ||
resolve: { | ||
extensions: ['', '.js', '.jsx'], | ||
modulesDirectories: ['node_modules'] | ||
}, | ||
output: { | ||
path: path.resolve(ROOT_PATH, 'dist'), | ||
filename: 'index.js' | ||
}, | ||
module: { | ||
loaders: [ | ||
{test: /\.(js|jsx)$/, loader: 'jsx-loader', exclude: [nodeModulesDir]}, | ||
{test: /\.(js|jsx)$/, loader: 'babel-loader', exclude: [nodeModulesDir]}, | ||
{test: /\.less$/, loader: 'style-loader!css-loader!less-loader'}, | ||
{test: /\.png$/, loader: 'file-loader'} | ||
{ | ||
test: /\.(js|jsx)$/, | ||
loader: 'babel-loader', | ||
include: path.resolve(ROOT_PATH, 'src') | ||
}, | ||
{ | ||
test: /\.png.*$/, | ||
loaders: ['url-loader?limit=100000&mimetype=image/png'], | ||
exclude: /node_modules/ | ||
}, | ||
{ | ||
test: /\.less$/, | ||
loader: "style!css!less" | ||
} | ||
] | ||
}, | ||
devServer: { | ||
publicPath: 'http://localhost:8181/', | ||
port: '8181', | ||
hot: true, | ||
inline: true, | ||
lazy: false, | ||
noInfo: false, | ||
headers: {'Access-Control-Allow-Origin': '*'}, | ||
stats: {colors: true} | ||
} | ||
}; | ||
module.exports = config; | ||
//Development configuration settings | ||
if (TARGET === 'dev') { | ||
module.exports = merge(common, { | ||
devtool: 'eval', | ||
module: { | ||
loaders: [ | ||
{ | ||
test: /\.jsx?$/, | ||
loaders: ['react-hot', 'babel?stage=1'], | ||
include: path.resolve(ROOT_PATH, 'app') | ||
} | ||
] | ||
}, | ||
devServer: { | ||
publicPath: 'http://localhost:8181/', | ||
port: '8181', | ||
host: '0.0.0.0', | ||
colors: true, | ||
historyApiFallback: true, | ||
hot: true, | ||
inline: true, | ||
progress: true, | ||
contentBase: 'dist' | ||
}, | ||
plugins: [ | ||
new webpack.HotModuleReplacementPlugin() | ||
] | ||
}); | ||
} | ||
//Production configuration settings | ||
if (TARGET === 'build') { | ||
module.exports = merge(common, { | ||
entry: { | ||
app: path.resolve(ROOT_PATH, 'src/index.js'), | ||
vendor: Object.keys(pkg.dependencies) | ||
}, | ||
output: { | ||
path: path.resolve(ROOT_PATH, 'dist'), | ||
filename: 'index.js' | ||
}, | ||
plugins: [ | ||
new webpack.optimize.CommonsChunkPlugin( | ||
'vendor', | ||
'vendors.js' | ||
), | ||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
'NODE_ENV': JSON.stringify('production') | ||
} | ||
}), | ||
new webpack.optimize.UglifyJsPlugin({ | ||
compress: { | ||
warnings: false | ||
} | ||
}), | ||
new webpack.optimize.DedupePlugin() | ||
] | ||
}); | ||
} | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
440402
11
11
3042
1