Skip to content

Commit f3d92ee

Browse files
committed
use serve-examples
1 parent 96d760e commit f3d92ee

File tree

6 files changed

+28
-62
lines changed

6 files changed

+28
-62
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/node_modules
22
/.cache
33
/dist
4-
/public
4+
/out
55
/test/diffs
66
/*.bat
77
/package-lock.json

examples/get-started/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>ActiveWidgets JS - Get Started</title>
5+
<meta charset="UTF-8" />
6+
</head>
7+
<body>
8+
<div id="app"></div>
9+
<script src="src/index.js"></script>
10+
</body>
11+
</html>

examples/get-started/package.json

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,18 @@
44
"description": "ActiveWidgets datagrid for React",
55
"keywords": [],
66
"main": "src/index.js",
7+
"scripts": {
8+
"start": "parcel index.html --open",
9+
"build": "parcel build index.html"
10+
},
711
"dependencies": {
812
"@activewidgets/react": "0.0.9",
9-
"react": "16.12.0",
10-
"react-dom": "16.12.0",
11-
"react-scripts": "3.0.1"
13+
"react": "^16",
14+
"react-dom": "^16"
1215
},
13-
"scripts": {
14-
"start": "react-scripts start",
15-
"build": "react-scripts build",
16-
"test": "react-scripts test --env=jsdom",
17-
"eject": "react-scripts eject"
16+
"devDependencies": {
17+
"@babel/core": "^7",
18+
"parcel-bundler": "^1"
1819
},
19-
"browserslist": [
20-
">0.2%",
21-
"not dead",
22-
"not ie <= 11",
23-
"not op_mini all"
24-
],
2520
"private": true
2621
}

examples/get-started/public/index.html

Lines changed: 0 additions & 43 deletions
This file was deleted.

examples/get-started/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ function App() {
1010
);
1111
}
1212

13-
const rootElement = document.getElementById("root");
13+
const rootElement = document.getElementById("app");
1414
ReactDOM.render(<App />, rootElement);

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
],
1515
"scripts": {
1616
"build": "rimraf dist/* && rollup -c",
17-
"public": "npm run build && rimraf public/* && parcel build examples/index.html -d public",
18-
"start": "parcel examples/index.html -d public --open",
19-
"test": "npm run public && jest"
17+
"output": "npm run build && rimraf out/* && parcel build examples/**/*.html -d out",
18+
"start": "serve-examples",
19+
"test": "npm run output && jest"
2020
},
2121
"dependencies": {
2222
"@activewidgets/datagrid": "0.0.9",
@@ -43,6 +43,9 @@
4343
"rollup-plugin-terser": "^5",
4444
"style-inject": "^0.3"
4545
},
46+
"alias": {
47+
"@activewidgets/react": "./"
48+
},
4649
"jest": {
4750
"projects": [
4851
{

0 commit comments

Comments
 (0)