diff --git a/.circleci/config.yml b/.circleci/config.yml
index 4c43f37..9c3b1b7 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -3,7 +3,7 @@ version: 2
defaults: &defaults
working_directory: ~/project/vue-alert
docker:
- - image: circleci/node:9
+ - image: circleci/node:8
jobs:
install:
diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index a2b0595..0000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// http://eslint.org/docs/user-guide/configuring
-
-module.exports = {
- root: true,
- parser: 'vue-eslint-parser',
- parserOptions: {
- sourceType: 'module'
- },
- env: {
- browser: true,
- },
- // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
- extends: [
- 'standard',
- 'plugin:vue/recommended'
- ],
- // required to lint *.vue files
- plugins: [
- 'html'
- ],
- // add your custom rules here
- 'rules': {
- // allow paren-less arrow functions
- 'arrow-parens': 0,
- // allow async-await
- 'generator-star-spacing': 0,
- // allow debugger during development
- 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
- // allow inject on loader for webpack
- 'import/no-webpack-loader-syntax': 0
- }
-}
diff --git a/README.md b/README.md
index 3b3e092..250bb8d 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# @vuejs-pt/vue-alert
+# @vuejs-pt/vue-alert
[](https://circleci.com/gh/vuejs-pt/vue-alert)
[](https://codecov.io/github/vuejs-pt/vue-alert?branch=master)
[](https://www.npmjs.com/package/@vuejs-pt/vue-alert)
@@ -6,6 +6,8 @@
[](https://vuejs.org/)
[](https://raw.githubusercontent.com/vuejs-pt/vue-alert/master/LICENSE)
+> Starting from v2 the Vue component is named `VueAlert` instead of `vue-alert`
+
# Table of Contents
* [___Demo___](#demo)
* [___Requirements___](#requirements)
@@ -18,7 +20,7 @@
[__Demo__](https://vuejs-pt.github.io/vue-alert/example/dist/)
# Requirements
-- [Vue.js](https://github.com/vuejs/vue) `2.x`
+- [Vue.js](https://github.com/vuejs/vue) `2.x`
# Installation
```bash
@@ -119,9 +121,9 @@ this.$alert.hide()
# Usage
-The component `vue-alert` must be included either in the component using the `vue-alert` or a parent of this component, for example if there's a `vue-alert` instance at the root of the app.
+The component `VueAlert` must be included either in the component using the `VueAlert` or a parent of this component, for example if there's a `VueAlert` instance at the root of the app.
-It is possible to access the `vue-alert` component using the `$alert` variable on the component instance as shown in the below example.
+It is possible to access the `VueAlert` component using the `$alert` variable on the component instance as shown in the below example.
The default bootstrap style are applied to the alert but this can be overriden by applying a new style to the following classes:
- alert
@@ -157,8 +159,8 @@ App.vue
```html
-
-
+
+
@@ -207,4 +209,4 @@ export default {
# License
-[The MIT License](http://opensource.org/licenses/MIT)
\ No newline at end of file
+[The MIT License](http://opensource.org/licenses/MIT)
diff --git a/_config.yml b/_config.yml
index e69a9c8..f0182f6 100644
--- a/_config.yml
+++ b/_config.yml
@@ -1,3 +1,4 @@
theme: jekyll-theme-dinky
title: "@vuejs-pt/vue-alert"
-description: Alert bootstrap style for Vue.js
\ No newline at end of file
+description: Alert bootstrap style for Vue.js
+google_analytics: UA-133448491-1
diff --git a/_includes/analytics.html b/_includes/analytics.html
new file mode 100644
index 0000000..63104a4
--- /dev/null
+++ b/_includes/analytics.html
@@ -0,0 +1,8 @@
+
diff --git a/config/rollup.config.js b/config/rollup.config.js
index 5a4183d..9f9f57c 100644
--- a/config/rollup.config.js
+++ b/config/rollup.config.js
@@ -1,5 +1,6 @@
import path from 'path'
import fs from 'fs'
+import commonjs from 'rollup-plugin-commonjs'
import vue from 'rollup-plugin-vue'
import buble from 'rollup-plugin-buble'
import { uglify } from 'rollup-plugin-uglify'
@@ -17,6 +18,7 @@ const config = {
{ format: 'cjs', file: `dist/${name}.common.js`, name }
],
plugins: [
+ commonjs(),
vue({
compileTemplate: true,
css: true
diff --git a/config/webpack.build.config.js b/config/webpack.build.config.js
index 0b45bc0..a449c10 100644
--- a/config/webpack.build.config.js
+++ b/config/webpack.build.config.js
@@ -1,14 +1,13 @@
-var path = require('path')
-var webpack = require('webpack')
-var merge = require('webpack-merge')
-var baseWebpackConfig = require('./webpack.config')
-var HtmlWebpackPlugin = require('html-webpack-plugin')
-var MiniCssExtractPlugin = require('mini-css-extract-plugin')
-var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
-var UglifyJsPlugin = require('uglifyjs-webpack-plugin')
-const { VueLoaderPlugin } = require('vue-loader')
+const path = require('path')
+const webpack = require('webpack')
+const merge = require('webpack-merge')
+const baseWebpackConfig = require('./webpack.config')
+const HtmlWebpackPlugin = require('html-webpack-plugin')
+const MiniCssExtractPlugin = require('mini-css-extract-plugin')
+const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
+const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
-var webpackConfig = merge(baseWebpackConfig, {
+const webpackConfig = merge(baseWebpackConfig, {
mode: 'production',
devtool: '#source-map',
output: {
@@ -17,8 +16,6 @@ var webpackConfig = merge(baseWebpackConfig, {
chunkFilename: 'js/[id].[chunkhash].js'
},
plugins: [
- new VueLoaderPlugin(),
- // http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': process.env.NODE_ENV
}),
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 32e26da..0f932f6 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -1,7 +1,9 @@
const path = require('path')
const webpack = require('webpack')
+const { VueLoaderPlugin } = require('vue-loader')
const webpackConfig = {
+ mode: 'development',
devtool: 'inline-source-map',
entry: path.resolve(__dirname, '../example/app.js'),
output: {
@@ -29,6 +31,7 @@ const webpackConfig = {
}
},
plugins: [
+ new VueLoaderPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')
}),
diff --git a/dist/vuealert.common.js b/dist/vuealert.common.js
index aaddd33..e7145d6 100644
--- a/dist/vuealert.common.js
+++ b/dist/vuealert.common.js
@@ -1 +1 @@
-"use strict";function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _objectSpread(t){for(var e=1;e\n \n \n \n\n\n