mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-21 05:56:03 -05:00
Frontent dev env (#247)
* Added frontend development files/environment * More items-categories related removals * Improvements in pages templates (inc. static pages) * Improvements in video player * Added empty home page message + cta * Updates in media, playlist and management pages * Improvements in material icons font loading * Replaced media & playlists links in frontend dev-env * frontend package version update * chnaged frontend dev url port * static files update * Changed default position of theme switcher * enabled frontend docker container
This commit is contained in:
3
frontend/packages/scripts/config/build.config.js
Executable file
3
frontend/packages/scripts/config/build.config.js
Executable file
@@ -0,0 +1,3 @@
|
||||
import { buildCommonjs } from './helpers/buildCommonjs.js';
|
||||
|
||||
export default buildCommonjs('./src/index.ts', '.')('./dist/webpack-dev-env.js');
|
||||
24
frontend/packages/scripts/config/helpers/buildCommonjs.js
Executable file
24
frontend/packages/scripts/config/helpers/buildCommonjs.js
Executable file
@@ -0,0 +1,24 @@
|
||||
import typescript from 'rollup-plugin-typescript2';
|
||||
import resolve from '@rollup/plugin-node-resolve';
|
||||
import visualizer from 'rollup-plugin-visualizer';
|
||||
import cleanup from 'rollup-plugin-cleanup';
|
||||
|
||||
export function buildCommonjs(input_file, output_folder) {
|
||||
return function (filename, visualize) {
|
||||
const plugins = [
|
||||
resolve({ customResolveOptions: { moduleDirectories: 'node_modules' } }),
|
||||
typescript(),
|
||||
cleanup({ comments: 'none' }),
|
||||
];
|
||||
|
||||
if (visualize) {
|
||||
plugins.push(visualizer({ title: filename, filename: output_folder + filename + '.html' }));
|
||||
}
|
||||
|
||||
return {
|
||||
input: input_file,
|
||||
output: [{ format: 'cjs', file: filename }],
|
||||
plugins: plugins,
|
||||
};
|
||||
};
|
||||
}
|
||||
3
frontend/packages/scripts/config/visual.config.js
Executable file
3
frontend/packages/scripts/config/visual.config.js
Executable file
@@ -0,0 +1,3 @@
|
||||
import { buildCommonjs } from './helpers/buildCommonjs.js';
|
||||
|
||||
export default buildCommonjs('./src/index.ts', './visualizer/')('./dist/webpack-dev-env.js', true);
|
||||
3
frontend/packages/scripts/config/watch.config.js
Executable file
3
frontend/packages/scripts/config/watch.config.js
Executable file
@@ -0,0 +1,3 @@
|
||||
import { buildCommonjs } from './helpers/buildCommonjs.js';
|
||||
|
||||
export default buildCommonjs('./src/index.ts', '.')('./dist/webpack-dev-env.js');
|
||||
Reference in New Issue
Block a user