Skip to content

Commit 1e8a88a

Browse files
committed
no more hardcoded rollup
1 parent 93bc034 commit 1e8a88a

File tree

5 files changed

+9
-18
lines changed

5 files changed

+9
-18
lines changed

builds/prepare_builds/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub struct Args {
2323
pub struct BuildValues {
2424
/// Only the number of dimensions (1 or 2), as sometimes it will be prefixed by "dim" and sometimes post-fixed by "d".
2525
pub dim: String,
26-
/// real name of the additional features to enable in the project
26+
/// Rust name of the additional features to enable in the project, they should correspond to features from Cargo.toml(.tera).
2727
pub feature_set: Vec<String>,
2828
pub target_dir: PathBuf,
2929
pub template_dir: PathBuf,

rapier-compat/build_conf.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ do
1616

1717
./build-rust.sh $config_file_name
1818
./gen_src.sh $config_file_name
19-
npm run my_rollup
19+
npm run rollup -- --config rollup.config.js --bundleConfigAsCjs --environment BUILD_CONFIG_NAME:${config_file_name}
2020

2121
done

rapier-compat/gen_src.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ cp -r ../src.ts/* $GENOUT
3434
rm -f "${GENOUT}/raw.ts" "${GENOUT}/init.ts"
3535
cp -r ./src${DIM}/* $GENOUT
3636

37-
echo ${conditions_to_remove}
38-
3937
for condition_to_remove in "${conditions_to_remove}" ; do
4038
# See https://serverfault.com/a/137848
4139
echo "find ${GENOUT} -type f -print0 | LC_ALL=C xargs -0 sed -i \"\\:#if ${condition_to_remove}:,\\:#endif:d\""

rapier-compat/package.json

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,15 @@
44
"private": true,
55
"scripts": {
66
"prepare-all-projects": "../builds/prepare_builds/prepare_all_projects.sh",
7-
"build2d-non-deterministic": "./build_conf.sh dim2",
8-
"build-2d-deterministic": "./build_conf.sh dim2_deterministic",
9-
"build-2d-simd": "./build_conf.sh dim2_simd",
10-
"build-2d-all": "npm run build-2d-non-deterministic && npm run build-2d-deterministic && npm run build-2d-simd",
11-
"build-3d-non-deterministic": "./build_conf.sh dim3 && ./gen_src.sh dim3",
12-
"build-3d-deterministic": "./build_conf.sh dim3_deterministic && ./gen_src.sh dim3_deterministic",
13-
"build-3d-simd": "./build_conf.sh dim3_simd",
14-
"build-3d-all": "npm run build-3d-non-deterministic && npm run build-3d-deterministic && npm run build-3d-simd",
15-
"build-all": "npm run build-2d-all && npm run build-3d-all",
7+
"build-2d-all": "./build_conf.sh dim2 dim2_deterministic dim2_simd",
8+
"build-3d-all": "./build_conf.sh dim3 dim3_deterministic dim3_simd",
9+
"build-all-feature_group": "./build_conf.sh dim2 dim3 dim2_deterministic dim3_deterministic dim2_simd dim3_simd",
10+
"build-all-dim_group": "./build_conf.sh dim2 dim2_deterministic dim2_simd dim3 dim3_deterministic dim3_simd",
1611
"fix-raw-file": "sh ./fix_raw_file.sh",
17-
"build": "npm run clean && npm run build-rust-all && npm run build-genjs && npm run fix-raw-file",
18-
"clean": "cargo clean && rimraf gen2d gen3d builds",
12+
"build": "npm run clean && npm run build-all",
13+
"clean": "cargo clean && rimraf builds",
1914
"test": "jest --detectOpenHandles",
20-
"my_rollup": "rollup --config rollup.config.js --bundleConfigAsCjs --environment BUILD_CONFIG_NAME:dim2"
15+
"rollup": "rollup"
2116
},
2217
"dependencies": {
2318
"base64-js": "^1.5.1"

rapier-compat/rollup.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ const config = (dim, js_package_name) => ({
7171

7272
const conf = JSON.parse(fs.readFileSync('../builds/prepare_builds/assets/' + process.env.BUILD_CONFIG_NAME + '.json'));
7373

74-
//console.log(conf);
75-
7674

7775
export default [
7876
config("" + conf.dim + "d", conf.js_package_name),

0 commit comments

Comments
 (0)