[DE][mobile] removed unused scripts and configs
This commit is contained in:
parent
3465aac7d9
commit
f1d5bdabfa
Binary file not shown.
Before Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
|
@ -1,12 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
presets: [
|
|
||||||
'@babel/preset-react',
|
|
||||||
['@babel/preset-env', {
|
|
||||||
modules: false,
|
|
||||||
}],
|
|
||||||
],
|
|
||||||
plugins: [
|
|
||||||
'@babel/plugin-transform-runtime',
|
|
||||||
'@babel/plugin-syntax-dynamic-import',
|
|
||||||
],
|
|
||||||
};
|
|
|
@ -1,36 +0,0 @@
|
||||||
const webpack = require('webpack');
|
|
||||||
const ora = require('ora');
|
|
||||||
const rm = require('rimraf');
|
|
||||||
const chalk = require('chalk');
|
|
||||||
const config = require('./webpack.config.js');
|
|
||||||
|
|
||||||
const env = process.env.NODE_ENV || 'development';
|
|
||||||
const target = process.env.TARGET || 'web';
|
|
||||||
const isCordova = target === 'cordova'
|
|
||||||
|
|
||||||
const spinner = ora(env === 'production' ? 'building for production...' : 'building development version...');
|
|
||||||
spinner.start();
|
|
||||||
|
|
||||||
rm(isCordova ? './cordova/www' : './www/', (removeErr) => {
|
|
||||||
if (removeErr) throw removeErr;
|
|
||||||
|
|
||||||
webpack(config, (err, stats) => {
|
|
||||||
if (err) throw err;
|
|
||||||
spinner.stop();
|
|
||||||
|
|
||||||
process.stdout.write(`${stats.toString({
|
|
||||||
colors: true,
|
|
||||||
modules: false,
|
|
||||||
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
|
|
||||||
chunks: false,
|
|
||||||
chunkModules: false,
|
|
||||||
})}\n\n`);
|
|
||||||
|
|
||||||
if (stats.hasErrors()) {
|
|
||||||
console.log(chalk.red('Build failed with errors.\n'));
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(chalk.cyan('Build complete.\n'));
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,217 +0,0 @@
|
||||||
const webpack = require('webpack');
|
|
||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
||||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
||||||
|
|
||||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
||||||
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin');
|
|
||||||
const TerserPlugin = require('terser-webpack-plugin');
|
|
||||||
|
|
||||||
|
|
||||||
const path = require('path');
|
|
||||||
|
|
||||||
function resolvePath(dir) {
|
|
||||||
return path.join(__dirname, '..', dir);
|
|
||||||
}
|
|
||||||
|
|
||||||
const env = process.env.NODE_ENV || 'development';
|
|
||||||
const target = process.env.TARGET || 'web';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
mode: env,
|
|
||||||
entry: {
|
|
||||||
app: './src/js/app.js',
|
|
||||||
},
|
|
||||||
output: {
|
|
||||||
path: resolvePath('./'),
|
|
||||||
filename: 'js/[name].js',
|
|
||||||
chunkFilename: 'js/[name].js',
|
|
||||||
publicPath: '',
|
|
||||||
hotUpdateChunkFilename: 'hot/hot-update.js',
|
|
||||||
hotUpdateMainFilename: 'hot/hot-update.json',
|
|
||||||
},
|
|
||||||
resolve: {
|
|
||||||
extensions: ['.js', '.jsx', '.json'],
|
|
||||||
alias: {
|
|
||||||
|
|
||||||
'@': resolvePath('src'),
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
|
||||||
watch: true,
|
|
||||||
watchOptions: {
|
|
||||||
aggregateTimeout: 600,
|
|
||||||
poll: 1000,
|
|
||||||
},
|
|
||||||
externals: {
|
|
||||||
jquery: 'jQuery'
|
|
||||||
},
|
|
||||||
devtool: env === 'production' ? 'source-map' : 'source-map',
|
|
||||||
devServer: {
|
|
||||||
hot: true,
|
|
||||||
open: false,
|
|
||||||
compress: true,
|
|
||||||
contentBase: '/www/',
|
|
||||||
disableHostCheck: true,
|
|
||||||
historyApiFallback: true,
|
|
||||||
watchOptions: {
|
|
||||||
poll: 1000,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
optimization: {
|
|
||||||
minimizer: [new TerserPlugin({
|
|
||||||
sourceMap: true,
|
|
||||||
})],
|
|
||||||
},
|
|
||||||
module: {
|
|
||||||
rules: [
|
|
||||||
{
|
|
||||||
test: /\.(mjs|js|jsx)$/,
|
|
||||||
use: 'babel-loader',
|
|
||||||
include: [
|
|
||||||
resolvePath('src'),
|
|
||||||
resolvePath('node_modules/framework7'),
|
|
||||||
|
|
||||||
resolvePath('node_modules/framework7-react'),
|
|
||||||
|
|
||||||
resolvePath('node_modules/template7'),
|
|
||||||
resolvePath('node_modules/dom7'),
|
|
||||||
resolvePath('node_modules/ssr-window'),
|
|
||||||
],
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
test: /\.css$/,
|
|
||||||
use: [
|
|
||||||
(env === 'development' ? 'style-loader' : {
|
|
||||||
loader: MiniCssExtractPlugin.loader,
|
|
||||||
options: {
|
|
||||||
publicPath: '../www'
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
'css-loader',
|
|
||||||
'postcss-loader',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.styl(us)?$/,
|
|
||||||
use: [
|
|
||||||
(env === 'development' ? 'style-loader' : {
|
|
||||||
loader: MiniCssExtractPlugin.loader,
|
|
||||||
options: {
|
|
||||||
publicPath: '../www'
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
'css-loader',
|
|
||||||
'postcss-loader',
|
|
||||||
'stylus-loader',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.less$/,
|
|
||||||
use: [
|
|
||||||
(env === 'development' ? 'style-loader' : {
|
|
||||||
loader: MiniCssExtractPlugin.loader,
|
|
||||||
options: {
|
|
||||||
publicPath: '../www'
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
'css-loader',
|
|
||||||
'postcss-loader',
|
|
||||||
'less-loader',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.(sa|sc)ss$/,
|
|
||||||
use: [
|
|
||||||
(env === 'development' ? 'style-loader' : {
|
|
||||||
loader: MiniCssExtractPlugin.loader,
|
|
||||||
options: {
|
|
||||||
publicPath: '../www'
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
'css-loader',
|
|
||||||
'postcss-loader',
|
|
||||||
'sass-loader',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
|
|
||||||
loader: 'url-loader',
|
|
||||||
options: {
|
|
||||||
limit: 10000,
|
|
||||||
name: 'images/[name].[ext]',
|
|
||||||
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac|m4a)(\?.*)?$/,
|
|
||||||
loader: 'url-loader',
|
|
||||||
options: {
|
|
||||||
limit: 10000,
|
|
||||||
name: 'media/[name].[ext]',
|
|
||||||
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
|
|
||||||
loader: 'url-loader',
|
|
||||||
options: {
|
|
||||||
limit: 10000,
|
|
||||||
name: 'fonts/[name].[ext]',
|
|
||||||
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
],
|
|
||||||
},
|
|
||||||
plugins: [
|
|
||||||
new webpack.DefinePlugin({
|
|
||||||
'process.env.NODE_ENV': JSON.stringify(env),
|
|
||||||
'process.env.TARGET': JSON.stringify(target),
|
|
||||||
}),
|
|
||||||
|
|
||||||
...(env === 'production' ? [
|
|
||||||
new OptimizeCSSPlugin({
|
|
||||||
cssProcessorOptions: {
|
|
||||||
safe: true,
|
|
||||||
map: { inline: false },
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
new webpack.optimize.ModuleConcatenationPlugin(),
|
|
||||||
] : [
|
|
||||||
// Development only plugins
|
|
||||||
new webpack.HotModuleReplacementPlugin(),
|
|
||||||
new webpack.NamedModulesPlugin(),
|
|
||||||
]),
|
|
||||||
new HtmlWebpackPlugin({
|
|
||||||
filename: './index.html',
|
|
||||||
template: './index_dev.html',
|
|
||||||
inject: true,
|
|
||||||
minify: env === 'production' ? {
|
|
||||||
collapseWhitespace: true,
|
|
||||||
removeComments: true,
|
|
||||||
removeRedundantAttributes: true,
|
|
||||||
removeScriptTypeAttributes: true,
|
|
||||||
removeStyleLinkTypeAttributes: true,
|
|
||||||
useShortDoctype: true
|
|
||||||
} : false,
|
|
||||||
}),
|
|
||||||
new MiniCssExtractPlugin({
|
|
||||||
filename: 'css/[name].css',
|
|
||||||
}),
|
|
||||||
new CopyWebpackPlugin({
|
|
||||||
patterns: [
|
|
||||||
{
|
|
||||||
noErrorOnMissing: true,
|
|
||||||
from: resolvePath('src/static'),
|
|
||||||
to: resolvePath('www/static'),
|
|
||||||
},
|
|
||||||
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
};
|
|
|
@ -1,26 +0,0 @@
|
||||||
{
|
|
||||||
"cwd": "E:\\Work\\Projects\\WebOffice\\web-apps\\apps\\documenteditor\\mobile",
|
|
||||||
"type": [
|
|
||||||
"web"
|
|
||||||
],
|
|
||||||
"name": "Desktop Editor",
|
|
||||||
"framework": "react",
|
|
||||||
"template": "split-view",
|
|
||||||
"cssPreProcessor": "less",
|
|
||||||
"bundler": "webpack",
|
|
||||||
"webpack": {
|
|
||||||
"developmentSourceMap": true,
|
|
||||||
"productionSourceMap": true,
|
|
||||||
"hashAssets": false,
|
|
||||||
"preserveAssetsPaths": false,
|
|
||||||
"inlineAssets": true
|
|
||||||
},
|
|
||||||
"theming": {
|
|
||||||
"customColor": false,
|
|
||||||
"color": "#007aff",
|
|
||||||
"darkTheme": false,
|
|
||||||
"iconFonts": true,
|
|
||||||
"fillBars": false
|
|
||||||
},
|
|
||||||
"customBuild": false
|
|
||||||
}
|
|
|
@ -1,63 +0,0 @@
|
||||||
{
|
|
||||||
"name": "desktop-editor",
|
|
||||||
"private": true,
|
|
||||||
"version": "1.0.0",
|
|
||||||
"description": "Desktop Editor",
|
|
||||||
"repository": "",
|
|
||||||
"license": "UNLICENSED",
|
|
||||||
"scripts": {
|
|
||||||
"start": "npm run dev",
|
|
||||||
"dev": "cross-env NODE_ENV=development webpack-dev-server --config ./build/webpack.config.js",
|
|
||||||
"build-dev": "cross-env NODE_ENV=development node ./build/build.js",
|
|
||||||
"build-prod": "cross-env NODE_ENV=production node ./build/build.js",
|
|
||||||
"postinstall": "cpy ./node_modules/framework7-icons/fonts/*.* ./src/fonts/"
|
|
||||||
},
|
|
||||||
"browserslist": [
|
|
||||||
"Android >= 7",
|
|
||||||
"IOS >= 11",
|
|
||||||
"Safari >= 11",
|
|
||||||
"Chrome >= 49",
|
|
||||||
"Firefox >= 31",
|
|
||||||
"Samsung >= 5"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
|
||||||
"dom7": "^2.1.5",
|
|
||||||
"framework7": "^5.7.10",
|
|
||||||
"framework7-icons": "^3.0.1",
|
|
||||||
"framework7-react": "^5.7.10",
|
|
||||||
"prop-types": "^15.7.2",
|
|
||||||
"react": "^16.13.1",
|
|
||||||
"react-dom": "^16.13.1",
|
|
||||||
"template7": "^1.4.2"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/core": "^7.10.5",
|
|
||||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
||||||
"@babel/plugin-transform-runtime": "^7.10.5",
|
|
||||||
"@babel/preset-env": "^7.10.4",
|
|
||||||
"@babel/preset-react": "^7.10.4",
|
|
||||||
"@babel/runtime": "^7.10.5",
|
|
||||||
"babel-loader": "^8.1.0",
|
|
||||||
"chalk": "^4.1.0",
|
|
||||||
"copy-webpack-plugin": "^6.0.3",
|
|
||||||
"cpy-cli": "^3.1.1",
|
|
||||||
"cross-env": "^7.0.2",
|
|
||||||
"css-loader": "^4.0.0",
|
|
||||||
"file-loader": "^6.0.0",
|
|
||||||
"html-webpack-plugin": "^4.3.0",
|
|
||||||
"less": "^3.12.2",
|
|
||||||
"less-loader": "^6.2.0",
|
|
||||||
"mini-css-extract-plugin": "^0.9.0",
|
|
||||||
"optimize-css-assets-webpack-plugin": "^5.0.3",
|
|
||||||
"ora": "^4.0.5",
|
|
||||||
"postcss-loader": "^3.0.0",
|
|
||||||
"postcss-preset-env": "^6.7.0",
|
|
||||||
"rimraf": "^3.0.2",
|
|
||||||
"style-loader": "^1.2.1",
|
|
||||||
"terser-webpack-plugin": "^3.0.7",
|
|
||||||
"url-loader": "^4.1.0",
|
|
||||||
"webpack": "^4.44.0",
|
|
||||||
"webpack-cli": "^3.3.12",
|
|
||||||
"webpack-dev-server": "^3.11.0"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
plugins: {
|
|
||||||
'postcss-preset-env': {},
|
|
||||||
},
|
|
||||||
};
|
|
Loading…
Reference in a new issue