Commit 9d7fff64 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Met en place la publication dans NPM.

No related merge requests found
Showing with 1261 additions and 310 deletions
+1261 -310
default:
tags: [docker]
image: node:12-slim
retry: 2
stages: stages:
- build - build
- trigger - deploy
.the-job: build:
tags: [docker]
stage: build stage: build
image: node:12-slim
variables: variables:
NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.npm" NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/.npm"
before_script: before_script:
...@@ -16,7 +19,6 @@ stages: ...@@ -16,7 +19,6 @@ stages:
- npm run lint - npm run lint
- npm run build - npm run build
artifacts: artifacts:
name: reveal_js-$CI_COMMIT_REF_SLUG
paths: paths:
- public/ - public/
cache: cache:
...@@ -24,16 +26,25 @@ stages: ...@@ -24,16 +26,25 @@ stages:
paths: paths:
- "$NPM_CONFIG_CACHE" - "$NPM_CONFIG_CACHE"
build:
extends: .the-job
except:
refs:
- tags
pages: pages:
extends: .the-job stage: deploy
only: rules:
refs: - if: "$CI_COMMIT_TAG"
- tags needs:
- build
script: touch public
artifacts: artifacts:
expire_in: 5 years paths:
- public/
npm:
stage: deploy
rules:
- if: "$CI_COMMIT_TAG && $NPM_AUTH_TOKEN"
needs:
- build
before_script:
- npm config set '//registry.npmjs.org/:_authToken' "$NPM_AUTH_TOKEN"
script:
- cp package.json public/
- npm publish public --tag "$CI_COMMIT_TAG" --access public
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"name": "@inrae/reveal.js", "name": "@devatscience/reveal.js",
"version": "2.0.0", "version": "2.0.0",
"description": "Customized reveal.js.", "description": "Customized reveal.js.",
"scripts": { "scripts": {
...@@ -16,38 +16,36 @@ ...@@ -16,38 +16,36 @@
], ],
"author": "Guillaume Perréal <guillaume.perreal@inrae.fr>", "author": "Guillaume Perréal <guillaume.perreal@inrae.fr>",
"license": "MIT", "license": "MIT",
"dependencies": { "devDependencies": {
"@rollup/plugin-commonjs": "^11.1.0",
"@rollup/plugin-node-resolve": "^7.1.3",
"del": "^5.1.0", "del": "^5.1.0",
"depcheck": "^0.9.2",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"esm": "^3.2.25", "esm": "^3.2.25",
"gulp": "^4.0.2", "gulp": "^4.0.2",
"gulp-csso": "^4.0.1", "gulp-csso": "^4.0.1",
"gulp-imagemin": "^7.1.0", "gulp-imagemin": "^7.1.0",
"gulplog": "^1.0.0",
"gulp-sass": "^4.1.0", "gulp-sass": "^4.1.0",
"gulp-sourcemaps": "^2.6.5", "gulp-sourcemaps": "^2.6.5",
"gulp-terser": "^1.2.0", "gulp-terser": "^1.2.0",
"gulp-zip": "^5.0.1", "gulp-zip": "^5.0.1",
"gulplog": "^1.0.0",
"highlight.js": "^9.18.1", "highlight.js": "^9.18.1",
"husky": "^4.2.5",
"lint-staged": "^10.2.2",
"mermaid": "^8.5.0", "mermaid": "^8.5.0",
"node-sass": "^4.14.0", "node-sass": "^4.14.0",
"plugin-error": "^1.0.1", "plugin-error": "^1.0.1",
"prettier": "^2.0.5",
"reveal.js": "^3.9.2", "reveal.js": "^3.9.2",
"rollup": "^2.8.2", "rollup": "^2.8.2",
"@rollup/plugin-commonjs": "^11.1.0",
"@rollup/plugin-node-resolve": "^7.1.3",
"through2": "^3.0.1", "through2": "^3.0.1",
"vinyl": "^2.2.0", "vinyl": "^2.2.0",
"vinyl-sourcemaps-apply": "^0.2.1" "vinyl-sourcemaps-apply": "^0.2.1"
}, },
"devDependencies": {
"depcheck": "^0.9.2",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"husky": "^4.2.5",
"lint-staged": "^10.2.2",
"prettier": "^2.0.5"
},
"eslintConfig": { "eslintConfig": {
"extends": [ "extends": [
"eslint:recommended", "eslint:recommended",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment