Merge branch 'update-nodejs' into 'master'
Update node and packages versions and use package-lock for ci actions See merge request commun/recettes!8
This commit is contained in:
commit
43368d0c04
5 changed files with 1079 additions and 22 deletions
|
@ -1,4 +1,4 @@
|
|||
image: node:7.9
|
||||
image: node:10.16
|
||||
|
||||
cache:
|
||||
paths:
|
||||
|
@ -11,7 +11,7 @@ variables:
|
|||
node-build:
|
||||
stage: build
|
||||
script:
|
||||
- npm install
|
||||
- npm ci
|
||||
- npm run build
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
|
|
6
build.js
6
build.js
|
@ -7,18 +7,19 @@ var paths = require('metalsmith-paths')
|
|||
var filemetadata = require('metalsmith-filemetadata')
|
||||
var matters = require('metalsmith-matters')
|
||||
var postcss = require('metalsmith-postcss')
|
||||
var discoverPartials = require('metalsmith-discover-partials')
|
||||
|
||||
var fs = require('fs');
|
||||
var moment = require('moment');
|
||||
var _ = require('underscore');
|
||||
|
||||
var handlebars = require('handlebars');
|
||||
var handlebars_layout = require('handlebars-layouts');
|
||||
var handlebarsLayout = require('handlebars-layouts');
|
||||
|
||||
moment.locale('fr');
|
||||
|
||||
//--------------------------- Handlebars -----------------------------//
|
||||
handlebars.registerHelper(handlebars_layout(handlebars));
|
||||
handlebars.registerHelper(handlebarsLayout(handlebars));
|
||||
|
||||
handlebars.registerHelper('formatDate', function(date) {
|
||||
return moment(new Date(date)).format('DD MMMM YYYY');
|
||||
|
@ -125,6 +126,7 @@ metalsmith(__dirname)
|
|||
.use(markdown(require('./config/markdown')))
|
||||
.use(pagination(require('./config/pagination')))
|
||||
.use(paths(require('./config/paths')))
|
||||
.use(discoverPartials(require('./config/layouts-partials')))
|
||||
.use(layouts(require('./config/layouts')))
|
||||
.use(copyVendor())
|
||||
.use(postcss(require('./config/postcss')))
|
||||
|
|
3
config/layouts-partials.js
Normal file
3
config/layouts-partials.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
directory: "templates/partials",
|
||||
}
|
1052
package-lock.json
generated
Normal file
1052
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
36
package.json
36
package.json
|
@ -3,24 +3,24 @@
|
|||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"autoprefixer": ">=6.5.3",
|
||||
"bower": ">=1.5.2",
|
||||
"epub-generator": ">=1.0.1",
|
||||
"handlebars": ">=3.0.3",
|
||||
"handlebars-layouts": ">=3.1.0",
|
||||
"metalsmith": ">=1.0.1",
|
||||
"metalsmith-collections": ">=0.7.0",
|
||||
"metalsmith-collections-paginate": ">=2.0.1",
|
||||
"metalsmith-filemetadata": ">=1.0.0",
|
||||
"metalsmith-layouts": ">=1.6.5",
|
||||
"metalsmith-markdown": ">=0.2.1",
|
||||
"metalsmith-matters": ">=1.2.0",
|
||||
"metalsmith-pagination": ">=1.0.0",
|
||||
"metalsmith-paths": ">=2.1.2",
|
||||
"metalsmith-permalinks": ">=0.5.0",
|
||||
"metalsmith-postcss": ">=4.0.0",
|
||||
"moment": ">=2.6.0",
|
||||
"underscore": ">=1.8.3"
|
||||
"autoprefixer": "^9.6.1",
|
||||
"epub-generator": "^1.0.1",
|
||||
"handlebars": "^4.4.0",
|
||||
"handlebars-layouts": "^3.1.0",
|
||||
"jstransformer-handlebars": "^1.1.0",
|
||||
"metalsmith": "^2.3.0",
|
||||
"metalsmith-collections": "^0.9.0",
|
||||
"metalsmith-discover-partials": "^0.1.2",
|
||||
"metalsmith-filemetadata": "^1.0.0",
|
||||
"metalsmith-layouts": "^2.3.1",
|
||||
"metalsmith-markdown": "^1.2.0",
|
||||
"metalsmith-matters": "^1.2.0",
|
||||
"metalsmith-pagination": "^1.4.1",
|
||||
"metalsmith-paths": "^3.0.1",
|
||||
"metalsmith-permalinks": "^2.2.0",
|
||||
"metalsmith-postcss": "^4.2.0",
|
||||
"moment": "^2.24.0",
|
||||
"underscore": "^1.9.1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node build.js",
|
||||
|
|
Loading…
Add table
Reference in a new issue