-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
516 additions
and
2,539 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["@babel/preset-react"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,108 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-us"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>react-country-region-selector</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" type="text/css" href="css/normalize.css" media="screen"> | ||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css"> | ||
<link rel="stylesheet" type="text/css" href="css/stylesheet.css" media="screen"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link | ||
rel="stylesheet" | ||
type="text/css" | ||
href="css/normalize.css" | ||
media="screen" | ||
/> | ||
<link | ||
href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" | ||
rel="stylesheet" | ||
type="text/css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
type="text/css" | ||
href="css/stylesheet.css" | ||
media="screen" | ||
/> | ||
|
||
<style> | ||
body { | ||
background-color: #f0eee8; | ||
} | ||
.main-content { | ||
font-size: 15px; | ||
} | ||
ol { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
section { | ||
margin: 0 0 15px; | ||
border-bottom: 1px solid #cac6bc; | ||
padding: 0 0 20px; | ||
} | ||
.counter { | ||
font-weight: bold; | ||
margin-right: 5px; | ||
} | ||
code { | ||
font-size: 15px; | ||
} | ||
.toggleCode { | ||
float: right; | ||
background-color: #d8d5ce; | ||
border-radius: 4px; | ||
margin-top: 8px; | ||
padding: 3px 6px; | ||
cursor: pointer; | ||
} | ||
.toggleCode:hover { | ||
background-color: #cac6bc; | ||
} | ||
body { | ||
background-color: #f0eee8; | ||
} | ||
.main-content { | ||
font-size: 15px; | ||
} | ||
ol { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
section { | ||
margin: 0 0 15px; | ||
border-bottom: 1px solid #cac6bc; | ||
padding: 0 0 20px; | ||
} | ||
.counter { | ||
font-weight: bold; | ||
margin-right: 5px; | ||
} | ||
code { | ||
font-size: 15px; | ||
} | ||
.toggleCode { | ||
float: right; | ||
background-color: #d8d5ce; | ||
border-radius: 4px; | ||
margin-top: 8px; | ||
padding: 3px 6px; | ||
cursor: pointer; | ||
} | ||
.toggleCode:hover { | ||
background-color: #cac6bc; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
</head> | ||
<body> | ||
<section class="page-header"> | ||
<h1 class="project-name">react-country-region-selector</h1> | ||
<h2 class="project-tagline"></h2> | ||
<a | ||
href="https://github.com/benkeen/react-country-region-selector" | ||
class="btn" | ||
>View on GitHub</a | ||
> | ||
<a | ||
href="https://github.com/benkeen/react-country-region-selector/zipball/master" | ||
class="btn" | ||
>Download .zip</a | ||
> | ||
<a | ||
href="https://github.com/benkeen/react-country-region-selector/tarball/master" | ||
class="btn" | ||
>Download .tar.gz</a | ||
> | ||
</section> | ||
|
||
<section class="page-header"> | ||
<h1 class="project-name">react-country-region-selector</h1> | ||
<h2 class="project-tagline"></h2> | ||
<a href="https://github.com/benkeen/react-country-region-selector" class="btn">View on GitHub</a> | ||
<a href="https://github.com/benkeen/react-country-region-selector/zipball/master" class="btn">Download .zip</a> | ||
<a href="https://github.com/benkeen/react-country-region-selector/tarball/master" class="btn">Download .tar.gz</a> | ||
</section> | ||
<section class="main-content"> | ||
<p> | ||
<b>This page shows a few examples</b>. The example JSX code is there to | ||
illustrate each example, but please note you'll need to supply the | ||
appropriate onChange methods and store the country and region values. | ||
See the | ||
<a href="https://github.com/benkeen/react-country-region-selector" | ||
>readme</a | ||
> | ||
for complete documentation on how to add the component to your pages. | ||
</p> | ||
|
||
<section class="main-content"> | ||
<p> | ||
<b>This page shows a few examples</b>. The example JSX code is there to illustrate each example, but please | ||
note you'll need to supply the appropriate onChange methods and store the country and region values. | ||
See the <a href="https://github.com/benkeen/react-country-region-selector">readme</a> for complete documentation | ||
on how to add the component to your pages. | ||
</p> | ||
<hr size="1" /> | ||
|
||
<hr size="1" /> | ||
<div id="examples"></div> | ||
|
||
<div id="examples"></div> | ||
|
||
<footer class="site-footer"> | ||
<a href="https://github.com/benkeen/react-country-region-selector">react-country-region-selector</a> is maintained | ||
by <a href="https://github.com/benkeen">Ben Keen</a>. | ||
<a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a> by <a href="https://twitter.com/jasonlong">Jason Long</a>. | ||
</footer> | ||
</section> | ||
|
||
</body> | ||
<footer class="site-footer"> | ||
<a href="https://github.com/benkeen/react-country-region-selector" | ||
>react-country-region-selector</a | ||
> | ||
is maintained by <a href="https://github.com/benkeen">Ben Keen</a>. | ||
<a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a> by | ||
<a href="https://twitter.com/jasonlong">Jason Long</a>. | ||
</footer> | ||
</section> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,47 @@ | ||
import babel from 'rollup-plugin-babel'; | ||
import commonjs from 'rollup-plugin-commonjs'; | ||
import external from 'rollup-plugin-peer-deps-external'; | ||
import postcss from 'rollup-plugin-postcss'; | ||
import resolve from 'rollup-plugin-node-resolve'; | ||
import url from 'rollup-plugin-url'; | ||
import json from 'rollup-plugin-json'; | ||
import parseCountryList from './rollup-plugin-parse-country-list'; | ||
import pkg from './package.json'; | ||
|
||
const babel = require('@rollup/plugin-babel'); | ||
// const commonjs = require('@rollup/plugin-commonjs'); | ||
const resolve = require('@rollup/plugin-node-resolve'); | ||
const url = require('@rollup/plugin-url'); | ||
const json = require('@rollup/plugin-json'); | ||
const terser = require('@rollup/plugin-terser'); | ||
const pkg = require('./package.json'); | ||
const argv = require('minimist')(process.argv.slice(2)); | ||
const parseCountryList = require('./rollup-plugin-parse-country-list'); | ||
|
||
// e.g. rollup -c --config-countries=GB,CA,US | ||
let countries = []; | ||
if (argv.hasOwnProperty('config-countries')) { | ||
countries = argv['config-countries'].split(','); | ||
} | ||
|
||
export default { | ||
module.exports = { | ||
input: 'src/index.js', | ||
output: [ | ||
{ | ||
file: pkg.main, | ||
format: 'cjs', | ||
sourcemap: true, | ||
compact: true, | ||
}, | ||
{ | ||
file: pkg.module, | ||
format: 'es', | ||
sourcemap: true, | ||
compact: true, | ||
}, | ||
], | ||
plugins: [ | ||
parseCountryList({ countries }), | ||
external(), | ||
postcss({ | ||
modules: true, | ||
}), | ||
json(), | ||
url(), | ||
babel({ | ||
exclude: 'node_modules/**', | ||
plugins: ['external-helpers'], | ||
// TODO check https://github.com/rollup/plugins/tree/master/packages/babel#babelhelpers | ||
babelHelpers: 'bundled', | ||
}), | ||
resolve(), | ||
commonjs(), | ||
// commonjs(), | ||
terser(), | ||
], | ||
external: ['react', 'react-dom', 'prop-types'], | ||
}; |
Oops, something went wrong.