Skip to content

Commit e138fc3

Browse files
committed
add all case
add no-cache addon fix remove package name
1 parent 8db09ce commit e138fc3

File tree

9 files changed

+542
-1
lines changed

9 files changed

+542
-1
lines changed

addons/no-cache.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const config = (content) => `${content}
2+
3+
module.exports.cache = false;
4+
`;

cases/all/package.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "rome",
3+
"scripts": {
4+
"bench:setup": "ncp ../esbuild-three/src/base src/copy1 --clobber && ncp ../esbuild-three/src/base src/copy2 --clobber && ncp ../esbuild-three/src/base src/copy3 --clobber && ncp ../esbuild-three/src/base src/copy4 --clobber && ncp ../esbuild-three/src/base src/copy5 --clobber && ncp ../esbuild-three/src/base src/copy6 --clobber && ncp ../esbuild-three/src/base src/copy7 --clobber && ncp ../esbuild-three/src/base src/copy8 --clobber && ncp ../esbuild-three/src/base src/copy9 --clobber && ncp ../esbuild-three/src/base src/copy10 --clobber && node -e \"try { require('fs').statSync('src/rome') } catch { process.exitCode = 1 }\" || git clone --single-branch --branch v10.0.4-beta https://github.com/romejs/rome src/rome"
5+
},
6+
"dependenciesDate": "2021-05-05",
7+
"dependencies": {
8+
"@atlaskit/editor-core": "^120.1.0",
9+
"@atlaskit/media-core": "^31.1.0",
10+
"@atlaskit/smart-card": "^13.0.0",
11+
"@babel/runtime": "^7.12.13",
12+
"@material-ui/core": "^4.11.3",
13+
"@material-ui/icons": "^4.11.2",
14+
"@material-ui/lab": "^4.0.0-alpha.57",
15+
"acorn": "^8.0.5",
16+
"assert": "^2.0.0",
17+
"classnames": "^2.2.6",
18+
"date-fns": "^2.17.0",
19+
"jquery": "^3.5.1",
20+
"lodash": "^4.17.20",
21+
"lodash-es": "^4.17.20",
22+
"moment": "^2.29.1",
23+
"ncp": "^2.0.0",
24+
"react": "^17.0.1",
25+
"react-dom": "^17.0.1",
26+
"react-intl": "^2.6.0",
27+
"redux": "^4.0.5",
28+
"rxjs": "^5.5.0",
29+
"underscore": "^1.12.0",
30+
"uuid": "^8.3.2",
31+
"vue": "^2.6.12",
32+
"zone.js": "^0.11.3",
33+
"webpack-cli": "^4.5.0"
34+
},
35+
"devDependencies": {
36+
"ts-loader": "*",
37+
"typescript": "*",
38+
"webpack": "*"
39+
}
40+
}

cases/all/src/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
copy*
2+
rome

cases/all/src/babel-runtime.js

Lines changed: 331 additions & 0 deletions
Large diffs are not rendered by default.

