Skip to content

Commit

Permalink
chore(project): update examples to parcel 2 (#10310)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblack authored Dec 17, 2021
1 parent 30327e6 commit 334821f
Show file tree
Hide file tree
Showing 27 changed files with 19,667 additions and 24,662 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ css

# Cache folders
.cache
.parcel-cache

# Logs
logs
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/colors/examples/preview/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<link rel="stylesheet" href="./styles.scss">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="./styles.scss" rel="stylesheet">
<script src="./src/index.js" type="module"></script>
</head>
<body>
<div id="root"></div>
<script src="./src/index.js"></script>
</body>
</html>
9 changes: 5 additions & 4 deletions packages/colors/examples/preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
"private": true,
"version": "0.0.0",
"license": "Apache-2.0",
"browserslist": "last 2 versions",
"source": "index.html",
"scripts": {
"build": "parcel build -d build --public-url \"/colors/examples/preview\" index.html",
"build": "parcel build --dist-dir build --public-url \"/colors/examples/preview\" index.html",
"develop": "parcel index.html --no-cache"
},
"devDependencies": {
"@babel/core": "^7.10.1",
"@babel/preset-env": "^7.10.1",
"parcel-bundler": "^1.12.4"
"@parcel/transformer-sass": "^2.0.1",
"parcel": "^2.0.1"
},
"dependencies": {
"react": "^16.13.1",
Expand Down
7 changes: 0 additions & 7 deletions packages/colors/examples/preview/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,3 @@ function render(element) {
}

render(<App />);

if (module.hot) {
const NextApp = require('./components/App').default;
module.hot.dispose(() => {
render(<NextApp />);
});
}
Loading

0 comments on commit 334821f

Please sign in to comment.