<commit_before>#!/bin/sh

rm -rf firekylin;
rm -rf output;
rm -rf output.theme;

mkdir output;

echo 'webpack start ...';
npm run webpack.build.production;
echo 'webpack end';

node stc.config.js;

mkdir -p www/theme/firekylin.build/html;
cp -r www/theme/firekylin/*.html www/theme/firekylin.build/html/
cp -r www/theme/firekylin/inc www/theme/firekylin.build/html/
cp -r www/theme/firekylin/package.json www/theme/firekylin.build/html/

node stc.view.config.js;

cp -r output.theme/www/theme/firekylin.build/html/* output.theme/www/theme/firekylin;
rm -rf output.theme/www/theme/firekylin.build;
cp -r output.theme/www/ output/www/
rm -rf output.theme;
rm -rf www/theme/firekylin.build/;


npm run compile;
npm run copy-package;

cp -r app output;
rm -rf output/app/common/runtime;

cp -r nginx.conf output/nginx_default.conf;
cp -r pm2.json output/pm2_default.json;
cp -r www/*.js output/www;


cp -r firekylin.sql output/;
if [ 0 -eq `grep -c analyze_code  output/firekylin.sql` ];then
  echo 'missing analyze_code in firekylin.sql';
  exit;
fi


cp -r bin/ssl/auto_build.sh output/;
cp -r bin/ssl/https.js output/;
cp -r bin/ssl/https.sh output/;

rm -r output/app/common/config/db.js;
rm -rf output/www/static/js/*.map;<commit_msg>fix #279 theme static file modify invalid<commit_after>#!/bin/sh

rm -rf firekylin;
rm -rf output;
rm -rf output.theme;

mkdir output;

echo 'webpack start ...';
npm run webpack.build.production;
echo 'webpack end';

node stc.config.js;

mkdir -p www/theme/firekylin.build/html;
cp -r www/theme/firekylin/*.html www/theme/firekylin.build/html/
cp -r www/theme/firekylin/inc www/theme/firekylin.build/html/
cp -r www/theme/firekylin/package.json www/theme/firekylin.build/html/

# rm stc plugin in theme file temporary
# node stc.view.config.js;

# cp -r output.theme/www/theme/firekylin.build/html/* output.theme/www/theme/firekylin;
# rm -rf output.theme/www/theme/firekylin.build;
# cp -r output.theme/www/ output/www/
# rm -rf output.theme;
# rm -rf www/theme/firekylin.build/;


npm run compile;
npm run copy-package;

cp -r app output;
rm -rf output/app/common/runtime;

cp -r nginx.conf output/nginx_default.conf;
cp -r pm2.json output/pm2_default.json;
cp -r www/*.js output/www;


cp -r firekylin.sql output/;
if [ 0 -eq `grep -c analyze_code  output/firekylin.sql` ];then
  echo 'missing analyze_code in firekylin.sql';
  exit;
fi


cp -r bin/ssl/auto_build.sh output/;
cp -r bin/ssl/https.js output/;
cp -r bin/ssl/https.sh output/;

rm -r output/app/common/config/db.js;
rm -rf output/www/static/js/*.map;
{'fraction_non_alphanumeric': 0.14655172413793102, 'fraction_numerical': 0.0035266457680250786, 'mean_word_length': 3.4711033274956216, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 32, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2426219', 'n_tokens_mistral': 1020, 'n_tokens_neox': 1024, 'n_words': 250}