Update node and packages versions and use package-lock for ci actions

This commit is contained in:
Thomas Schwery 2019-09-29 22:11:20 +02:00
parent bbcaf9c579
commit f71c667a1b
5 changed files with 1079 additions and 22 deletions

View file

@ -1,4 +1,4 @@
image: node:7.9 image: node:10.16
cache: cache:
paths: paths:
@ -11,7 +11,7 @@ variables:
node-build: node-build:
stage: build stage: build
script: script:
- npm install - npm ci
- npm run build - npm run build
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week

View file

@ -7,18 +7,19 @@ var paths = require('metalsmith-paths')
var filemetadata = require('metalsmith-filemetadata') var filemetadata = require('metalsmith-filemetadata')
var matters = require('metalsmith-matters') var matters = require('metalsmith-matters')
var postcss = require('metalsmith-postcss') var postcss = require('metalsmith-postcss')
var discoverPartials = require('metalsmith-discover-partials')
var fs = require('fs'); var fs = require('fs');
var moment = require('moment'); var moment = require('moment');
var _ = require('underscore'); var _ = require('underscore');
var handlebars = require('handlebars'); var handlebars = require('handlebars');
var handlebars_layout = require('handlebars-layouts'); var handlebarsLayout = require('handlebars-layouts');
moment.locale('fr'); moment.locale('fr');
//--------------------------- Handlebars -----------------------------// //--------------------------- Handlebars -----------------------------//
handlebars.registerHelper(handlebars_layout(handlebars)); handlebars.registerHelper(handlebarsLayout(handlebars));
handlebars.registerHelper('formatDate', function(date) { handlebars.registerHelper('formatDate', function(date) {
return moment(new Date(date)).format('DD MMMM YYYY'); return moment(new Date(date)).format('DD MMMM YYYY');
@ -125,6 +126,7 @@ metalsmith(__dirname)
.use(markdown(require('./config/markdown'))) .use(markdown(require('./config/markdown')))
.use(pagination(require('./config/pagination'))) .use(pagination(require('./config/pagination')))
.use(paths(require('./config/paths'))) .use(paths(require('./config/paths')))
.use(discoverPartials(require('./config/layouts-partials')))
.use(layouts(require('./config/layouts'))) .use(layouts(require('./config/layouts')))
.use(copyVendor()) .use(copyVendor())
.use(postcss(require('./config/postcss'))) .use(postcss(require('./config/postcss')))

View file

@ -0,0 +1,3 @@
module.exports = {
directory: "templates/partials",
}

1052
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -3,24 +3,24 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"autoprefixer": ">=6.5.3", "autoprefixer": "^9.6.1",
"bower": ">=1.5.2", "epub-generator": "^1.0.1",
"epub-generator": ">=1.0.1", "handlebars": "^4.4.0",
"handlebars": ">=3.0.3", "handlebars-layouts": "^3.1.0",
"handlebars-layouts": ">=3.1.0", "jstransformer-handlebars": "^1.1.0",
"metalsmith": ">=1.0.1", "metalsmith": "^2.3.0",
"metalsmith-collections": ">=0.7.0", "metalsmith-collections": "^0.9.0",
"metalsmith-collections-paginate": ">=2.0.1", "metalsmith-discover-partials": "^0.1.2",
"metalsmith-filemetadata": ">=1.0.0", "metalsmith-filemetadata": "^1.0.0",
"metalsmith-layouts": ">=1.6.5", "metalsmith-layouts": "^2.3.1",
"metalsmith-markdown": ">=0.2.1", "metalsmith-markdown": "^1.2.0",
"metalsmith-matters": ">=1.2.0", "metalsmith-matters": "^1.2.0",
"metalsmith-pagination": ">=1.0.0", "metalsmith-pagination": "^1.4.1",
"metalsmith-paths": ">=2.1.2", "metalsmith-paths": "^3.0.1",
"metalsmith-permalinks": ">=0.5.0", "metalsmith-permalinks": "^2.2.0",
"metalsmith-postcss": ">=4.0.0", "metalsmith-postcss": "^4.2.0",
"moment": ">=2.6.0", "moment": "^2.24.0",
"underscore": ">=1.8.3" "underscore": "^1.9.1"
}, },
"scripts": { "scripts": {
"build": "node build.js", "build": "node build.js",