Skip to content

Commit

Permalink
flags loading improved (#56)
Browse files Browse the repository at this point in the history
* setting up android improvements

* vue 3 component fixed as well

* updated to 2.1.0
  • Loading branch information
p3trur0 authored May 1, 2021
1 parent 2ee30e9 commit 17c2664
Show file tree
Hide file tree
Showing 17 changed files with 1,650 additions and 1,105 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ _Country flags as a Vue Component_
<p align="center">

<img src="https://img.shields.io/npm/dm/vue-country-flag" alt="Monthly downloads">
<img src="https://packagephobia.now.sh/badge?p=vue-country-flag@2.0.4" alt="Install size">
<img src="https://packagephobia.now.sh/badge?p=vue-country-flag@2.1.0" alt="Install size">
<img src="https://img.shields.io/badge/Vue.js%202-compatible-green.svg" alt="Vue.js 2 compatible">
<img src="https://img.shields.io/badge/Vue.js%203-compatible-green.svg" alt="Vue.js 3 compatible">
<a href="https://www.npmjs.com/package/vue-country-flag"><img src="https://img.shields.io/badge/npm-2.0.4-blue.svg" alt="Version"></a>
<a href="https://www.npmjs.com/package/vue-country-flag"><img src="https://img.shields.io/badge/npm-2.1.0-blue.svg" alt="Version"></a>
<a href="https://www.npmjs.com/package/vue-country-flag"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License"></a>
<img src="https://img.shields.io/badge/TypeScript-supported-blue" alt="TypeScript Supported">

Expand Down Expand Up @@ -86,6 +86,7 @@ Then, after the proper mounting, in your template you can call it like this:
|:--|:--|:--|:--|
| size | Flag size | `String` | small, normal, big |
| rounded | Flag with rounded borders | `Boolean` | `false` by default |
| background | Path where you can upload possible custom flag images | `String` | by default it uses the flags bundled in the component |

by default, the flag is displayed at *normal* size.

Expand Down
2 changes: 0 additions & 2 deletions packages/vue-country-flag-next/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ assets/logo.png
__tests__
.babelrc
jest.config.js
src/flags-min.png
src/flags.png
typedefs
dev
5 changes: 3 additions & 2 deletions packages/vue-country-flag-next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ _Country flags as a Vue 3 Component_
<img src="https://github.com/P3trur0/vue-country-flag/blob/master/assets/logo.png?raw=true" alt="vue-country-flag"/>
</p>
<p align="center">
<img src="https://packagephobia.now.sh/badge?p=vue-country-flag@2.0.4" alt="Install size">
<img src="https://packagephobia.now.sh/badge?p=vue-country-flag@2.1.0" alt="Install size">
<img src="https://img.shields.io/badge/Vue.js%203-compatible-green.svg" alt="Vue.js 3 compatible">
<a href="https://www.npmjs.com/package/vue-country-flag-next"><img src="https://img.shields.io/badge/npm-2.0.4-blue.svg" alt="Version"></a>
<a href="https://www.npmjs.com/package/vue-country-flag-next"><img src="https://img.shields.io/badge/npm-2.1.0-blue.svg" alt="Version"></a>
<a href="https://www.npmjs.com/package/vue-country-flag-next"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License"></a>
<img src="https://img.shields.io/badge/TypeScript-supported-blue" alt="TypeScript Supported">

Expand Down Expand Up @@ -59,6 +59,7 @@ Then, after the proper mounting, in your template you can call it like this:
|:--|:--|:--|:--|
| size | Flag size | `String` | small, normal, big |
| rounded | Flag with rounded borders | `Boolean` | `false` by default |
| background | Path where you can upload possible custom flag images | `String` | by default it uses the flags bundled in the component |

by default, the flag is displayed at *normal* size.

Expand Down
10 changes: 9 additions & 1 deletion packages/vue-country-flag-next/build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import babel from '@rollup/plugin-babel';
import PostCSS from 'rollup-plugin-postcss';
import { terser } from 'rollup-plugin-terser';
import minimist from 'minimist';
import copy from 'rollup-plugin-copy'

// Get browserslist config and remove ie from es build targets
const esbrowserslist = fs.readFileSync('./.browserslistrc')
Expand Down Expand Up @@ -39,6 +40,7 @@ const baseConfig = {
],
replace: {
'process.env.NODE_ENV': JSON.stringify('production'),
__name: 'vue-country-flag-next'
},
vue: {
},
Expand All @@ -58,6 +60,9 @@ const baseConfig = {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue'],
babelHelpers: 'bundled',
},
copyTargets: {
targets: [{ src: 'src/flags.png', dest: 'dist' }]
}
},
};

Expand All @@ -66,7 +71,7 @@ const baseConfig = {
const external = [
// list external dependencies, exactly the way it is written in the import statement.
// eg. 'jquery'
'vue',
'vue'
];

// UMD/IIFE shared settings: output.globals
Expand Down Expand Up @@ -106,6 +111,7 @@ if (!argv.format || argv.format === 'es') {
],
}),
commonjs(),
copy(baseConfig.plugins.copyTargets)
],
};
buildFormats.push(esConfig);
Expand All @@ -130,6 +136,7 @@ if (!argv.format || argv.format === 'cjs') {
...baseConfig.plugins.postVue,
babel(baseConfig.plugins.babel),
commonjs(),
copy(baseConfig.plugins.copyTargets)
],
};
buildFormats.push(umdConfig);
Expand All @@ -154,6 +161,7 @@ if (!argv.format || argv.format === 'iife') {
...baseConfig.plugins.postVue,
babel(baseConfig.plugins.babel),
commonjs(),
copy(baseConfig.plugins.copyTargets),
terser({
output: {
ecma: 5,
Expand Down
Loading

0 comments on commit 17c2664

Please sign in to comment.