Remove scripts
This commit is contained in:
parent
94bb51d073
commit
4f03229810
@ -1,5 +0,0 @@
|
||||
{
|
||||
"rules": {
|
||||
"import/no-extraneous-dependencies": 0
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
const webpack = require('webpack');
|
||||
const middleware = require('webpack-dev-middleware');
|
||||
const express = require('express');
|
||||
const path = require('path');
|
||||
const cors = require('cors');
|
||||
const webpackConfig = require('./webpack.config.dev');
|
||||
|
||||
const compiler = webpack(webpackConfig);
|
||||
const app = express();
|
||||
|
||||
function coi(req, res, next) {
|
||||
res.setHeader("Cross-Origin-Opener-Policy", "same-origin");
|
||||
res.setHeader("Cross-Origin-Embedder-Policy", "require-corp");
|
||||
next();
|
||||
}
|
||||
|
||||
app.use(cors());
|
||||
app.use(coi);
|
||||
|
||||
app.use('/', express.static(path.resolve(__dirname, '..')));
|
||||
app.use(middleware(compiler, { publicPath: '/dist', writeToDisk: true }));
|
||||
|
||||
module.exports = app.listen(3000, () => {
|
||||
console.log('Server is running on port 3000');
|
||||
});
|
@ -1,9 +0,0 @@
|
||||
const chai = require('chai');
|
||||
const constants = require('../tests/constants');
|
||||
|
||||
global.expect = chai.expect;
|
||||
global.FFmpeg = require('../src');
|
||||
|
||||
Object.keys(constants).forEach((key) => {
|
||||
global[key] = constants[key];
|
||||
});
|
@ -1,23 +0,0 @@
|
||||
module.exports = {
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.m?js$/,
|
||||
exclude: /(node_modules|bower_components)/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: 'last 2 versions',
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
@ -1,27 +0,0 @@
|
||||
const path = require('path');
|
||||
const common = require('./webpack.config.common');
|
||||
|
||||
const genConfig = ({
|
||||
entry, filename, library, libraryTarget,
|
||||
}) => ({
|
||||
...common,
|
||||
mode: 'development',
|
||||
entry,
|
||||
output: {
|
||||
filename,
|
||||
library,
|
||||
libraryTarget,
|
||||
},
|
||||
devServer: {
|
||||
allowedHosts: ['localhost', '.gitpod.io'],
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = [
|
||||
genConfig({
|
||||
entry: path.resolve(__dirname, '..', 'src', 'index.js'),
|
||||
filename: 'ffmpeg.dev.js',
|
||||
library: 'FFmpeg',
|
||||
libraryTarget: 'umd',
|
||||
}),
|
||||
];
|
@ -1,26 +0,0 @@
|
||||
const path = require('path');
|
||||
const common = require('./webpack.config.common');
|
||||
|
||||
const genConfig = ({
|
||||
entry, filename, library, libraryTarget,
|
||||
}) => ({
|
||||
...common,
|
||||
mode: 'production',
|
||||
devtool: 'source-map',
|
||||
entry,
|
||||
output: {
|
||||
path: path.resolve(__dirname, '..', 'dist'),
|
||||
filename,
|
||||
library,
|
||||
libraryTarget,
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = [
|
||||
genConfig({
|
||||
entry: path.resolve(__dirname, '..', 'src', 'index.js'),
|
||||
filename: 'ffmpeg.min.js',
|
||||
library: 'FFmpeg',
|
||||
libraryTarget: 'umd',
|
||||
}),
|
||||
];
|
@ -1,29 +0,0 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
const common = require('./webpack.config.common');
|
||||
|
||||
const genConfig = ({
|
||||
entry, filename, library, libraryTarget,
|
||||
}) => ({
|
||||
...common,
|
||||
mode: 'development',
|
||||
target: 'webworker',
|
||||
entry,
|
||||
output: {
|
||||
filename,
|
||||
library,
|
||||
libraryTarget,
|
||||
},
|
||||
devServer: {
|
||||
allowedHosts: ['localhost', '.gitpod.io'],
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = [
|
||||
genConfig({
|
||||
entry: path.resolve(__dirname, '..', 'src', 'index.js'),
|
||||
filename: 'ffmpeg.dev.js',
|
||||
library: 'FFmpeg',
|
||||
libraryTarget: 'umd',
|
||||
}),
|
||||
];
|
@ -1,27 +0,0 @@
|
||||
const path = require('path');
|
||||
const common = require('./webpack.config.common');
|
||||
|
||||
const genConfig = ({
|
||||
entry, filename, library, libraryTarget,
|
||||
}) => ({
|
||||
...common,
|
||||
mode: 'production',
|
||||
devtool: 'source-map',
|
||||
target: 'webworker',
|
||||
entry,
|
||||
output: {
|
||||
path: path.resolve(__dirname, '..', 'dist'),
|
||||
filename,
|
||||
library,
|
||||
libraryTarget,
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = [
|
||||
genConfig({
|
||||
entry: path.resolve(__dirname, '..', 'src', 'index.js'),
|
||||
filename: 'ffmpeg.min.js',
|
||||
library: 'FFmpeg',
|
||||
libraryTarget: 'umd',
|
||||
}),
|
||||
];
|
@ -1,25 +0,0 @@
|
||||
const webpack = require('webpack');
|
||||
const middleware = require('webpack-dev-middleware');
|
||||
const express = require('express');
|
||||
const path = require('path');
|
||||
const cors = require('cors');
|
||||
const webpackConfig = require('./webpack.config.worker.dev');
|
||||
|
||||
const compiler = webpack(webpackConfig);
|
||||
const app = express();
|
||||
|
||||
function coi(req, res, next) {
|
||||
res.setHeader("Cross-Origin-Opener-Policy", "same-origin");
|
||||
res.setHeader("Cross-Origin-Embedder-Policy", "require-corp");
|
||||
next();
|
||||
}
|
||||
|
||||
app.use(cors());
|
||||
app.use(coi);
|
||||
|
||||
app.use('/', express.static(path.resolve(__dirname, '..')));
|
||||
app.use(middleware(compiler, { publicPath: '/dist', writeToDisk: true }));
|
||||
|
||||
module.exports = app.listen(3000, () => {
|
||||
console.log('Server is running on port 3000');
|
||||
});
|
Loading…
Reference in New Issue
Block a user