Compare commits
3 Commits
c8aeba38ba
...
0583cbe266
Author | SHA1 | Date | |
---|---|---|---|
0583cbe266 | |||
2e6874c822 | |||
2ce41990bf |
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,9 +1,6 @@
|
|||||||
.idea
|
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
|
||||||
dist-ssr
|
|
||||||
public/env.js
|
public/env.js
|
||||||
/build
|
build
|
||||||
yarn.lock
|
yarn.lock
|
||||||
package-lock.json
|
package-lock.json
|
||||||
*.map
|
*.map
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"i18n-order": "node order.js",
|
"i18n-order": "node order.js",
|
||||||
"dev:all": "cross-env NODE_ENV_ODIT=production && node template-copy.js && snowpack dev",
|
"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",
|
"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": "cross-env NODE_ENV_ODIT=production node template-copy.js && snowpack build",
|
||||||
"build:sw": "workbox generateSW workbox-config.js",
|
"build:sw": "workbox generateSW workbox-config.js",
|
||||||
"release": "release-it",
|
"release": "release-it",
|
||||||
"licenses:export": "license-exporter --json -o public"
|
"licenses:export": "license-exporter --json -o public"
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let r=Promise.resolve();return i[e]||(r=new Promise((async r=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=r}else importScripts(e),r()}))),r.then((()=>{if(!i[e])throw new Error(`Module ${e} didn’t register its module`);return i[e]}))},r=(r,i)=>{Promise.all(r.map(e)).then((e=>i(1===e.length?e[0]:e)))},i={require:Promise.resolve(r)};self.define=(r,s,o)=>{i[r]||(i[r]=Promise.resolve().then((()=>{let i={};const c={uri:location.origin+r.slice(1)};return Promise.all(s.map((r=>{switch(r){case"exports":return i;case"module":return c;default:return e(r)}}))).then((e=>{const r=o(...e);return i.default||(i.default=r),i}))})))}}define("./sw.js",["./workbox-c8ead010"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"favicon.ico",revision:"ba44f340afba5bb1a07f14decc15dd04"},{url:"favicon.png",revision:"07a9941cec62319578fa2a1734db9959"},{url:"favicon.svg",revision:"689d6c6fda51e359c0e5725d9e905064"},{url:"index.html",revision:"931c34f3675364dcc09411aa0f223776"},{url:"logo.svg",revision:"4c9e31a1f4268d7e36e22cda7656e561"},{url:"manifest.webmanifest",revision:"75c93eb352c4877216e77b1d7f73445f"},{url:"robots.txt",revision:"61c27d2cd39a713f7829422c3d9edcc7"}],{})}));
|
|
||||||
//# sourceMappingURL=sw.js.map
|
|
File diff suppressed because one or more lines are too long
@ -1,17 +1,14 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
let content_svelteconfig = fs.readFileSync('./s-config.template.js', { encoding: 'utf8' });
|
let content_svelteconfig = fs.readFileSync('./s-config.template.js', { encoding: 'utf8' });
|
||||||
let content_html = fs.readFileSync('./index.template.html', { 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(
|
content_html = content_html.replace(
|
||||||
'__TAILWIND_INSERT__',
|
'__TAILWIND_INSERT__',
|
||||||
'<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tailwindcss@2.0.2/dist/tailwind.min.css">'
|
'<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tailwindcss@2.0.2/dist/tailwind.min.css">'
|
||||||
);
|
);
|
||||||
content_svelteconfig = content_svelteconfig.replace('__insert__', '{postcss:{}}');
|
content_svelteconfig = content_svelteconfig.replace('__insert__', '{postcss:{}}');
|
||||||
} else {
|
} else {
|
||||||
content_html = content_html.replace(
|
content_html = content_html.replace('__TAILWIND_INSERT__', '');
|
||||||
'__TAILWIND_INSERT__',
|
|
||||||
'<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tailwindcss@2.0.2/dist/tailwind.min.css">'
|
|
||||||
);
|
|
||||||
content_svelteconfig = content_svelteconfig.replace(
|
content_svelteconfig = content_svelteconfig.replace(
|
||||||
'__insert__',
|
'__insert__',
|
||||||
"{postcss:{plugins:[require('tailwindcss'),require('autoprefixer')]}}"
|
"{postcss:{plugins:[require('tailwindcss'),require('autoprefixer')]}}"
|
||||||
|
@ -2,5 +2,8 @@ module.exports = {
|
|||||||
globDirectory: 'public',
|
globDirectory: 'public',
|
||||||
globPatterns: [ '**/*.{js,ico,png,svg,html,webmanifest,txt}' ],
|
globPatterns: [ '**/*.{js,ico,png,svg,html,webmanifest,txt}' ],
|
||||||
globIgnores: [ 'env.js', 'env.sample.js', 'licenses.json' ],
|
globIgnores: [ 'env.js', 'env.sample.js', 'licenses.json' ],
|
||||||
swDest: 'public/sw.js'
|
swDest: 'public/sw.js',
|
||||||
|
cleanupOutdatedCaches: true,
|
||||||
|
mode: 'production',
|
||||||
|
sourcemap: false
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user