Skip to content

Commit 8fcc4b2

Browse files
committed
Merge branch 'ef-js-0-17-0' of https://github.com/ClassicOldSong/js-framework-benchmark into ClassicOldSong-ef-js-0-17-0
2 parents eae0add + cbe9e21 commit 8fcc4b2

28 files changed

+8249
-15948
lines changed

frameworks/keyed/ef-js/config/bs-config.mjs

Lines changed: 0 additions & 93 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import eft from 'rollup-plugin-eft'
2+
import eslint from '@rollup/plugin-eslint'
3+
4+
export default {
5+
input: {
6+
main: 'src/main.js'
7+
},
8+
del: true,
9+
format: 'iife',
10+
target: 'es2015',
11+
devPath: 'dist',
12+
proPath: 'dist',
13+
copyOptions: [[]],
14+
external: [],
15+
globals: {},
16+
plugins: [
17+
eft(),
18+
eslint({
19+
exclude: ['src/static/**.*', '../../../**/**.*', '**/*.efml']
20+
})
21+
],
22+
execCommands: []
23+
}

frameworks/keyed/ef-js/config/ef.config.mjs

Lines changed: 0 additions & 30 deletions
This file was deleted.

frameworks/keyed/ef-js/config/rollup.base.mjs

Lines changed: 0 additions & 98 deletions
This file was deleted.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import path from 'path'
2+
import chalk from 'chalk'
3+
import { deleteSync } from 'del'
4+
5+
// Rollup plugins
6+
import resolve from '@rollup/plugin-node-resolve'
7+
import commonjs from '@rollup/plugin-commonjs'
8+
import json from '@rollup/plugin-json'
9+
import esbuild from 'rollup-plugin-esbuild'
10+
import progress from 'rollup-plugin-progress'
11+
import execute from 'rollup-plugin-shell'
12+
import copy from 'rollup-plugin-copy-glob'
13+
14+
// build configuration
15+
import userConfig from './build.config.mjs'
16+
const {
17+
del,
18+
input,
19+
output,
20+
format,
21+
target,
22+
external,
23+
globals,
24+
devPath: _devPath,
25+
proPath: _proPath,
26+
plugins,
27+
copyOptions,
28+
execCommands
29+
} = userConfig
30+
31+
console.log('ENV:', chalk.bold.green(process.env.NODE_ENV || 'development'))
32+
33+
const isProduction = process.env.NODE_ENV === 'production'
34+
35+
const dir = path.normalize(isProduction ? _proPath : _devPath)
36+
37+
// Clear previous builds files
38+
if (del) {
39+
if (isProduction) deleteSync([`${_proPath}/**`])
40+
else deleteSync([`${_devPath}/**`])
41+
}
42+
43+
export default {
44+
input: input || {
45+
main: 'src/main.js'
46+
},
47+
output: output || {
48+
format: format || 'iife',
49+
dir,
50+
sourcemap: !isProduction,
51+
globals
52+
},
53+
external,
54+
plugins: [
55+
copy(...copyOptions, {
56+
verbose: true,
57+
watch: !isProduction
58+
}),
59+
progress({
60+
clearLine: false
61+
}),
62+
esbuild({
63+
exclude: [],
64+
target: target || 'es2015',
65+
sourceMap: !isProduction,
66+
minify: isProduction,
67+
define: {
68+
'process.env.NODE_ENV': `'${process.env.NODE_ENV}'`
69+
}
70+
}),
71+
resolve({
72+
browser: true,
73+
extensions: ['.mjs', '.js', '.jsx', '.json', '.node']
74+
}),
75+
json(),
76+
commonjs(),
77+
execute(execCommands),
78+
...plugins
79+
],
80+
watch: !isProduction && {
81+
include: ['src/**/*.*']
82+
}
83+
}

frameworks/keyed/ef-js/config/rollup.dev.mjs

Lines changed: 0 additions & 31 deletions
This file was deleted.

frameworks/keyed/ef-js/config/rollup.prod.mjs

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)