Skip to content

Commit

Permalink
upgrade dependencies
Browse files Browse the repository at this point in the history
- upgrade dependencies
- add preview mode to build
- adding missing displayVersion properties in preview model
- exclude no-descending-specificity rule in stylelint
- fixes compatibility with Node 10
  • Loading branch information
mojavelinux committed Dec 26, 2018
1 parent ee85fb5 commit a2767b5
Show file tree
Hide file tree
Showing 7 changed files with 3,864 additions and 2,535 deletions.
3 changes: 2 additions & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "stylelint-config-standard",
"rules": {
"comment-empty-line-before": null
"comment-empty-line-before": null,
"no-descending-specificity": null,
}
}
4 changes: 3 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ gulp.task('lint', ['lint:css', 'lint:js'])

gulp.task('format', () => format(jsFiles))

gulp.task('build', () => build(srcDir, destDir))
gulp.task('build', function () {
return build(srcDir, destDir, this.seq.slice(0).some((name) => ~name.indexOf('preview')))
})

gulp.task('build:preview', ['build'], () =>
buildPreview(srcDir, destDir, previewSiteSrcDir, previewSiteDestDir, connect.reload)
Expand Down
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,41 @@
"node": ">= 8.0.0"
},
"devDependencies": {
"autoprefixer": "^7.1.6",
"browserify": "^14.5.0",
"autoprefixer": "^9.4.3",
"browserify": "^16.2.3",
"chokidar": "^2.0.1",
"cssnano": "^3.10.0",
"eslint": "^4.11.0",
"eslint-config-standard": "^10.2.1",
"cssnano": "^4.1.8",
"eslint": "^5.11.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"gulp": "^3.9.1",
"gulp-concat": "^2.6.1",
"gulp-connect": "^5.2.0",
"gulp-eslint": "^4.0.0",
"gulp-imagemin": "^4.0.0",
"gulp-postcss": "^7.0.0",
"gulp-stylelint": "^5.0.0",
"gulp-eslint": "^5.0.0",
"gulp-imagemin": "^4.1.0",
"gulp-postcss": "^8.0.0",
"gulp-stylelint": "^8.0.0",
"gulp-uglify": "^3.0.0",
"gulp-vinyl-zip": "^2.1.0",
"handlebars": "^4.0.10",
"highlight.js": "^9.12.0",
"js-yaml": "^3.10.0",
"map-stream": "^0.0.7",
"merge-stream": "^1.0.1",
"postcss-calc": "^6.0.1",
"postcss-custom-properties": "^6.1.0",
"postcss-import": "^11.0.0",
"postcss-url": "^7.1.2",
"postcss-calc": "^7.0.1",
"postcss-custom-properties": "^8.0.9",
"postcss-import": "^12.0.1",
"postcss-url": "^8.0.0",
"prettier-eslint": "^8.2.0",
"require-from-string": "^2.0.1",
"stylelint": "^8.2.0",
"stylelint-config-standard": "^17.0.0",
"typeface-roboto": "^0.0.45",
"typeface-roboto-mono": "^0.0.44",
"stylelint": "^9.9.0",
"stylelint-config-standard": "^18.2.0",
"typeface-roboto": "^0.0.54",
"typeface-roboto-mono": "^0.0.54",
"vinyl-buffer": "^1.0.0",
"vinyl-fs": "^2.4.4"
"vinyl-fs": "^3.0.3"
}
}
14 changes: 14 additions & 0 deletions preview-site-src/ui-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ site:
- &latest_version_abc
url: '#'
version: '1.1'
displayVersion: '1.1'
- url: '#'
version: '1.0'
displayVersion: '1.0'
latestVersion: *latest_version_abc
- &component
name: xyz
Expand All @@ -21,13 +23,17 @@ site:
- &latest_version_xyz
url: /xyz/6.0/index.html
version: '6.0'
displayVersion: '6.0'
- &component_version
url: '#'
version: '5.2'
displayVersion: '5.2'
- url: '#'
version: '5.1'
displayVersion: '5.1'
- url: '#'
version: '5.0'
displayVersion: '5.0'
latestVersion: *latest_version_xyz
- name: 123
title: Project 123
Expand All @@ -36,17 +42,21 @@ site:
- &latest_version_123
url: '#'
version: '2.2'
displayVersion: '2.2'
- url: '#'
version: '2.1'
displayVersion: '2.1'
- url: '#'
version: '2.0'
displayVersion: '2.0'
latestVersion: *latest_version_123
page:
title: Brand’s Hardware & Software Requirements
url: /xyz/5.2/index.html
component: *component
componentVersion: *component_version
version: '5.2'
displayVersion: '5.2'
module: ROOT
home: false
editUrl: http://example.com/project-xyz/blob/master/index.adoc
Expand All @@ -59,12 +69,16 @@ page:
urlType: internal
versions:
- version: '6.0'
displayVersion: '6.0'
url: '#'
- version: '5.2'
displayVersion: '5.2'
url: '#'
- version: '5.1'
displayVersion: '5.1'
url: '#'
- version: '5.0'
displayVersion: '5.0'
missing: true
url: '#'
navigation:
Expand Down
5 changes: 1 addition & 4 deletions src/css/navigation-menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ html.is-clipped--nav {
overflow-y: auto;
display: flex;
flex-direction: column;
}

/* help Chrome calculate the height correctly; must match .navigation value minus height of drawer */
.navigation-menu {
/* help Chrome calculate the height correctly; must match .navigation value minus height of drawer */
height: calc(100vh - var(--navbar-height) - var(--toolbar-height) - var(--drawer-height));
}

Expand Down
6 changes: 3 additions & 3 deletions tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const postcssVar = require('postcss-custom-properties')
const uglify = require('gulp-uglify')
const vfs = require('vinyl-fs')

module.exports = (src, dest) => {
module.exports = (src, dest, preview) => {
const opts = { base: src, cwd: src }
const postcssPlugins = [
postcssImport(),
Expand All @@ -42,10 +42,10 @@ module.exports = (src, dest) => {
},
},
]),
postcssVar(),
postcssVar({ preserve: preview ? 'preserve-computed' : false }),
postcssCalc(),
autoprefixer({ browsers: ['last 2 versions'] }),
cssnano({ preset: 'default' }),
preview ? () => {} : cssnano({ preset: 'default' }),
]

return merge([
Expand Down
Loading

0 comments on commit a2767b5

Please sign in to comment.