@ixon-cdk/svelte-builder 1.0.0-alpha.3 → 1.0.0-alpha.7
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/browser.js +6 -4
- package/package.json +4 -3
package/browser.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
const fs = require("fs");
|
|
2
2
|
const path = require("path");
|
|
3
|
-
const { build } = require("vite");
|
|
3
|
+
const { build, normalizePath } = require("vite");
|
|
4
4
|
const { svelte } = require("@sveltejs/vite-plugin-svelte");
|
|
5
5
|
const preprocess = require("svelte-preprocess");
|
|
6
6
|
const {
|
|
7
7
|
getRootDir,
|
|
8
8
|
pascalCase,
|
|
9
|
+
cleanDir,
|
|
9
10
|
watchInputDir,
|
|
10
11
|
writeDemoFile,
|
|
11
12
|
copyAssets,
|
|
12
13
|
watchAssets,
|
|
13
14
|
} = require("@ixon-cdk/core");
|
|
14
15
|
|
|
15
|
-
async function _build(inputFile, outputFile, tag, production, watch) {
|
|
16
|
+
async function _build(inputFile, outputFile, tag, assets, production, watch) {
|
|
16
17
|
const inputDir = path.dirname(path.join(getRootDir(), inputFile));
|
|
17
18
|
const outputDir = path.dirname(path.join(getRootDir(), outputFile));
|
|
18
19
|
|
|
@@ -23,7 +24,7 @@ async function _build(inputFile, outputFile, tag, production, watch) {
|
|
|
23
24
|
path.dirname(entryFileName),
|
|
24
25
|
path.join(getRootDir(), inputFile)
|
|
25
26
|
);
|
|
26
|
-
const entryFileContent = `import ${componentStatic} from '${relativeInputPath}';\nexport default new ${componentStatic}();\n`;
|
|
27
|
+
const entryFileContent = `import ${componentStatic} from '${normalizePath(relativeInputPath)}';\nexport default new ${componentStatic}();\n`;
|
|
27
28
|
fs.writeFileSync(entryFileName, entryFileContent, {
|
|
28
29
|
encoding: "utf8",
|
|
29
30
|
flag: "w",
|
|
@@ -90,8 +91,9 @@ module.exports = function runBuild(
|
|
|
90
91
|
inputFile,
|
|
91
92
|
outputFile,
|
|
92
93
|
tag,
|
|
94
|
+
assets,
|
|
93
95
|
production = true,
|
|
94
96
|
watch = false
|
|
95
97
|
) {
|
|
96
|
-
return _build(inputFile, outputFile, tag, production, watch);
|
|
98
|
+
return _build(inputFile, outputFile, tag, assets, production, watch);
|
|
97
99
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ixon-cdk/svelte-builder",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "",
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
"is-potential-custom-element-name": "^1.0.1",
|
|
11
11
|
"sass": "^1.43.4",
|
|
12
12
|
"svelte": "^3.44.0",
|
|
13
|
-
"svelte-preprocess": "^4.9.8"
|
|
13
|
+
"svelte-preprocess": "^4.9.8",
|
|
14
|
+
"vite": "^2.6.12"
|
|
14
15
|
},
|
|
15
16
|
"peerDependencies": {
|
|
16
|
-
"@ixon-cdk/core": "^1.0.0-alpha.
|
|
17
|
+
"@ixon-cdk/core": "^1.0.0-alpha.7"
|
|
17
18
|
}
|
|
18
19
|
}
|