提交 8a554f12 编写于 作者: K Kamran Ahmed

Rearrange and update dev build script

上级 a47eab3e
@import "base";
@import "../src/sholo";
$container-width: 500px !default;
$logo-font-size: 55px !default;
$button-font-size: 13px !default;
$dark-button-bg: #2d2d2d !default;
$dark-button-text: #ffffff !default;
$light-button-bg: #f5f5f5 !default;
$light-button-text: #2d2d2d !default;
.page-wrap {
padding-top: 1px;
width: $container-width;
margin: auto;
}
.btn {
font-size: $button-font-size;
padding: 7px 10px;
border-radius: 3px;
&.btn__dark {
background: $dark-button-bg;
color: $dark-button-text;
}
&.btn__light {
background: $light-button-bg;
color: $light-button-text;
}
}
section {
margin-bottom: 35px;
}
.section__header {
margin: 80px 0 50px;
text-align: center;
display: block;
padding: 10px 10px 20px;
h1 {
font-size: $logo-font-size;
}
}
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Sholo</title> <title>Sholo</title>
<link rel="stylesheet" href="./assets/styles/css/demo.css"> <link rel="stylesheet" href="./dist/demo.css">
</head> </head>
<body> <body>
<div class="page-wrap"> <div class="page-wrap">
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</section> </section>
</div> </div>
<script src="./assets/scripts/dist/sholo.js"></script> <script src="./dist/sholo.js"></script>
<script> <script>
const sholo = new Sholo({ const sholo = new Sholo({
animate: true, animate: true,
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
popover: { popover: {
title: 'Adding Introductions', title: 'Adding Introductions',
description: 'You can use it to add popovers on top of the website', description: 'You can use it to add popovers on top of the website',
position: 'right', position: 'rig',
}, },
}, },
{ {
......
module.exports = {
plugins: {
autoprefixer: {},
},
};
...@@ -7,7 +7,7 @@ import Position from './position'; ...@@ -7,7 +7,7 @@ import Position from './position';
export default class Element { export default class Element {
/** /**
* DOM element object * DOM element object
* @param {Node} node * @param {Node|HTMLElement} node
* @param {Object} options * @param {Object} options
* @param {Popover} popover * @param {Popover} popover
* @param {Overlay} overlay * @param {Overlay} overlay
......
import Position from './position'; import Position from './position';
import { ID_OVERLAY, OVERLAY_ZINDEX } from './constants'; import { ID_OVERLAY, OVERLAY_ZINDEX } from '../common/constants';
/** /**
* Responsible for overlay creation and manipulation i.e. * Responsible for overlay creation and manipulation i.e.
......
...@@ -8,7 +8,7 @@ import { ...@@ -8,7 +8,7 @@ import {
CLASS_POPOVER_TITLE, CLASS_PREV_STEP_BTN, CLASS_POPOVER_TITLE, CLASS_PREV_STEP_BTN,
ID_POPOVER, ID_POPOVER,
POPOVER_HTML, POPOVER_HTML,
} from './constants'; } from '../common/constants';
/** /**
* Popover that is displayed on top of the highlighted element * Popover that is displayed on top of the highlighted element
......
import Overlay from './overlay'; import Overlay from './core/overlay';
import Element from './element'; import Element from './core/element';
import './polyfill'; import Popover from './core/popover';
import Popover from './popover'; import './common/polyfill';
import { import {
CLASS_CLOSE_BTN, CLASS_CLOSE_BTN,
CLASS_NEXT_STEP_BTN, CLASS_NEXT_STEP_BTN,
...@@ -11,7 +11,7 @@ import { ...@@ -11,7 +11,7 @@ import {
OVERLAY_ANIMATE, OVERLAY_ANIMATE,
OVERLAY_OPACITY, OVERLAY_OPACITY,
OVERLAY_PADDING, RIGHT_KEY_CODE, OVERLAY_PADDING, RIGHT_KEY_CODE,
} from './constants'; } from './common/constants';
/** /**
* Plugin class that drives the plugin * Plugin class that drives the plugin
......
@import "base";
$container-width: 500px !default;
$logo-font-size: 55px !default;
$button-font-size: 13px !default;
$dark-button-bg: #2d2d2d !default;
$dark-button-text: #ffffff !default;
$light-button-bg: #f5f5f5 !default;
$light-button-text: #2d2d2d !default;
.page-wrap {
padding-top: 1px;
width: $container-width;
margin: auto;
}
.btn {
font-size: $button-font-size;
padding: 7px 10px;
border-radius: 3px;
&.btn__dark {
background: $dark-button-bg;
color: $dark-button-text;
}
&.btn__light {
background: $light-button-bg;
color: $light-button-text;
}
}
section {
margin-bottom: 35px;
}
.section__header {
margin: 80px 0 50px;
text-align: center;
display: block;
padding: 10px 10px 20px;
h1 {
font-size: $logo-font-size;
}
}
/////////////////////////////////////////
div#sholo-popover-item { div#sholo-popover-item {
display: none; display: none;
position: absolute; position: absolute;
......
...@@ -5,13 +5,13 @@ module.exports = { ...@@ -5,13 +5,13 @@ module.exports = {
mode: 'development', mode: 'development',
entry: [ entry: [
'webpack-dev-server/client?http://localhost:3000', 'webpack-dev-server/client?http://localhost:3000',
'./assets/styles/scss/demo.scss', './demo/demo.scss',
'./assets/scripts/src/sholo.js', './src/index.js',
], ],
output: { output: {
path: path.join(__dirname, '/assets'), path: path.join(__dirname, '/dist'),
publicPath: '/assets/', publicPath: '/dist/',
filename: 'scripts/dist/sholo.js', filename: 'sholo.js',
libraryTarget: 'umd', libraryTarget: 'umd',
library: 'Sholo', library: 'Sholo',
}, },
...@@ -44,7 +44,7 @@ module.exports = { ...@@ -44,7 +44,7 @@ module.exports = {
}, },
plugins: [ plugins: [
new ExtractTextPlugin({ new ExtractTextPlugin({
filename: 'styles/css/demo.css', filename: 'demo.css',
allChunks: true, allChunks: true,
}), }),
], ],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册