Skip to content

Commit

Permalink
Bug fixes (#87)
Browse files Browse the repository at this point in the history
* fixing some bugs

* bump version

* bump version
  • Loading branch information
p3trur0 authored Nov 22, 2021
1 parent 5045637 commit b41da5d
Show file tree
Hide file tree
Showing 16 changed files with 1,248 additions and 27,055 deletions.
4 changes: 2 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.2.0" alt="Install size">
<img src="https://packagephobia.now.sh/badge?p=vue-country-flag@2.3.1" 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.2.0-blue.svg" alt="Version"></a>
<a href="https://www.npmjs.com/package/vue-country-flag"><img src="https://img.shields.io/badge/npm-2.3.1-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
File renamed without changes
5 changes: 2 additions & 3 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.1.1" alt="Install size">
<img src="https://packagephobia.now.sh/badge?p=vue-country-flag@2.3.1" 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.1.1-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.3.1-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 @@ -60,7 +60,6 @@ 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 |
| shadow | Flag with box shadow around | `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
23 changes: 5 additions & 18 deletions packages/vue-country-flag-next/build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ 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 @@ -40,8 +39,6 @@ const baseConfig = {
],
replace: {
'process.env.NODE_ENV': JSON.stringify('production'),
"process.env.SSR": 'false',
__name: 'vue-country-flag-next'
},
vue: {
},
Expand All @@ -61,9 +58,6 @@ const baseConfig = {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue'],
babelHelpers: 'bundled',
},
copyTargets: {
targets: [{ src: 'src/flags.png', dest: 'dist' }]
}
},
};

Expand All @@ -72,7 +66,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 All @@ -91,7 +85,7 @@ if (!argv.format || argv.format === 'es') {
input: 'src/entry.esm.js',
external,
output: {
file: 'dist/CountryFlag.esm.js',
file: 'dist/country-flag.esm.js',
format: 'esm',
exports: 'named',
},
Expand All @@ -112,7 +106,6 @@ if (!argv.format || argv.format === 'es') {
],
}),
commonjs(),
copy(baseConfig.plugins.copyTargets)
],
};
buildFormats.push(esConfig);
Expand All @@ -131,17 +124,12 @@ if (!argv.format || argv.format === 'cjs') {
globals,
},
plugins: [
replace(
{
...baseConfig.plugins.replace,
'process.env.SSR': 'true'
}),
replace(baseConfig.plugins.replace),
...baseConfig.plugins.preVue,
vue(baseConfig.plugins.vue),
...baseConfig.plugins.postVue,
babel(baseConfig.plugins.babel),
commonjs(),
copy(baseConfig.plugins.copyTargets)
],
};
buildFormats.push(umdConfig);
Expand All @@ -153,7 +141,7 @@ if (!argv.format || argv.format === 'iife') {
external,
output: {
compact: true,
file: 'dist/CountryFlag.min.js',
file: 'dist/country-flag.min.js',
format: 'iife',
name: 'CountryFlag',
exports: 'auto',
Expand All @@ -166,7 +154,6 @@ if (!argv.format || argv.format === 'iife') {
...baseConfig.plugins.postVue,
babel(baseConfig.plugins.babel),
commonjs(),
copy(baseConfig.plugins.copyTargets),
terser({
output: {
ecma: 5,
Expand All @@ -178,4 +165,4 @@ if (!argv.format || argv.format === 'iife') {
}

// Export config
export default buildFormats;
export default buildFormats;
Loading

0 comments on commit b41da5d

Please sign in to comment.