cases/all/src/index.js

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
// common-libs
2+
import "./babel-runtime";
3+
import * as core from "@material-ui/core";
4+
import * as lab from "@material-ui/lab";
5+
import * as icons from "@material-ui/icons";
6+
console.log(core, lab, icons);
7+
import "acorn";
8+
import "classnames";
9+
import * as dateFn from "date-fns";
10+
import * as dateFnEsm from "date-fns/esm";
11+
console.log(dateFn, dateFnEsm);
12+
import "jquery";
13+
import "lodash";
14+
import * as lodashEs from "lodash-es";
15+
console.log(lodashEs);
16+
import "moment";
17+
import "react";
18+
import "react-dom";
19+
import "redux";
20+
import * as rxjs from "rxjs";
21+
console.log(rxjs);
22+
import * as underscore from "underscore";
23+
import * as underscoreModules from "underscore/modules/index-all";
24+
console.log(underscore, underscoreModules);
25+
import { NIL, parse, stringify, v1, v3, v4, v5, validate, version } from "uuid";
26+
console.log(NIL, parse, stringify, v1, v3, v4, v5, validate, version);
27+
import "vue";
28+
import "zone.js";
29+
30+
// common-libs-chunks
31+
import("./babel-runtime");
32+
import("@material-ui/core");
33+
import("@material-ui/lab");
34+
import("@material-ui/icons");
35+
import("acorn");
36+
import("classnames");
37+
import("date-fns");
38+
import("date-fns/esm");
39+
import("jquery");
40+
import("lodash");
41+
import("lodash-es");
42+
import("moment");
43+
import("react");
44+
import("react-dom");
45+
import("redux");
46+
import("rxjs");
47+
import("underscore");
48+
import("underscore/modules/index-all");
49+
import("uuid");
50+
import("vue");
51+
import("zone.js");
52+
53+
// atlaskit-editor
54+
// benchmark from parcel-benchmark
55+
import React from "react";
56+
import ReactDOM from "react-dom";
57+
import { Editor } from "@atlaskit/editor-core";
58+
59+
ReactDOM.render(
60+
React.createElement(Editor, {
61+
placeholder: "editor",
62+
appearance: "comment",
63+
test: "Hello World",
64+
}),
65+
document.getElementById("react-root")
66+
);
67+
68+
// esbuild-three
69+
import * as copy1 from "./copy1/Three.js";
70+
export { copy1 };
71+
import * as copy2 from "./copy2/Three.js";
72+
export { copy2 };
73+
import * as copy3 from "./copy3/Three.js";
74+
export { copy3 };
75+
import * as copy4 from "./copy4/Three.js";
76+
export { copy4 };
77+
import * as copy5 from "./copy5/Three.js";
78+
export { copy5 };
79+
import * as copy6 from "./copy6/Three.js";
80+
export { copy6 };
81+
import * as copy7 from "./copy7/Three.js";
82+
export { copy7 };
83+
import * as copy8 from "./copy8/Three.js";
84+
export { copy8 };
85+
import * as copy9 from "./copy9/Three.js";
86+
export { copy9 };
87+
import * as copy10 from "./copy10/Three.js";
88+
export { copy10 };
89+
90+
// rome
91+
import "./rome.ts";
92+
93+
console.log("Hello World");

cases/all/src/rome.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import "./rome/internal/cli/cli";
2+
3+
console.log("Hello World");

cases/all/tsconfig.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"compilerOptions": {
3+
"noEmit": true,
4+
"esModuleInterop": true,
5+
"resolveJsonModule": true,
6+
"moduleResolution": "node",
7+
"target": "es2019",
8+
"module": "esnext",
9+
"baseUrl": "."
10+
},
11+
"include": [
12+
"./src/rome.ts"
13+
],
14+
"paths": {
15+
"@internal/*": [
16+
"src/rome/internal/*"
17+
],
18+
"@internal/virtual-*": [
19+
"src/rome/internal/virtual-packages/*"
20+
],
21+
"rome": [
22+
"src/rome/internal/virtual-packages/rome"
23+
]
24+
}
25+
}

cases/all/webpack.config.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
const { resolve } = require("path");
2+
/** @type {import("webpack").Configuration} */
3+
module.exports = {
4+
resolve: {
5+
extensions: [".ts", ".tsx", ".js"],
6+
alias: {
7+
"@internal": resolve(__dirname, "src/rome/internal"),
8+
// rome: resolve(__dirname, "src/rome/internal/virtual-packages/rome"),
9+
},
10+
},
11+
output: {
12+
hashFunction: "xxhash64",
13+
},
14+
optimization: {
15+
sideEffects: false,
16+
},
17+
experiments: {
18+
cacheUnaffected: true,
19+
},
20+
module: {
21+
unsafeCache: true,
22+
rules: [
23+
{
24+
test: /\.tsx?$/,
25+
loader: "ts-loader",
26+
options: { transpileOnly: true },
27+
},
28+
],
29+
},
30+
};
31+
if (require("webpack").version.startsWith("5")) {
32+
module.exports.ignoreWarnings = [
33+
{
34+
message: /export.+was not found|only default export is available soon/,
35+
},
36+
];
37+
}
38+
39+
module.exports.plugins = module.exports.plugins || [];
40+
module.exports.plugins.push(new (require("../../lib/build-plugin.cjs"))());
41+
42+
module.exports.plugins = module.exports.plugins || [];
43+
module.exports.plugins.push(new (require("../../lib/build-plugin.cjs"))());

cases/rome/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "minimal",
2+
"name": "rome",
33
"dependenciesDate": "2021-02-15",
44
"dependencies": {
55
"webpack-cli": "^4.5.0"

0 commit comments

Comments
 (0)