File tree Expand file tree Collapse file tree 3 files changed +78
-2
lines changed Expand file tree Collapse file tree 3 files changed +78
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Build
2
+
3
+ on :
4
+ push :
5
+ branches : main
6
+ pull_request :
7
+ branches : ' *'
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout
14
+ uses : actions/checkout@v2
15
+ - name : Install node
16
+ uses : actions/setup-node@v1
17
+ with :
18
+ node-version : ' 12.x'
19
+ - name : Cache node modules
20
+ uses : actions/cache@v3
21
+ env :
22
+ cache-name : cache-node-modules
23
+ with :
24
+ # npm cache files are stored in `~/.npm` on Linux/macOS
25
+ path : ~/.npm
26
+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
27
+ restore-keys : |
28
+ ${{ runner.os }}-build-${{ env.cache-name }}-
29
+ ${{ runner.os }}-build-
30
+ ${{ runner.os }}-
31
+ - name : Install dependencies
32
+ run : |
33
+ cd pyscriptjs
34
+ npm install
35
+ - name : Build pyscript
36
+ run : |
37
+ cd pyscriptjs
38
+ npm run build
Original file line number Diff line number Diff line change
1
+ name : Lint
2
+
3
+ on :
4
+ push :
5
+ branches : main
6
+ pull_request :
7
+ branches : ' *'
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout
14
+ uses : actions/checkout@v2
15
+ - name : Install node
16
+ uses : actions/setup-node@v1
17
+ with :
18
+ node-version : ' 12.x'
19
+ - name : Cache node modules
20
+ uses : actions/cache@v3
21
+ env :
22
+ cache-name : cache-node-modules
23
+ with :
24
+ # npm cache files are stored in `~/.npm` on Linux/macOS
25
+ path : ~/.npm
26
+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
27
+ restore-keys : |
28
+ ${{ runner.os }}-build-${{ env.cache-name }}-
29
+ ${{ runner.os }}-build-
30
+ ${{ runner.os }}-
31
+ - name : Install dependencies
32
+ run : |
33
+ cd pyscriptjs
34
+ npm install
35
+ - name : Run linter
36
+ run : |
37
+ cd pyscriptjs
38
+ npm run lint
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import typescript from "@rollup/plugin-typescript";
8
8
import css from "rollup-plugin-css-only" ;
9
9
import serve from 'rollup-plugin-serve'
10
10
11
- const production = ! process . env . ROLLUP_WATCH ;
11
+ const production = ! process . env . ROLLUP_WATCH || ( process . env . NODE_ENV === "production" ) ;
12
12
13
13
function serve_ ( ) {
14
14
let server ;
@@ -68,7 +68,7 @@ export default {
68
68
! production && serve ( ) ,
69
69
! production && livereload ( "public" ) ,
70
70
production && terser ( ) ,
71
- serve ( {
71
+ ! production && serve ( {
72
72
port : 8080 ,
73
73
contentBase : 'examples' }
74
74
)
You can’t perform that action at this time.
0 commit comments