Skip to content

Commit

Permalink
docs: move index and change cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaofan2406 committed Jul 15, 2022
1 parent 541e1f7 commit a62b694
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 50 deletions.
3 changes: 1 addition & 2 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const webpack = require('webpack');
const path = require('path');
const emoji = require('remark-emoji');
const { merge: webpackMerge } = require('webpack-merge');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
Expand Down Expand Up @@ -167,7 +166,7 @@ module.exports = webpackMerge(commonConfig, {
// Generates an `index.html` file with the <script> injected.
new HtmlWebpackPlugin({
inject: true,
template: path.resolve('index.html'),
template: paths.appHtml,
minify: {
removeComments: true,
collapseWhitespace: true,
Expand Down
40 changes: 0 additions & 40 deletions index.html

This file was deleted.

3 changes: 1 addition & 2 deletions www/containers/CodeBlock.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import Highlight, { defaultProps } from 'prism-react-renderer';
import { LiveProvider, LiveEditor, LiveError, LivePreview } from 'react-live';
import { mdx } from '@mdx-js/react';
import moment from 'moment';
import * as AdslotUI from '../../src';
import theme from './theme';

Expand All @@ -14,7 +13,7 @@ export default ({ children, className, live }) => {
code={children.trim()}
language="jsx"
noInline={children.includes('render(')}
scope={{ ...AdslotUI, mdx, moment }}
scope={{ ...AdslotUI, mdx }}
theme={theme}
className="test"
>
Expand Down
2 changes: 1 addition & 1 deletion www/examples/DatePicker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import DesignNotes from '../containers/DesignNotes.jsx';

```jsx live=true
const Example = () => {
const [startDate, setStartDate] = React.useState(moment());
const [startDate, setStartDate] = React.useState(new Date());
const handleChange = (startDate) => setStartDate(startDate);

return (
Expand Down
29 changes: 24 additions & 5 deletions www/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Adslot UI</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="Core Component Library. By Adslot" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:400,700,900" />
<link rel="shortcut icon" href="assets/favicon.ico" />
<title>Adslot UI</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700,900" rel="stylesheet" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-18273448-24"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());

gtag('config', 'UA-18273448-24');
</script>
</head>
<body>
<div id="app">APPLICATION CONTENT</div>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="app"></div>
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
<script crossorigin src="https://unpkg.com/[email protected]/min/moment.min.js"></script>
<script crossorigin src="https://unpkg.com/[email protected]/lodash.min.js"></script>
</body>
</html>

0 comments on commit a62b694

Please sign in to comment.