Skip to content

Commit

Permalink
redo dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
yysun committed Sep 17, 2024
1 parent fe38eba commit 45d24bc
Show file tree
Hide file tree
Showing 12 changed files with 243 additions and 352 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ coverage
.cache
src/_lib
public
._build
14 changes: 3 additions & 11 deletions apprun-site-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ program
.option('-w, --watch', 'watch the directory', false)
.option('-o, --output [output]', 'output directory', 'public')
.option('-p, --pages [pages]', 'pages directory', 'pages')
.option('-i, --info', 'print option information', false)
.option('--no-csr', 'no client side routing')
.option('-r --render', 'pre-render pages', false)
.action(async (source, options) => {
({ source, options } = await init_options(source, options));
options.info && console.log(options);
build(options);
options.dev = false;
await build(options);
});

program
Expand All @@ -51,28 +50,21 @@ program
.option('-o, --output [output]', 'output directory', 'public')
.option('--no-ssr', 'disable server side rendering')
.option('--no-save', 'disable auto save of side rendered pages')
.option('-i, --info', 'print option information', false)
.action(async (source, options) => {
({ source, options } = await init_options(source, options));
options.info && console.log(options);
// build(options);
server(options);
});

program
.command('dev [source]')
.description('launch development server, watch and live reload')
.option('-c, --clean', 'clean the output directory', false)
.option('-o, --output [output]', 'output directory', 'public')
.option('-p, --pages [pages]', 'pages directory', 'pages')
.option('--no-ssr', 'disable server side rendering')
.option('--no-csr', 'no client side routing')
.option('--no-watch', 'watch the directory')
.option('--no-live_reload', 'enable live reload')
.option('-i, --info', 'print option information', false)
.option('--no-csr', 'no client side routing')
.action(async (source, options) => {
({ source, options } = await init_options(source, options));
options.info && console.log(options);
options.ssr = false;
options.save = false;
options.dev = true;
Expand Down
2 changes: 1 addition & 1 deletion demo/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import('tailwindcss').Config} */
export default {
content: [
'public/**/*.{html,css}'
'pages/**/*.{html,css,jsx,tsx}'
],
theme: {
extend: {},
Expand Down
Loading

0 comments on commit 45d24bc

Please sign in to comment.