diff --git a/.gitignore b/.gitignore index 05560d44..19c336e4 100644 --- a/.gitignore +++ b/.gitignore @@ -7,5 +7,5 @@ public/env.js yarn.lock package-lock.json *.map -public/index.html -svelte.config.js +/public/index.html +/svelte.config.js \ No newline at end of file diff --git a/package.json b/package.json index 6daf680d..632e8285 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "version": "0.3.1", "scripts": { "i18n-order": "node order.js", - "dev:all": "cross-env NODE_ENV_ODIT=production && node template-copy.js && snowpack dev", - "dev:fast": "cross-env NODE_ENV_ODIT=development_fast && node template-copy.js && snowpack dev", - "build": "cross-env NODE_ENV_ODIT=production && node template-copy.js && snowpack build", + "dev:all": "cross-env NODE_ENV_ODIT=production node template-copy.js && snowpack dev", + "dev:fast": "cross-env NODE_ENV_ODIT=development_fast node template-copy.js", + "build": "cross-env NODE_ENV_ODIT=production node template-copy.js && snowpack build", "build:sw": "workbox generateSW workbox-config.js", "release": "release-it", "licenses:export": "license-exporter --json -o public" diff --git a/template-copy.js b/template-copy.js index 6a46cd71..1f1ca3dc 100644 --- a/template-copy.js +++ b/template-copy.js @@ -1,17 +1,14 @@ const fs = require('fs'); let content_svelteconfig = fs.readFileSync('./s-config.template.js', { encoding: 'utf8' }); let content_html = fs.readFileSync('./index.template.html', { encoding: 'utf8' }); -if (process.env.NODE_ENV_ODIT === 'development_fast') { +if (process.env.NODE_ENV_ODIT == 'development_fast') { content_html = content_html.replace( '__TAILWIND_INSERT__', '' ); content_svelteconfig = content_svelteconfig.replace('__insert__', '{postcss:{}}'); } else { - content_html = content_html.replace( - '__TAILWIND_INSERT__', - '' - ); + content_html = content_html.replace('__TAILWIND_INSERT__', ''); content_svelteconfig = content_svelteconfig.replace( '__insert__', "{postcss:{plugins:[require('tailwindcss'),require('autoprefixer')]}}"