You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
623 B
28 lines
623 B
image: node:latest
|
|
|
|
before_script:
|
|
- echo "these are the currently installed node packages "
|
|
- npm list -g
|
|
- npm list minify -g || npm install minify -g
|
|
- npm list uglify -g || npm install uglify -g
|
|
|
|
pages:
|
|
stage: deploy
|
|
|
|
script:
|
|
- rm public -Rf
|
|
- mkdir -p min
|
|
- minify --js *.js > min/code.js
|
|
- minify --html index.html > min/index.html
|
|
- minify --css *.css > min/style.css
|
|
|
|
- mkdir -p ugly
|
|
- uglify --css --source min/*.css --output ugly/style.css
|
|
- uglify --source min/*.js --output ugly/code.js
|
|
|
|
- cp ugly public -r
|
|
- cp min/*.html public/
|
|
|
|
artifacts:
|
|
paths:
|
|
- public
|