feat: ligma sugma
This commit is contained in:
parent
18db524263
commit
507b1b1dab
20 changed files with 156 additions and 205 deletions
21
scripts/align-configs.js
Normal file
21
scripts/align-configs.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
|
||||
module.exports.ts_config = function(set_to) {
|
||||
const ts_config = require("../tsconfig.json");
|
||||
ts_config.compilerOptions.paths["@code/*"] = [`${set_to}/*`];
|
||||
|
||||
fs.writeFileSync(
|
||||
path.join(__dirname, "..", "tsconfig.json"),
|
||||
JSON.stringify(ts_config, null, 4));
|
||||
}
|
||||
|
||||
module.exports.jest = function(set_to) {
|
||||
const jest = require("../.jest.config.json");
|
||||
jest.moduleNameMapper["@code/(.*)"] = [`<rootDir>/src/${set_to}/$1`];
|
||||
|
||||
fs.writeFileSync(
|
||||
path.join(__dirname, "..", ".jest.config.json"),
|
||||
JSON.stringify(jest, null, 4));
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue