chore: parcel to kkt tools.
parent
9be21faab9
commit
c0361d2164
@ -1,9 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
"@babel/preset-env",
|
||||
"@babel/preset-react"
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-transform-runtime"
|
||||
]
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
import path from 'path';
|
||||
|
||||
export const loaderOneOf = [
|
||||
require.resolve('@kkt/loader-less')
|
||||
];
|
||||
|
||||
export const moduleScopePluginOpts = [
|
||||
path.resolve(process.cwd(), 'README.md')
|
||||
];
|
||||
|
||||
export default (conf, opts, webpack) => {
|
||||
conf.output.path = path.resolve(process.cwd(), 'doc');
|
||||
const pkg = require(path.resolve(process.cwd(), 'package.json'));
|
||||
// Webpack parses md file text
|
||||
conf.module.rules.map((item) => {
|
||||
if (item.oneOf) {
|
||||
item.oneOf.unshift({
|
||||
test: /\.md$/,
|
||||
use: require.resolve('raw-loader'),
|
||||
});
|
||||
}
|
||||
return item;
|
||||
});
|
||||
|
||||
// Get the project version.
|
||||
conf.plugins.push(
|
||||
new webpack.DefinePlugin({
|
||||
VERSION: JSON.stringify(pkg.version),
|
||||
})
|
||||
);
|
||||
|
||||
return conf;
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"modules": true,
|
||||
"plugins": {
|
||||
"autoprefixer": {
|
||||
"grid": true
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
// eslint-disable-next-line global-require
|
||||
module.exports = require('./dist/hotkeys.common.min.js');
|
||||
} else {
|
||||
// eslint-disable-next-line global-require
|
||||
module.exports = require('./dist/hotkeys.common.js');
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,13 +1,15 @@
|
||||
<html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>hotkeys.js - A robust Javascript library for capturing keyboard input.</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="description" content="A robust Javascript library for capturing keyboard input and key combinations entered. It has no dependencies. Try to press your keyboard, The following button will highlight.">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script src="./index.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
@ -1,20 +0,0 @@
|
||||
import React from 'react';
|
||||
import styles from './GithubShields.less';
|
||||
|
||||
// source = [
|
||||
// {
|
||||
// href: 'https://github.com/jaywcjlove/hotkeys/network',
|
||||
// img: 'https://img.shields.io/github/forks/jaywcjlove/hotkeys.svg?style=social'
|
||||
// },
|
||||
// ]
|
||||
export default function GithubShields({ source }) {
|
||||
return (
|
||||
<div className={styles.shields}>
|
||||
{source.map((item, idx) => (
|
||||
<a key={`${idx}${item.href}`} href={item.href} target="_blank" rel="noopener noreferrer">
|
||||
<img src={item.img} alt="" />
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
|
||||
.shields {
|
||||
padding: 60px 0 0 0;
|
||||
text-align:center;
|
||||
a + a{
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import App from './App';
|
||||
import '@uiw/reset.css';
|
||||
import './styles/reset.less';
|
||||
|
||||
ReactDOM.render(<App />, document.getElementById('root'));
|
||||
|
@ -1,43 +1,13 @@
|
||||
html {
|
||||
font-size: 14px;
|
||||
background: #e0e0e0;
|
||||
}
|
||||
/* margin */
|
||||
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, img, form, applet, fieldset, legend, button, input, textarea, th, table, tr, td{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
*, *:before, *:after {
|
||||
box-sizing: inherit !important;
|
||||
}
|
||||
|
||||
/* body */
|
||||
body {
|
||||
font-family: "微软雅黑";
|
||||
font-size: 12px;
|
||||
color:#535353;
|
||||
position: relative;
|
||||
font-family: "PingHei","Lucida Grande", "Lucida Sans Unicode", "STHeitiSC-Light", "Helvetica","Arial","Verdana","sans-serif";
|
||||
background: #f8f8f8 url(../assets/bg.jpg) repeat top left;
|
||||
}
|
||||
|
||||
|
||||
body, div, fieldset, form, h1, h2, h3, h4, h5, h6, html, p {
|
||||
-webkit-text-size-adjust: none
|
||||
}
|
||||
|
||||
/* img */
|
||||
img {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
vertical-align: top;
|
||||
border: none;
|
||||
}
|
||||
|
||||
|
||||
/* div */
|
||||
li,ul {
|
||||
list-style: none;
|
||||
margin: 0 auto;
|
||||
padding: 0 auto;
|
||||
display: block;
|
||||
user-select: none;
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
Loading…
Reference in New Issue