demo: rename build dir to .dxx
This commit is contained in:
parent
a2de505395
commit
3344fb0b9f
2
doric-demo/.gitignore
vendored
2
doric-demo/.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
build/
|
.dxx/
|
||||||
bundle/src
|
bundle/src
|
||||||
package-lock.json
|
package-lock.json
|
@ -1,6 +1,6 @@
|
|||||||
import resolve from "@rollup/plugin-node-resolve";
|
import resolve from "@rollup/plugin-node-resolve";
|
||||||
import commonjs from "@rollup/plugin-commonjs";
|
import commonjs from "@rollup/plugin-commonjs";
|
||||||
import bundles from "./build/index";
|
import bundles from "./.dxx/index";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import buble from "@rollup/plugin-buble";
|
import buble from "@rollup/plugin-buble";
|
||||||
@ -38,14 +38,14 @@ function mkdirsSync(dirname) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
allImages.forEach((value) => {
|
allImages.forEach((value) => {
|
||||||
let path = __dirname + "/build/" + value;
|
let path = __dirname + "/.dxx/" + value;
|
||||||
path = path.split("\\").join("/");
|
path = path.split("\\").join("/");
|
||||||
let index = path.lastIndexOf("/");
|
let index = path.lastIndexOf("/");
|
||||||
mkdirsSync(path.substring(0, index));
|
mkdirsSync(path.substring(0, index));
|
||||||
|
|
||||||
fs.copyFile(
|
fs.copyFile(
|
||||||
__dirname + "/" + value,
|
__dirname + "/" + value,
|
||||||
__dirname + "/build/" + value,
|
__dirname + "/.dxx/" + value,
|
||||||
(error) => {
|
(error) => {
|
||||||
if (error) console.log(error);
|
if (error) console.log(error);
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ export default allFiles
|
|||||||
.map((e) => e.replace(/\.tsx?$/, ""))
|
.map((e) => e.replace(/\.tsx?$/, ""))
|
||||||
.map((bundle) => {
|
.map((bundle) => {
|
||||||
return {
|
return {
|
||||||
input: `build/${bundle}.js`,
|
input: `.dxx/${bundle}.js`,
|
||||||
output: {
|
output: {
|
||||||
format: "cjs",
|
format: "cjs",
|
||||||
file: `bundle/${bundle}.js`,
|
file: `bundle/${bundle}.js`,
|
||||||
@ -110,7 +110,7 @@ export default allFiles
|
|||||||
// .map((e) => e.replace(/\.tsx?$/, ""))
|
// .map((e) => e.replace(/\.tsx?$/, ""))
|
||||||
// .map((bundle) => {
|
// .map((bundle) => {
|
||||||
// return {
|
// return {
|
||||||
// input: `build/${bundle}.js`,
|
// input: `.dxx/${bundle}.js`,
|
||||||
// output: {
|
// output: {
|
||||||
// format: "cjs",
|
// format: "cjs",
|
||||||
// file: `bundle/${bundle}.es5.js`,
|
// file: `bundle/${bundle}.es5.js`,
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
||||||
"sourceMap": true, /* Generates corresponding '.map' file. */
|
"sourceMap": true, /* Generates corresponding '.map' file. */
|
||||||
// "outFile": "./", /* Concatenate and emit output to single file. */
|
// "outFile": "./", /* Concatenate and emit output to single file. */
|
||||||
"outDir": "build/", /* Redirect output structure to the directory. */
|
"outDir": ".dxx/", /* Redirect output structure to the directory. */
|
||||||
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
||||||
// "composite": true, /* Enable project compilation */
|
// "composite": true, /* Enable project compilation */
|
||||||
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
||||||
|
Reference in New Issue
Block a user