* Webpack config changes
* Updated documentation with example * removed unwanted dependencies from starter pack
This commit is contained in:
14
.vscode/launch.json
vendored
Normal file
14
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Launch Program",
|
||||
"program": "${workspaceFolder}\\src\\index.ts"
|
||||
}
|
||||
]
|
||||
}
|
||||
2
dist/vanilla-yo-notification.js
vendored
2
dist/vanilla-yo-notification.js
vendored
File diff suppressed because one or more lines are too long
2
dist/vanilla-yo-notification.js.map
vendored
2
dist/vanilla-yo-notification.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -79,6 +79,8 @@ position filed expects an array of two values. This determines where the notific
|
||||
number filed is the one which determines how much time notification should be visible. It expects time in **milliseconds**. Default value is *6000ms(6s)*
|
||||
|
||||
|
||||
#### [example](http://libvyn.indrajith.surge.sh/example/example.html)
|
||||
|
||||
### Support ME
|
||||
|
||||
[](https://ko-fi.com/R6R36EBQ)
|
||||
|
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 206 B |
23
docs/example/example.html
Normal file
23
docs/example/example.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Vanilla Yo Notification</title>
|
||||
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
|
||||
<link rel="stylesheet" href="//cdn.rawgit.com/necolas/normalize.css/master/normalize.css">
|
||||
<link rel="stylesheet" href="//cdn.rawgit.com/milligram/milligram/master/dist/milligram.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<button class="button" onclick="showNotificationSuccess()">Show Success Notification</button>
|
||||
<button class="button" onclick="showNotificationWarning()">Show Warning Notification</button>
|
||||
<button class="button" onclick="showNotificationError()">Show Error Notification</button>
|
||||
|
||||
<script src="./vanilla-yo-notification.js"></script>
|
||||
<script src="./example.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,6 +1,6 @@
|
||||
(function(window){
|
||||
var notif = new VanillaYoNotification({
|
||||
position: ['bottom', 'left']
|
||||
var notif = new VYN({
|
||||
position: ['bottom', 'right']
|
||||
});
|
||||
var counter = 0;
|
||||
window.showNotificationSuccess = function(){
|
||||
2
docs/example/vanilla-yo-notification.js
Normal file
2
docs/example/vanilla-yo-notification.js
Normal file
File diff suppressed because one or more lines are too long
1
docs/example/vanilla-yo-notification.js.map
Normal file
1
docs/example/vanilla-yo-notification.js.map
Normal file
File diff suppressed because one or more lines are too long
@@ -13,7 +13,7 @@
|
||||
<script>
|
||||
window.$docsify = {
|
||||
name: 'vanilla-yo-notification',
|
||||
repo: ''
|
||||
repo: 'https://github.com/cooljith91112/vanilla-yo-notification'
|
||||
}
|
||||
</script>
|
||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Vanilla Yo Notification</title>
|
||||
</head>
|
||||
<body>
|
||||
<button onclick="showNotificationSuccess()">Show Success Notification</button>
|
||||
<button onclick="showNotificationWarning()">Show Warning Notification</button>
|
||||
<button onclick="showNotificationError()">Show Error Notification</button>
|
||||
|
||||
<script src="../dist/vanilla-yo-notification.js"></script>
|
||||
<script src="./example.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -42,7 +42,7 @@
|
||||
"tslint-loader": "^3.5.3",
|
||||
"typescript": "^2.4.1",
|
||||
"webpack": "^3.3.0",
|
||||
"webpack-dashboard": "^0.4.0",
|
||||
"webpack-dev-server": "2.5.1"
|
||||
"webpack-dev-server": "2.5.1",
|
||||
"webpack-shell-plugin": "^0.5.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
const webpack = require("webpack");
|
||||
const path = require("path");
|
||||
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
||||
const DashboardPlugin = require("webpack-dashboard/plugin");
|
||||
const WebpackShellPlugin = require('webpack-shell-plugin');
|
||||
|
||||
|
||||
const nodeEnv = process.env.NODE_ENV || "development";
|
||||
const isProd = nodeEnv === "production";
|
||||
|
||||
console.log(webpack.plugins);
|
||||
var config = {
|
||||
devtool: isProd ? "hidden-source-map" : "source-map",
|
||||
context: path.resolve("./src"),
|
||||
@@ -45,7 +47,6 @@ var config = {
|
||||
output: { comments: false },
|
||||
sourceMap: true
|
||||
}),
|
||||
new DashboardPlugin(),
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
options: {
|
||||
tslint: {
|
||||
@@ -53,6 +54,9 @@ var config = {
|
||||
failOnHint: true
|
||||
}
|
||||
}
|
||||
}),
|
||||
new WebpackShellPlugin({
|
||||
onBuildEnd: 'cp -r dist/* docs/example/'
|
||||
})
|
||||
],
|
||||
devServer: {
|
||||
|
||||
Reference in New Issue
Block a user