@nzz/q-cli 1.10.3 → 2.0.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -313
- package/dist/createCustomCodeItem.js +74 -0
- package/dist/enums.js +7 -0
- package/dist/index.js +50 -0
- package/dist/interfaces.js +1 -0
- package/dist/newCustomCode.js +107 -0
- package/dist/updateItem.js +194 -0
- package/dist/utils.js +88 -0
- package/package.json +29 -36
- package/.nvmrc +0 -1
- package/.travis.yml +0 -17
- package/.vscode/launch.json +0 -36
- package/.vscode/settings.json +0 -5
- package/LICENSE +0 -21
- package/bin/commands/bootstrap.js +0 -68
- package/bin/commands/qItem/configStore.js +0 -144
- package/bin/commands/qItem/copyItem/copyItem.js +0 -103
- package/bin/commands/qItem/copyItem/copySchema.json +0 -37
- package/bin/commands/qItem/createCustomCodeItem/createCustomCodeItem.js +0 -81
- package/bin/commands/qItem/createCustomCodeItem/schema.json +0 -41
- package/bin/commands/qItem/helpers.js +0 -102
- package/bin/commands/qItem/itemService.js +0 -310
- package/bin/commands/qItem/resourcesService.js +0 -148
- package/bin/commands/qItem/schemaService.js +0 -65
- package/bin/commands/qItem/updateItem/updateItem.js +0 -64
- package/bin/commands/server.js +0 -80
- package/bin/q.js +0 -213
- package/dev-server/config/default.js +0 -51
- package/dev-server/public/favicon.ico +0 -0
- package/dev-server/public/style.css +0 -64
- package/dev-server/routes/dev-view.js +0 -52
- package/dev-server/routes/file.js +0 -10
- package/dev-server/routes/rendering-info.js +0 -130
- package/dev-server/routes/routes.js +0 -6
- package/dev-server/routes/tool-default.js +0 -108
- package/dev-server/server-plugins.js +0 -1
- package/dev-server/server.js +0 -18
- package/dev-server/views/index.html +0 -184
- package/skeletons/custom-code-skeleton/.nvmrc +0 -1
- package/skeletons/custom-code-skeleton/.vscode/settings.json +0 -5
- package/skeletons/custom-code-skeleton/README.md +0 -26
- package/skeletons/custom-code-skeleton/index.d.ts +0 -3
- package/skeletons/custom-code-skeleton/package-lock.json +0 -7355
- package/skeletons/custom-code-skeleton/package.json +0 -46
- package/skeletons/custom-code-skeleton/q.config.json +0 -60
- package/skeletons/custom-code-skeleton/rollup.config.js +0 -185
- package/skeletons/custom-code-skeleton/src/App.scss +0 -5
- package/skeletons/custom-code-skeleton/src/App.svelte +0 -7
- package/skeletons/custom-code-skeleton/src/enums.ts +0 -0
- package/skeletons/custom-code-skeleton/src/interfaces.ts +0 -0
- package/skeletons/custom-code-skeleton/src/main-prod.ts +0 -4
- package/skeletons/custom-code-skeleton/src/main.scss +0 -1
- package/skeletons/custom-code-skeleton/src/main.ts +0 -18
- package/skeletons/custom-code-skeleton/tsconfig.json +0 -16
- package/skeletons/et-utils-package-skeleton/.nvmrc +0 -1
- package/skeletons/et-utils-package-skeleton/README.md +0 -12
- package/skeletons/et-utils-package-skeleton/jest.config.ts +0 -17
- package/skeletons/et-utils-package-skeleton/package-lock.json +0 -3969
- package/skeletons/et-utils-package-skeleton/package.json +0 -40
- package/skeletons/et-utils-package-skeleton/scripts/package-fixup.sh +0 -13
- package/skeletons/et-utils-package-skeleton/src/Service.ts +0 -8
- package/skeletons/et-utils-package-skeleton/src/index.ts +0 -4
- package/skeletons/et-utils-package-skeleton/test/Service.spec.ts +0 -10
- package/skeletons/et-utils-package-skeleton/test/tsconfig.json +0 -8
- package/skeletons/et-utils-package-skeleton/tsconfig-base.json +0 -10
- package/skeletons/et-utils-package-skeleton/tsconfig-cjs.json +0 -8
- package/skeletons/et-utils-package-skeleton/tsconfig.json +0 -8
- package/skeletons/server-skeleton/.nvmrc +0 -1
- package/skeletons/server-skeleton/Dockerfile +0 -19
- package/skeletons/server-skeleton/auth/routes.js +0 -85
- package/skeletons/server-skeleton/auth/strategyOptions.js +0 -28
- package/skeletons/server-skeleton/config/base.js +0 -45
- package/skeletons/server-skeleton/config/db.js +0 -6
- package/skeletons/server-skeleton/config/editor.js +0 -105
- package/skeletons/server-skeleton/config/rendering-info.js +0 -70
- package/skeletons/server-skeleton/config/screenshot.js +0 -80
- package/skeletons/server-skeleton/config/targets.js +0 -31
- package/skeletons/server-skeleton/config/tools.js +0 -65
- package/skeletons/server-skeleton/files/favicon.png +0 -0
- package/skeletons/server-skeleton/files/system.js +0 -3612
- package/skeletons/server-skeleton/index.js +0 -106
- package/skeletons/server-skeleton/package-lock.json +0 -1825
- package/skeletons/server-skeleton/package.json +0 -29
- package/skeletons/tool-skeleton/.dockerignore +0 -1
- package/skeletons/tool-skeleton/.nvmrc +0 -1
- package/skeletons/tool-skeleton/.travis.yml +0 -26
- package/skeletons/tool-skeleton/.vscode/settings.json +0 -5
- package/skeletons/tool-skeleton/Dockerfile +0 -19
- package/skeletons/tool-skeleton/LICENSE +0 -20
- package/skeletons/tool-skeleton/README.md +0 -104
- package/skeletons/tool-skeleton/index.js +0 -32
- package/skeletons/tool-skeleton/package-lock.json +0 -10108
- package/skeletons/tool-skeleton/package.json +0 -45
- package/skeletons/tool-skeleton/resources/display-options-schema.json +0 -11
- package/skeletons/tool-skeleton/resources/fixtures/data/basic.json +0 -4
- package/skeletons/tool-skeleton/resources/locales/de/translation.json +0 -1
- package/skeletons/tool-skeleton/resources/locales/en/translation.json +0 -1
- package/skeletons/tool-skeleton/resources/locales/fr/translation.json +0 -1
- package/skeletons/tool-skeleton/resources/schema.json +0 -16
- package/skeletons/tool-skeleton/rollup.config.js +0 -75
- package/skeletons/tool-skeleton/routes/fixtures/data.js +0 -15
- package/skeletons/tool-skeleton/routes/health.js +0 -10
- package/skeletons/tool-skeleton/routes/locales.js +0 -21
- package/skeletons/tool-skeleton/routes/rendering-info/web.js +0 -97
- package/skeletons/tool-skeleton/routes/routes.js +0 -8
- package/skeletons/tool-skeleton/routes/schema.js +0 -19
- package/skeletons/tool-skeleton/routes/script.js +0 -17
- package/skeletons/tool-skeleton/routes/stylesheet.js +0 -17
- package/skeletons/tool-skeleton/sass.config.js +0 -66
- package/skeletons/tool-skeleton/scripts_src/default.js +0 -3
- package/skeletons/tool-skeleton/styles_src/_variables.scss +0 -1
- package/skeletons/tool-skeleton/styles_src/main.scss +0 -2
- package/skeletons/tool-skeleton/test/e2e-tests.js +0 -162
- package/skeletons/tool-skeleton/views/dynamic/YourTool.scss +0 -5
- package/skeletons/tool-skeleton/views/dynamic/YourTool.svelte +0 -19
- package/skeletons/tool-skeleton/views/static/App.scss +0 -5
- package/skeletons/tool-skeleton/views/static/App.svelte +0 -21
- package/skeletons/tool-skeleton/views/static/components/Footer.svelte +0 -31
- package/skeletons/tool-skeleton/views/static/components/Header.svelte +0 -7
- package/skeletons/toolv2-skeleton/.husky/pre-commit +0 -6
- package/skeletons/toolv2-skeleton/.nvmrc +0 -1
- package/skeletons/toolv2-skeleton/.prettierrc.cjs +0 -15
- package/skeletons/toolv2-skeleton/.travis.yml +0 -30
- package/skeletons/toolv2-skeleton/.vscode/settings.json +0 -6
- package/skeletons/toolv2-skeleton/Dockerfile +0 -19
- package/skeletons/toolv2-skeleton/LICENSE +0 -21
- package/skeletons/toolv2-skeleton/README.md +0 -99
- package/skeletons/toolv2-skeleton/dev.js +0 -7
- package/skeletons/toolv2-skeleton/index.js +0 -39
- package/skeletons/toolv2-skeleton/jest.config.ts +0 -39
- package/skeletons/toolv2-skeleton/nodemon.json +0 -4
- package/skeletons/toolv2-skeleton/package-lock.json +0 -21382
- package/skeletons/toolv2-skeleton/package.json +0 -80
- package/skeletons/toolv2-skeleton/resources/display-options-schema.json +0 -11
- package/skeletons/toolv2-skeleton/resources/locales/de/translation.json +0 -8
- package/skeletons/toolv2-skeleton/resources/locales/en/translation.json +0 -10
- package/skeletons/toolv2-skeleton/resources/locales/fr/translation.json +0 -10
- package/skeletons/toolv2-skeleton/resources/schema.json +0 -66
- package/skeletons/toolv2-skeleton/rollup.config.js +0 -48
- package/skeletons/toolv2-skeleton/scripts/postinstall.sh +0 -5
- package/skeletons/toolv2-skeleton/src/.eslintrc.cjs +0 -52
- package/skeletons/toolv2-skeleton/src/components/Main.spec.ts +0 -15
- package/skeletons/toolv2-skeleton/src/components/Main.svelte +0 -32
- package/skeletons/toolv2-skeleton/src/enums.ts +0 -11
- package/skeletons/toolv2-skeleton/src/helpers/fixture-generators.ts +0 -38
- package/skeletons/toolv2-skeleton/src/helpers/toolRuntimeConfig.ts +0 -15
- package/skeletons/toolv2-skeleton/src/interfaces.ts +0 -82
- package/skeletons/toolv2-skeleton/src/modules.d.ts +0 -8
- package/skeletons/toolv2-skeleton/src/routes/dynamic-schemas/exampleDynamicSchema.ts +0 -49
- package/skeletons/toolv2-skeleton/src/routes/dynamic-schemas/index.ts +0 -5
- package/skeletons/toolv2-skeleton/src/routes/health.ts +0 -14
- package/skeletons/toolv2-skeleton/src/routes/locales.ts +0 -31
- package/skeletons/toolv2-skeleton/src/routes/notifications/exampleNotification.ts +0 -46
- package/skeletons/toolv2-skeleton/src/routes/option-availability.ts +0 -27
- package/skeletons/toolv2-skeleton/src/routes/rendering-info/web.ts +0 -150
- package/skeletons/toolv2-skeleton/src/routes/routes.ts +0 -21
- package/skeletons/toolv2-skeleton/src/routes/schema.ts +0 -21
- package/skeletons/toolv2-skeleton/src/routes/stylesheet.ts +0 -31
- package/skeletons/toolv2-skeleton/src/styles/main.scss +0 -6
- package/skeletons/toolv2-skeleton/svelte.config.cjs +0 -6
- package/skeletons/toolv2-skeleton/tasks/compileStyleFiles.cjs +0 -101
- package/skeletons/toolv2-skeleton/tests/e2e-tests.spec.ts +0 -158
- package/skeletons/toolv2-skeleton/tests/helpers.ts +0 -21
- package/skeletons/toolv2-skeleton/tsconfig.json +0 -48
- /package/{bin/commands/qItem/updateItem → dist/assets}/updateSchema.json +0 -0
@@ -1,46 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "custom-code-skeleton",
|
3
|
-
"version": "1.0.0",
|
4
|
-
"prettier": "@nzz/et-utils-config-prettier",
|
5
|
-
"devDependencies": {
|
6
|
-
"@nzz/et-utils-config-prettier": "^1.0.6",
|
7
|
-
"@nzz/nzz.ch-static": "github:nzzdev/ed-tech-nzz.ch-static#v1.3.0",
|
8
|
-
"@nzz/q-cli": "^1.4.11",
|
9
|
-
"@rollup/plugin-alias": "^3.1.9",
|
10
|
-
"@rollup/plugin-commonjs": "^21.0.0",
|
11
|
-
"@rollup/plugin-html": "^0.2.4",
|
12
|
-
"@rollup/plugin-image": "^2.1.1",
|
13
|
-
"@rollup/plugin-json": "^4.1.0",
|
14
|
-
"@rollup/plugin-node-resolve": "^13.0.5",
|
15
|
-
"@rollup/plugin-typescript": "^8.3.2",
|
16
|
-
"@tsconfig/svelte": "^3.0.0",
|
17
|
-
"autoprefixer": "^10.4.0",
|
18
|
-
"cssnano": "^5.0.10",
|
19
|
-
"npm-run-all": "^4.1.5",
|
20
|
-
"postcss": "^8.3.11",
|
21
|
-
"rollup": "^2.50.1",
|
22
|
-
"rollup-plugin-livereload": "^2.0.5",
|
23
|
-
"rollup-plugin-scss": "^3.0.0",
|
24
|
-
"rollup-plugin-svelte": "^7.1.0",
|
25
|
-
"rollup-plugin-terser": "^7.0.2",
|
26
|
-
"sass": "^1.43.4",
|
27
|
-
"sirv-cli": "^1.0.12",
|
28
|
-
"svelte": "^3.57.0",
|
29
|
-
"svelte-preprocess": "^4.10.7",
|
30
|
-
"typescript": "^4.6.4"
|
31
|
-
},
|
32
|
-
"scripts": {
|
33
|
-
"update-all": "npm run build && Q update-item",
|
34
|
-
"update-production": "npm run build && Q update-item -e production",
|
35
|
-
"update-staging": "npm run build && Q update-item -e staging",
|
36
|
-
"update-test": "npm run build && Q update-item -e test",
|
37
|
-
"build": "rollup -c",
|
38
|
-
"start": "npm run start-regular",
|
39
|
-
"start-regular": "LAYOUT=regular run-p serve rollup",
|
40
|
-
"start-ls": "LAYOUT=longform-standard run-p serve rollup",
|
41
|
-
"start-lv": "LAYOUT=longform-visual run-p serve rollup",
|
42
|
-
"start-hlv": "LAYOUT=headless-longform-visual run-p serve rollup",
|
43
|
-
"rollup": "rollup -c -w",
|
44
|
-
"serve": "sirv public --dev --port 5555 --host 0.0.0.0"
|
45
|
-
}
|
46
|
-
}
|
@@ -1,60 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"items": [
|
3
|
-
{
|
4
|
-
"environments": [
|
5
|
-
{
|
6
|
-
"name": "staging",
|
7
|
-
"id": "staging-id-not-set"
|
8
|
-
},
|
9
|
-
{
|
10
|
-
"name": "production",
|
11
|
-
"id": "prod-id-not-set"
|
12
|
-
}
|
13
|
-
],
|
14
|
-
"item": {
|
15
|
-
"files": [
|
16
|
-
{
|
17
|
-
"loadSyncBeforeInit": true,
|
18
|
-
"file": {
|
19
|
-
"path": "./public/bundle-{id}.js"
|
20
|
-
}
|
21
|
-
},
|
22
|
-
{
|
23
|
-
"loadSyncBeforeInit": true,
|
24
|
-
"file": {
|
25
|
-
"path": "./public/bundle.css"
|
26
|
-
}
|
27
|
-
}
|
28
|
-
],
|
29
|
-
"markup": "<div id=\"{{id}}_{{random}}root_element\"></div>",
|
30
|
-
"script": "(function () {\n var target = document.querySelector(\"#{{id}}_{{random}}root_element\");\n target.innerHTML = \"\";\n new window._{{id}}.App({\n target: target,\n props: {\n name: \"custom-code-skeleton\",\n }\n });\n})();",
|
31
|
-
"sophieModules": [
|
32
|
-
{
|
33
|
-
"submodules": [],
|
34
|
-
"nameVersion": "sophie-font@^1"
|
35
|
-
},
|
36
|
-
{
|
37
|
-
"submodules": [],
|
38
|
-
"nameVersion": "sophie-color@^1"
|
39
|
-
},
|
40
|
-
{
|
41
|
-
"submodules": [],
|
42
|
-
"nameVersion": "sophie-viz-color@^1"
|
43
|
-
}
|
44
|
-
],
|
45
|
-
"polyfills": [
|
46
|
-
"Map,URL,Promise,fetch,URLSearchParams,Array.prototype.find,Array.prototype.findIndex,Object.entries,Array.prototype.includes,CustomEvent,Array.from,String.prototype.startsWith"
|
47
|
-
],
|
48
|
-
"trackingComponent": {
|
49
|
-
"componentInfo": {
|
50
|
-
"componentName": "custom-code-skeleton"
|
51
|
-
},
|
52
|
-
"category": {
|
53
|
-
"componentType": "storytelling",
|
54
|
-
"componentSubType1": "Q graphic"
|
55
|
-
}
|
56
|
-
}
|
57
|
-
}
|
58
|
-
}
|
59
|
-
]
|
60
|
-
}
|
@@ -1,185 +0,0 @@
|
|
1
|
-
import * as fs from 'fs';
|
2
|
-
import * as path from 'path';
|
3
|
-
import nodeResolve from '@rollup/plugin-node-resolve';
|
4
|
-
import commonjs from '@rollup/plugin-commonjs';
|
5
|
-
import json from '@rollup/plugin-json';
|
6
|
-
import html from '@rollup/plugin-html';
|
7
|
-
import svelte from 'rollup-plugin-svelte';
|
8
|
-
import { terser } from 'rollup-plugin-terser';
|
9
|
-
import livereload from 'rollup-plugin-livereload';
|
10
|
-
import scss from 'rollup-plugin-scss';
|
11
|
-
import postcss from 'postcss';
|
12
|
-
import cssnano from 'cssnano';
|
13
|
-
import autoprefixer from 'autoprefixer';
|
14
|
-
import qConfig from './q.config.json';
|
15
|
-
import typescript from '@rollup/plugin-typescript';
|
16
|
-
import image from '@rollup/plugin-image';
|
17
|
-
import alias from '@rollup/plugin-alias';
|
18
|
-
import sveltePreprocess from 'svelte-preprocess';
|
19
|
-
import {
|
20
|
-
createContentWidthQElement,
|
21
|
-
createFullwidthQElement,
|
22
|
-
getHtml,
|
23
|
-
createSubtitle,
|
24
|
-
createParagraph,
|
25
|
-
} from '@nzz/nzz.ch-static';
|
26
|
-
|
27
|
-
// Which nzz layout to use?
|
28
|
-
const LAYOUT = process.env.LAYOUT;
|
29
|
-
const builtCssFilename = 'bundle';
|
30
|
-
|
31
|
-
const production = !process.env.ROLLUP_WATCH;
|
32
|
-
const projectRootDir = path.resolve(__dirname);
|
33
|
-
|
34
|
-
function getOutputConfigs() {
|
35
|
-
const outputConfigs = [];
|
36
|
-
for (let item of qConfig.items) {
|
37
|
-
for (let environment of item.environments) {
|
38
|
-
if (environment.id !== '') {
|
39
|
-
outputConfigs.push({
|
40
|
-
sourcemap: production ? false : true,
|
41
|
-
format: 'iife',
|
42
|
-
name: `window._q_custom_code_${environment.id}.App`,
|
43
|
-
file: `public/bundle-${environment.id}.js`,
|
44
|
-
});
|
45
|
-
}
|
46
|
-
}
|
47
|
-
}
|
48
|
-
|
49
|
-
return outputConfigs;
|
50
|
-
}
|
51
|
-
|
52
|
-
function getHtmlOptions() {
|
53
|
-
return {
|
54
|
-
fileName: 'index.html',
|
55
|
-
template: function (options) {
|
56
|
-
return getHtml({
|
57
|
-
// These 3 options are the most important. Without them the static website will not function.
|
58
|
-
layout: LAYOUT, // Type of layout.
|
59
|
-
builtCssFilename, // Will be appended at the end of <head>.
|
60
|
-
builtJsFilename: options.files.js[0].fileName, // Will appended to the end of <body>.
|
61
|
-
|
62
|
-
// Create mock elements to simulate your article.
|
63
|
-
content: `
|
64
|
-
${createSubtitle('Test Subtitle')}
|
65
|
-
${createParagraph('Test paragraph')}
|
66
|
-
${createFullwidthQElement('custom-code-fw')}
|
67
|
-
${createContentWidthQElement('custom-code-cw')}
|
68
|
-
`,
|
69
|
-
|
70
|
-
// Other options.
|
71
|
-
author: 'Max Musterman',
|
72
|
-
lead: 'Test lead.',
|
73
|
-
title: 'Test title',
|
74
|
-
|
75
|
-
// Links to other css files that need to be loaded.
|
76
|
-
// Will be appended to <head> but before the bundled css file of your app.
|
77
|
-
customCssLinks: [
|
78
|
-
'https://service.sophie.nzz.ch/bundle/sophie-q@^1,sophie-input@^1,sophie-font@^1,sophie-color@^1,sophie-viz-color@^1,sophie-legend@^1.css',
|
79
|
-
],
|
80
|
-
});
|
81
|
-
},
|
82
|
-
};
|
83
|
-
}
|
84
|
-
|
85
|
-
function getPostcssPlugins(isProduction) {
|
86
|
-
const postcssPlugins = [autoprefixer];
|
87
|
-
|
88
|
-
if (isProduction) {
|
89
|
-
postcssPlugins.push(cssnano);
|
90
|
-
}
|
91
|
-
|
92
|
-
return postcssPlugins;
|
93
|
-
}
|
94
|
-
|
95
|
-
function createOutputCssFunction() {
|
96
|
-
const outputCssFunction = (styles, styleNodes) => {
|
97
|
-
const publicDir = 'public';
|
98
|
-
|
99
|
-
if (!fs.existsSync(publicDir)) {
|
100
|
-
fs.mkdirSync(publicDir);
|
101
|
-
}
|
102
|
-
|
103
|
-
fs.writeFileSync(`${publicDir}/${builtCssFilename}.css`, styles);
|
104
|
-
};
|
105
|
-
|
106
|
-
return outputCssFunction;
|
107
|
-
}
|
108
|
-
|
109
|
-
function getSassConfig(isProduction) {
|
110
|
-
const config = {
|
111
|
-
outputStyle: isProduction ? 'compressed' : 'expanded',
|
112
|
-
// Sourcemap generation (specifically writing the file to system) is currently not supported by rollup-plugin-sass (but soon!)
|
113
|
-
// See: https://github.com/thgh/rollup-plugin-scss/issues/7
|
114
|
-
// outFile: path.join(__dirname, "/public/default.css"), // <- Uncomment after: https://github.com/thgh/rollup-plugin-scss/issues/7
|
115
|
-
sourceMap: !isProduction,
|
116
|
-
sourceMapEmbed: !isProduction, // Remove after: https://github.com/thgh/rollup-plugin-scss/issues/7
|
117
|
-
failOnError: !isProduction,
|
118
|
-
watch: [path.join(__dirname, '/src')],
|
119
|
-
processor: (css) =>
|
120
|
-
postcss(getPostcssPlugins(isProduction))
|
121
|
-
.process(css, {
|
122
|
-
from: path.join(__dirname, `/public/${builtCssFilename}.css`),
|
123
|
-
to: path.join(__dirname, `/public/${builtCssFilename}.css`),
|
124
|
-
map: isProduction ? false : { inline: true }, // Set to false after: https://github.com/thgh/rollup-plugin-scss/issues/7
|
125
|
-
})
|
126
|
-
.then((result) => result.css),
|
127
|
-
output: createOutputCssFunction(),
|
128
|
-
};
|
129
|
-
|
130
|
-
return config;
|
131
|
-
}
|
132
|
-
|
133
|
-
export default {
|
134
|
-
input: production ? 'src/main-prod.ts' : 'src/main.ts',
|
135
|
-
output: getOutputConfigs(),
|
136
|
-
plugins: [
|
137
|
-
alias({
|
138
|
-
entries: [
|
139
|
-
{ find: '@src', replacement: path.resolve(projectRootDir, 'src') },
|
140
|
-
{ find: '@interfaces', replacement: path.resolve(projectRootDir, 'src/interfaces.ts') },
|
141
|
-
{ find: '@enums', replacement: path.resolve(projectRootDir, 'src/enums.ts') },
|
142
|
-
],
|
143
|
-
}),
|
144
|
-
|
145
|
-
typescript({ sourceMap: !production }),
|
146
|
-
json(),
|
147
|
-
image(),
|
148
|
-
svelte({
|
149
|
-
preprocess: sveltePreprocess(),
|
150
|
-
compilerOptions: {
|
151
|
-
// enable run-time checks when not in production
|
152
|
-
dev: !production,
|
153
|
-
},
|
154
|
-
}),
|
155
|
-
|
156
|
-
// All styles have to be written in .scss files (inside '/src')
|
157
|
-
// Sass files (except partials) have to be imported in main.scss file (Use '@use' instead of '@import')
|
158
|
-
// Partials are placed in '/src/styles' (e.g. _variables.scss, _helpers.scss)
|
159
|
-
// Partials are imported directly in other sass files (e.g. _variables.scss -> '@use "variables"')
|
160
|
-
scss({ ...getSassConfig(production) }),
|
161
|
-
|
162
|
-
// If you have external dependencies installed from
|
163
|
-
// npm, you'll most likely need these plugins. In
|
164
|
-
// some cases you'll need additional configuration —
|
165
|
-
// consult the documentation for details:
|
166
|
-
// https://github.com/rollup/rollup-plugin-commonjs
|
167
|
-
nodeResolve({ browser: true }),
|
168
|
-
commonjs(),
|
169
|
-
|
170
|
-
// Generate a index.html file when not building for production
|
171
|
-
!production && html(getHtmlOptions()),
|
172
|
-
|
173
|
-
// Watch the `public` directory and refresh the
|
174
|
-
// browser on changes when not in production
|
175
|
-
!production && livereload({ watch: ['public'], delay: 800 }),
|
176
|
-
production && terser(),
|
177
|
-
],
|
178
|
-
watch: {
|
179
|
-
clearScreen: false,
|
180
|
-
},
|
181
|
-
onwarn: function (warning, warn) {
|
182
|
-
if (warning.code === 'CIRCULAR_DEPENDENCY') return;
|
183
|
-
warn(warning);
|
184
|
-
},
|
185
|
-
};
|
File without changes
|
File without changes
|
@@ -1 +0,0 @@
|
|
1
|
-
@use 'App.scss';
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import App from './App.svelte';
|
2
|
-
import './main.scss';
|
3
|
-
|
4
|
-
const app = new App({
|
5
|
-
target: document.querySelector('#custom-code-fw'),
|
6
|
-
props: {
|
7
|
-
name: 'custom-code-skeleton - Fullwidth',
|
8
|
-
},
|
9
|
-
});
|
10
|
-
|
11
|
-
new App({
|
12
|
-
target: document.querySelector('#custom-code-cw'),
|
13
|
-
props: {
|
14
|
-
name: 'custom-code-skeleton - Content Width',
|
15
|
-
},
|
16
|
-
});
|
17
|
-
|
18
|
-
export default app;
|
@@ -1,16 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"extends": "@tsconfig/svelte/tsconfig.json",
|
3
|
-
"include": ["src/**/*"],
|
4
|
-
"exclude": ["node_modules/*", "__sapper__/*", "public/*"],
|
5
|
-
"compilerOptions": {
|
6
|
-
"lib": ["es2015", "DOM"],
|
7
|
-
"types": ["svelte"],
|
8
|
-
"outDir": "public",
|
9
|
-
"declaration": false,
|
10
|
-
"paths": {
|
11
|
-
"@src": ["./src/"],
|
12
|
-
"@interfaces": ["./src/interfaces.ts"],
|
13
|
-
"@enums": ["./src/enums.ts"]
|
14
|
-
}
|
15
|
-
}
|
16
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
16
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# @nzz/et-utils-<package-name>
|
2
|
-
|
3
|
-
<package-description>
|
4
|
-
|
5
|
-
## Content
|
6
|
-
|
7
|
-
TODO: Package documentation
|
8
|
-
|
9
|
-
## Modules & Node support
|
10
|
-
|
11
|
-
The package follows a hybrid module structure, supporting ES6 & CommonJS Module imports.
|
12
|
-
Node support can be implemented by changing the internal, relative import statements to include the file type suffix `.js` (not `.ts`!). This however breaks the CommonJS Module imports (`require()`), which should not be an issue if Node 12+ is used in the project.
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import type { Config } from "@jest/types";
|
2
|
-
|
3
|
-
// Sync object
|
4
|
-
const config: Config.InitialOptions = {
|
5
|
-
verbose: true,
|
6
|
-
transform: {
|
7
|
-
"^.+\\.tsx?$": "ts-jest",
|
8
|
-
},
|
9
|
-
};
|
10
|
-
|
11
|
-
config.globals = {
|
12
|
-
"ts-jest": {
|
13
|
-
tsconfig: "<rootDir>/test/tsconfig.json",
|
14
|
-
},
|
15
|
-
};
|
16
|
-
|
17
|
-
export default config;
|