tracker: rm unused files
This commit is contained in:
parent
0002950e3c
commit
c847147f87
3 changed files with 3 additions and 50 deletions
3
tracker/tracker/.gitignore
vendored
3
tracker/tracker/.gitignore
vendored
|
|
@ -4,4 +4,5 @@ lib
|
||||||
cjs
|
cjs
|
||||||
build
|
build
|
||||||
.cache
|
.cache
|
||||||
coverage
|
coverage
|
||||||
|
dist
|
||||||
|
|
@ -3,7 +3,6 @@ tsconfig.json
|
||||||
.prettierrc.json
|
.prettierrc.json
|
||||||
.eslintrc.cjs
|
.eslintrc.cjs
|
||||||
build
|
build
|
||||||
compolie.js
|
|
||||||
compile.cjs
|
compile.cjs
|
||||||
.cache
|
.cache
|
||||||
js_errors.txt
|
js_errors.txt
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
const { promises: fs } = require('fs')
|
|
||||||
const replaceInFiles = require('replace-in-files')
|
|
||||||
const packageConfig = require('../package.json')
|
|
||||||
|
|
||||||
async function main() {
|
|
||||||
const webworker = await fs.readFile('build/webworker.js', 'utf8');
|
|
||||||
await replaceInFiles({
|
|
||||||
files: 'build/**/*',
|
|
||||||
from: 'TRACKER_VERSION',
|
|
||||||
to: packageConfig.version,
|
|
||||||
});
|
|
||||||
await replaceInFiles({
|
|
||||||
files: 'build/**/*',
|
|
||||||
from: 'WEBWORKER_BODY',
|
|
||||||
to: webworker.replace(/'/g, "\\'").replace(/\n/g, ""),
|
|
||||||
});
|
|
||||||
await fs.rename('build/main', 'lib');
|
|
||||||
await fs.rename('build/common', 'lib/common');
|
|
||||||
await replaceInFiles({
|
|
||||||
files: 'lib/*',
|
|
||||||
from: /\.\.\/common/g,
|
|
||||||
to: './common',
|
|
||||||
});
|
|
||||||
await replaceInFiles({
|
|
||||||
files: 'lib/**/*',
|
|
||||||
from: /\.\.\/\.\.\/common/g,
|
|
||||||
to: '../common',
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
await fs.rename('build/cjs/main', 'cjs');
|
|
||||||
await fs.rename('build/cjs/common', 'cjs/common');
|
|
||||||
await fs.writeFile('cjs/package.json', `{ "type": "commonjs" }`);
|
|
||||||
await replaceInFiles({
|
|
||||||
files: 'cjs/*',
|
|
||||||
from: /\.\.\/common/g,
|
|
||||||
to: './common',
|
|
||||||
});
|
|
||||||
await replaceInFiles({
|
|
||||||
files: 'cjs/**/*',
|
|
||||||
from: /\.\.\/\.\.\/common/g,
|
|
||||||
to: '../common',
|
|
||||||
});
|
|
||||||
}
|
|
||||||
main()
|
|
||||||
.then(() => console.log('compiled'))
|
|
||||||
.catch((err) => console.error(err));
|
|
||||||
Loading…
Add table
Reference in a new issue