Skip to content

Commit

Permalink
make mockup working in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTango committed Jul 15, 2023
1 parent eede511 commit 231c8ee
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Build docs
- name: Build mockup
run: |
npx yarn
npm run build:webpack:docs
- name: Build docs
run: |
npm run build:docs
- name: Deploy docs
Expand Down
5 changes: 3 additions & 2 deletions _includes/layout.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
<link rel="stylesheet" href="/dist/main.css" />
<link rel="stylesheet" href="/dist/prismjs/themes/prism-okaidia.css" />
<link rel="stylesheet" href="/dist/bootstrap/dist/css/bootstrap.min.css" />
<script type="text/javascript" src="http://localhost:8000/bundle.min.js"></script>
<!-- <script type="text/javascript" src="/dist/bundle.min.js"></script> -->
<!--<script type="text/javascript"
src="http://localhost:8000/bundle.min.js"></script>-->
<script type="text/javascript" src="/dist/mockup/bundle.min.js"></script>
<script type="module" src="/dist/fakeserver.js"></script>
</head>
<body>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"build:webpack": "NODE_ENV=production webpack --config webpack.config.js",
"build:webpack:dev": "NODE_ENV=development webpack --config webpack.config.js",
"build:webpack:plone": "NODE_ENV=production DEPLOYMENT=plone webpack --config webpack.config.js",
"build:webpack:docs": "NODE_ENV=production DEPLOYMENT=docs webpack --config webpack.config.js",
"build:webpack:dev:plone": "NODE_ENV=development DEPLOYMENT=plone webpack --config webpack.config.js",
"build:docs": "ELEVENTY_ENV=production npx @11ty/eleventy --pathprefix=mockup",
"build:stats": "NODE_ENV=production webpack --config webpack.config.js --json > stats.json",
Expand Down
8 changes: 7 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,15 @@ module.exports = () => {
// Note: ``publicPath`` is set to "auto" in Patternslib,
// so for the devServer the public path set to "/".
config.devServer.port = "8000";
config.devServer.static.directory = path.resolve(__dirname, "./docs/_site/");
config.devServer.static.directory = path.resolve(__dirname, "./_site/");
}

if (process.env.DEPLOYMENT === "docs") {
config.output.path = path.resolve(
__dirname,
"./_site/dist/mockup/"
);
}
if (process.env.DEPLOYMENT === "plone") {
config.output.path = path.resolve(
__dirname,
Expand Down

0 comments on commit 231c8ee

Please sign in to comment.