mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 09:41:57 +00:00
refactor: 更优的方式处理文件末尾行注释的问题
This commit is contained in:
parent
5bfe7d9565
commit
4fb91ce33b
@ -23,7 +23,6 @@
|
||||
"outputDir": "dist",
|
||||
"vendor": false,
|
||||
"ignoreHtmlTemplate": true,
|
||||
"sourceMap": true,
|
||||
"plugins": [
|
||||
"build-plugin-react-app",
|
||||
["build-plugin-fusion", {
|
||||
|
||||
@ -19,5 +19,6 @@ module.exports = ({ onGetWebpackConfig }) => {
|
||||
*/
|
||||
config.plugins.delete('hot');
|
||||
config.devServer.hot(false);
|
||||
config.devtool('hidden-source-map');
|
||||
});
|
||||
};
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
"start": "build-scripts start",
|
||||
"version:update": "node ./scripts/version.js",
|
||||
"build": "build-scripts build --skip-demo",
|
||||
"cloud-build": "build-scripts build --config build.cloud.json && tnpm run version:update && node ./scripts/add-blank-line.js",
|
||||
"cloud-build": "build-scripts build --config build.cloud.json && tnpm run version:update",
|
||||
"test": "build-scripts test --config build.test.json"
|
||||
},
|
||||
"license": "MIT",
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||
const { join } = require('path');
|
||||
const fse = require('fs-extra');
|
||||
|
||||
|
||||
const distDir = join(__dirname, '../dist');
|
||||
|
||||
const distFileNames = ['engine.js', 'engine-core.js'];
|
||||
|
||||
distFileNames.forEach(name => {
|
||||
const distFile = join(distDir, 'js', name);
|
||||
|
||||
const indexContent = fse.readFileSync(distFile, 'utf-8') + '\n';
|
||||
|
||||
fse.writeFileSync(distFile, indexContent);
|
||||
});
|
||||
|
||||
console.log('[engine] add a blank line successfully!');
|
||||
@ -23,7 +23,6 @@
|
||||
"outputDir": "dist",
|
||||
"vendor": false,
|
||||
"ignoreHtmlTemplate": true,
|
||||
"sourceMap": true,
|
||||
"plugins": [
|
||||
"build-plugin-react-app",
|
||||
["build-plugin-fusion", {
|
||||
|
||||
@ -19,5 +19,6 @@ module.exports = ({ onGetWebpackConfig }) => {
|
||||
*/
|
||||
config.plugins.delete('hot');
|
||||
config.devServer.hot(false);
|
||||
config.devtool('hidden-source-map');
|
||||
});
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user