Skip to content

Commit 39604d3

Browse files
Fix build
1 parent 30ef699 commit 39604d3

File tree

7 files changed

+7
-69
lines changed

7 files changed

+7
-69
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
node-version: 18
2323
- run: npm ci
2424
- run: npm run build
25-
- run: npm run prod
2625
- name: Archive production artifacts
2726
uses: actions/upload-artifact@v2
2827
with:

.github/workflows/release.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
node-version: 18
2222
- run: npm ci
2323
- run: npm run build
24-
- run: npm run prod
2524

2625
publish-npm:
2726
needs: build
@@ -34,7 +33,6 @@ jobs:
3433
registry-url: https://registry.npmjs.org/
3534
- run: npm ci
3635
- run: npm run build
37-
- run: npm run prod
3836
- run: npm publish
3937
env:
4038
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
@@ -50,7 +48,6 @@ jobs:
5048
registry-url: https://registry.npmjs.org/
5149
- run: npm ci
5250
- run: npm run build
53-
- run: npm run prod
5451
- uses: softprops/action-gh-release@v1
5552
if: startsWith(github.ref, 'refs/tags/')
5653
with:

config/rollup.base.mjs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,11 @@ import chalk from 'chalk'
22

33
// Rollup plugins
44
import eslint from '@rollup/plugin-eslint'
5-
import replace from '@rollup/plugin-replace'
65
import resolve from '@rollup/plugin-node-resolve'
76
import commonjs from '@rollup/plugin-commonjs'
87
import esbuild from 'rollup-plugin-esbuild'
98
import progress from 'rollup-plugin-progress'
109

11-
switch (process.env.BUILD_ENV) {
12-
case 'DEV': {
13-
console.log(chalk.cyan('+--------------=+| DEVELOP BUILD |+=--------------+'))
14-
break
15-
}
16-
case 'CI': {
17-
console.log(chalk.green('+--------------=+| CI BUILD |+=--------------+'))
18-
break
19-
}
20-
default: {
21-
console.log(chalk.yellow('+--------------=+| NORMAL BUILD |+=--------------+'))
22-
}
23-
}
24-
2510
const isProduction = process.env.NODE_ENV === 'production'
2611

2712
// Log build environment
@@ -50,14 +35,8 @@ export default {
5035
commonjs(),
5136
esbuild({
5237
target: 'es2015',
53-
sourceMap: !isProduction,
38+
sourceMap: true,
5439
minify: isProduction
55-
}),
56-
replace({
57-
preventAssignment: true,
58-
values: {
59-
'process.env.NODE_ENV': `'${process.env.BUILD_TARGET || 'development'}'`
60-
}
6140
})
6241
]
6342
}

config/rollup.prod.mjs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// Import base config
22
import base from './rollup.base.mjs'
33

4-
if (process.env.BUILD_TARGET === 'production') base.output.file = `${base.proPath}/${base.bundle}.min.js`
5-
else base.output.file = `${base.proPath}/${base.bundle}.dev.js`
6-
7-
base.output.sourcemap = process.env.BUILD_ENV === 'DEMO' || process.env.BUILD_ENV === 'CI' ? base.output.sourcemap : false
4+
base.output.file = `${base.proPath}/${base.bundle}.min.js`
85

96
delete base.bundle
107
delete base.devPath

package-lock.json

Lines changed: 2 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
{
22
"name": "ef-core",
3-
"version": "0.17.1",
3+
"version": "0.17.2",
44
"description": "Core of ef.js (without parser)",
55
"main": "dist/ef-core.min.js",
66
"module": "src/ef-core.js",
77
"type": "index.d.ts",
88
"scripts": {
99
"start": "rollup -c ./config/rollup.dev.mjs -w",
10-
"build": "rollup -c ./config/rollup.prod.mjs",
11-
"prod": "cross-env BUILD_TARGET=production rollup -c ./config/rollup.prod.mjs",
10+
"build": "cross-env NODE_ENV=production rollup -c ./config/rollup.prod.mjs",
1211
"lint": "eslint --ext .js src",
1312
"doc": "jsdoc -r src/"
1413
},
@@ -32,7 +31,6 @@
3231
"@rollup/plugin-commonjs": "^25.0.2",
3332
"@rollup/plugin-eslint": "^9.0.4",
3433
"@rollup/plugin-node-resolve": "^15.1.0",
35-
"@rollup/plugin-replace": "^5.0.2",
3634
"chalk": "^5.3.0",
3735
"chokidar": "^3.5.3",
3836
"cross-env": "^7.0.3",

src/ef-core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const create = (ast, name) => {
107107
return EFComponent
108108
}
109109

110-
let coreVersion = '0.17.1'
110+
let coreVersion = '0.17.2'
111111

112112
if (process.env.NODE_ENV !== 'production') {
113113
coreVersion = `${coreVersion}+debug`

0 commit comments

Comments
 (0)