提交 17851f61 编写于 作者: K Kamran Ahmed

Update dependencies and update build

上级 e5e57cf6
......@@ -11,7 +11,6 @@ const styleFileName = 'driver-demo.min.css';
module.exports = {
mode: isProduction ? 'production' : 'development',
entry: [
!isProduction && 'webpack-dev-server/client?http://localhost:3000',
'./demo/styles/demo.scss',
'./demo/scripts/demo.js',
'./src/index.js',
......@@ -46,7 +45,7 @@ module.exports = {
loader: ExtractTextPlugin.extract([
{
loader: 'css-loader',
options: { minimize: isProduction, url: false },
options: { url: false },
},
'sass-loader',
]),
......@@ -73,7 +72,10 @@ module.exports = {
canPrint: true,
}),
new CopyWebpackPlugin([
{ from: './demo/images/', to: 'images' }
{
from: './demo/images/',
to: 'images',
},
]),
new HtmlWebpackPlugin({
template: 'demo/index.html',
......
......@@ -38,7 +38,7 @@ module.exports = {
loader: ExtractTextPlugin.extract([
{
loader: 'css-loader',
options: { minimize: true, url: false },
options: { url: false },
},
'sass-loader',
]),
......
......@@ -6,7 +6,6 @@ document.addEventListener('DOMContentLoaded', function () {
{
element: document.getElementById('driver-demo-head'),
popover: {
className: 'scoped-driver-popover',
title: 'Before we start',
description: 'This is just one use-case, make sure to check out the rest of the docs below.',
nextBtnText: 'Okay, Start!',
......@@ -103,7 +102,6 @@ document.addEventListener('DOMContentLoaded', function () {
opacity: 0.8,
padding: 5,
showButtons: true,
className: 'boring-scope'
});
boringTourDriver.defineSteps(tourSteps);
......@@ -128,9 +126,10 @@ document.addEventListener('DOMContentLoaded', function () {
});
document.querySelectorAll('pre code').forEach((element) => {
hljs.highlightBlock(element);
});
document.querySelectorAll('pre code')
.forEach((element) => {
hljs.highlightBlock(element);
});
/////////////////////////////////////////////
......@@ -150,9 +149,10 @@ document.addEventListener('DOMContentLoaded', function () {
const inputIds = ['creation-input', 'creation-input-2', 'creation-input-3', 'creation-input-4'];
inputIds.forEach(inputId => {
// Highlight the section on focus
document.getElementById(inputId).addEventListener('focus', () => {
focusDriver.highlight(`#${inputId}`);
});
document.getElementById(inputId)
.addEventListener('focus', () => {
focusDriver.highlight(`#${inputId}`);
});
});
/////////////////////////////////////////////
......@@ -317,10 +317,11 @@ document.addEventListener('DOMContentLoaded', function () {
}
}]);
document.querySelector('#run-single-element-no-close').addEventListener('click', function (e) {
e.preventDefault();
singleNoClose.start();
});
document.querySelector('#run-single-element-no-close')
.addEventListener('click', function (e) {
e.preventDefault();
singleNoClose.start();
});
/////////////////////////////////////////////////////
// Highlighting single element with popover position
......
此差异已折叠。
......@@ -6,16 +6,17 @@ const config = require('./config/webpack.config.demo');
const PORT = 3000;
const HOST = 'localhost';
const URL = `http://${HOST}:${PORT}/dist/demo`;
const URL = `http://${HOST}:${PORT}`;
new WebpackDevServer(webpack(config), {
publicPath: config.output.publicPath,
}).listen(PORT, HOST, (error, result) => {
if (error) {
console.error(error);
return;
}
config.entry.unshift(`webpack-dev-server/client?${URL}`);
opn(URL);
console.log(`Listening at ${URL}`);
});
new WebpackDevServer(webpack(config))
.listen(PORT, HOST, (error) => {
if (error) {
console.error(error);
return;
}
opn(URL);
console.log(`Listening at ${URL}`);
});
......@@ -170,7 +170,7 @@ div#driver-popover-item {
}
div#driver-page-overlay {
background: black;
background: #000000;
position: fixed;
top: 0;
left: 0;
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册