mirror of
https://github.com/tabler/tabler.git
synced 2026-01-25 04:16:36 +00:00
Update output paths in build configuration and HTML templates to use 'preview' directory
This commit is contained in:
@@ -31,7 +31,7 @@ const rollupConfig = {
|
||||
output: {
|
||||
name: 'demo',
|
||||
banner: banner('Demo'),
|
||||
dir: path.resolve(__dirname, `../dist/demo/js`),
|
||||
dir: path.resolve(__dirname, `../dist/preview/js`),
|
||||
format: 'esm',
|
||||
generatedCode: 'es2015'
|
||||
},
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
"watch-js": "nodemon --watch js/ --ext js --exec 'pnpm run js'",
|
||||
"watch-css": "nodemon --watch scss/ --ext scss --exec 'pnpm run css'",
|
||||
"css": "pnpm run css-compile && pnpm run css-prefix && pnpm run css-minify",
|
||||
"css-compile": "sass scss/:dist/demo/css/ --no-source-map --load-path=node_modules",
|
||||
"css-prefix": "postcss --config build/postcss.config.mjs --replace 'dist/demo/css/*.css' '!dist/demo/css/*.rtl*.css' '!dist/demo/css/*.min.css'",
|
||||
"css-minify": "cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output dist/demo/css/ --batch --batch-suffix '.min' 'dist/demo/css/*.css' '!dist/demo/css/*.min.css' '!dist/demo/css/*rtl*.css'",
|
||||
"css-compile": "sass scss/:dist/preview/css/ --no-source-map --load-path=node_modules",
|
||||
"css-prefix": "postcss --config build/postcss.config.mjs --replace 'dist/preview/css/*.css' '!dist/preview/css/*.rtl*.css' '!dist/preview/css/*.min.css'",
|
||||
"css-minify": "cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output dist/preview/css/ --batch --batch-suffix '.min' 'dist/preview/css/*.css' '!dist/preview/css/*.min.css' '!dist/preview/css/*rtl*.css'",
|
||||
"js": "pnpm run js-compile && pnpm run js-minify",
|
||||
"js-compile": "rollup --config build/rollup.config.mjs --sourcemap",
|
||||
"js-minify": "pnpm run js-minify-demo && pnpm run js-minify-theme",
|
||||
"js-minify-demo": "terser --compress passes=2 --mangle --comments '/^!/' --source-map 'content=dist/demo/js/demo.js.map,includeSources,url=demo.min.js.map' --output dist/demo/js/demo.min.js dist/demo/js/demo.js",
|
||||
"js-minify-theme": "terser --compress passes=2 --mangle --comments '/^!/' --source-map 'content=dist/demo/js/demo-theme.js.map,includeSources,url=demo-theme.min.js.map' --output dist/demo/js/demo-theme.min.js dist/demo/js/demo-theme.js",
|
||||
"js-minify-demo": "terser --compress passes=2 --mangle --comments '/^!/' --source-map 'content=dist/preview/js/demo.js.map,includeSources,url=demo.min.js.map' --output dist/preview/js/demo.min.js dist/preview/js/demo.js",
|
||||
"js-minify-theme": "terser --compress passes=2 --mangle --comments '/^!/' --source-map 'content=dist/preview/js/demo-theme.js.map,includeSources,url=demo-theme.min.js.map' --output dist/preview/js/demo-theme.min.js dist/preview/js/demo-theme.js",
|
||||
"clean": "rm -rf dist demo",
|
||||
"html": "eleventy",
|
||||
"svg-optimize": "svgo -f svg/brand --pretty",
|
||||
|
||||
@@ -20,4 +20,4 @@
|
||||
<link href="{{ page | relative }}/core/css/{{ plugin }}{% if layout-rtl %}.rtl{% endif %}{% if environment != 'development' %}.min{% endif %}.css{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}" rel="stylesheet"/>
|
||||
{% endfor %}
|
||||
|
||||
<link href="{{ page | relative }}/demo/css/demo{% if layout-rtl %}.rtl{% endif %}{% if environment != 'development' %}.min{% endif %}.css{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}" rel="stylesheet"/>
|
||||
<link href="{{ page | relative }}/preview/css/demo{% if layout-rtl %}.rtl{% endif %}{% if environment != 'development' %}.min{% endif %}.css{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}" rel="stylesheet"/>
|
||||
@@ -17,7 +17,7 @@
|
||||
<!-- Tabler Core -->
|
||||
|
||||
<script src="{{ page | relative }}/core/js/tabler{% if environment != 'development' %}.min{% endif %}.js{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}" defer></script>
|
||||
<script src="{{ page | relative }}/demo/js/demo{% if environment != 'development' %}.min{% endif %}.js{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}" defer></script>
|
||||
<script src="{{ page | relative }}/preview/js/demo{% if environment != 'development' %}.min{% endif %}.js{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}" defer></script>
|
||||
|
||||
|
||||
{% for script in site.captured_global.scripts %}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
{% assign layout-dark = layout-dark | default: site.layoutDark %}
|
||||
<body{% if layout.body-class or body-class %} class="{% if layout.body-class %} {{ layout.body-class }}{% endif %}{% if body-class %} {{ body-class }}{% endif %}"{% endif %}>
|
||||
<script src="{{ page | relative }}/demo/js/demo-theme{% if environment != 'development' %}.min{% endif %}.js{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}"></script>
|
||||
<script src="{{ page | relative }}/preview/js/demo-theme{% if environment != 'development' %}.min{% endif %}.js{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}"></script>
|
||||
|
||||
{{ content }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user