diff --git a/.travis.yml b/.travis.yml index d80f635c..0237ae5c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ node_js: install: - npm install --silent script: - - npm test + - npm build notifications: email: false deploy: diff --git a/Gruntfile.js b/Gruntfile.js index 481e2833..e02aa919 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,37 +1,7 @@ module.exports = function(grunt) { require('load-grunt-tasks')(grunt); - const sass = require('node-sass'); grunt.initConfig({ - jshint: { - dist: { - files: { - src: [ 'server.js', 'cluster.js', 'routes/**/*.js', 'data/**/*.js', 'data/**/*.json' ] - } - } - }, - - bower: { - install: { - options: { - copy: false - } - } - }, - - sass: { - dist: { - options: { - implementation: sass, - outputStyle: 'compressed', - includePaths: [ 'bower_components' ] - }, - files: { - 'public/stylesheets/application.css' : 'public/stylesheets/application.scss' - } - } - }, - express: { dev: { options: { @@ -55,8 +25,7 @@ module.exports = function(grunt) { } }); - grunt.registerTask('build', [ 'jshint', 'bower:install', 'sass:dist' ]); - grunt.registerTask('dev', [ 'build', 'express:dev', 'watch' ]); + grunt.registerTask('dev', [ 'express:dev', 'watch' ]); grunt.registerTask('default', ['dev']); } diff --git a/README.md b/README.md index 197386fa..3858c186 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,9 @@ Refer to [CONTRIBUTING.md][contributing_url] * Have a working `docker` setup and this repository clone * `docker run --rm -it -v $PWD:/workspace -p 3000:3000 -w /workspace node:12 bash` -* Running `npm i`, `npm test`, and then `npm start` +* Running `npm build` and then `npm start` * Look at the results in your browser: `open http://"$(docker-machine ip)":3000` -[build_issue]: https://travis-ci.org/github/devopsbookmarks/devopsbookmarks.com/builds/690566413 - ## Maintenance This project has been alive and keeping for a while now (first commit in 2014), but it has gone diff --git a/bower.json b/bower.json deleted file mode 100644 index cb33a28b..00000000 --- a/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name" : "devops", - "version" : "0.0.1", - "dependencies" : { - "bourbon" : "3.1.8", - "normalize-scss" : "2.1.2" - } -} diff --git a/package-lock.json b/package-lock.json index 38dae1ad..fa496142 100644 --- a/package-lock.json +++ b/package-lock.json @@ -281,23 +281,10 @@ "safe-json-parse": "~1.0.1" } }, - "bower": { - "version": "1.8.8", - "resolved": "https://registry.npmjs.org/bower/-/bower-1.8.8.tgz", - "integrity": "sha512-1SrJnXnkP9soITHptSO+ahx3QKp3cVzn8poI6ujqc5SeOkg5iqM1pK9H+DSc2OQ8SnO0jC/NG4Ur/UIwy7574A==" - }, - "bower-json": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/bower-json/-/bower-json-0.8.4.tgz", - "integrity": "sha512-mMKghvq9ivbuzSsY5nrOLnDtZIJMUCpysqbGaGW3mj88JAcuSi8ZAzIt34vNZjohy0aR9VXLwgPTZGnBX2Vpjg==", - "requires": { - "deep-extend": "^0.5.1", - "ends-with": "^0.2.0", - "ext-list": "^2.0.0", - "graceful-fs": "^4.1.3", - "intersect": "^1.0.1", - "sort-keys-length": "^1.0.0" - } + "bourbon": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/bourbon/-/bourbon-7.0.0.tgz", + "integrity": "sha512-49kyBY+4gwnEvnez8H0TzFjfNZpUVdCmmS873S9nQ6YUuh2+qesbOh8lA+9gAuWlqtYlF+/3Etxm/13RhceOrg==" }, "brace-expansion": { "version": "1.1.11", @@ -728,11 +715,6 @@ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, - "deep-extend": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", - "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==" - }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", @@ -847,11 +829,6 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" }, - "ends-with": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ends-with/-/ends-with-0.2.0.tgz", - "integrity": "sha1-L52pjVelDP2kVxzkM5AAUA9Oa4o=" - }, "entities": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", @@ -1414,14 +1391,6 @@ } } }, - "ext-list": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", - "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", - "requires": { - "mime-db": "^1.28.0" - } - }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -1633,15 +1602,6 @@ "map-cache": "^0.2.2" } }, - "fs-extra": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", - "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0" - } - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -1826,42 +1786,6 @@ } } }, - "grunt-bower-task": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/grunt-bower-task/-/grunt-bower-task-0.5.0.tgz", - "integrity": "sha1-w8Fpg/q/GOQS4m390hFNtGUXRYQ=", - "requires": { - "async": "^2.3.0", - "bower": "^1.7.9", - "bower-json": "^0.8.1", - "colors": "^1.1.2", - "fs-extra": "^2.1.2", - "lodash": "~0.10.0", - "rimraf": "^2.6.1" - }, - "dependencies": { - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "requires": { - "lodash": "^4.17.14" - }, - "dependencies": { - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" - } - } - }, - "lodash": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-0.10.0.tgz", - "integrity": "sha1-UlS7wsRsgn9TWifWMf1PK/83TOc=" - } - } - }, "grunt-cli": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.3.2.tgz", @@ -1885,16 +1809,6 @@ } } }, - "grunt-contrib-jshint": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-2.1.0.tgz", - "integrity": "sha512-65S2/C/6RfjY/umTxfwXXn+wVvaYmykHkHSsW6Q6rhkbv3oudTEgqnFFZvWzWCoHUb+3GMZLbP3oSrNyvshmIQ==", - "requires": { - "chalk": "^2.4.2", - "hooker": "^0.2.3", - "jshint": "~2.10.2" - } - }, "grunt-contrib-watch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-1.1.0.tgz", @@ -1960,11 +1874,6 @@ "which": "~1.3.0" } }, - "grunt-sass": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/grunt-sass/-/grunt-sass-3.1.0.tgz", - "integrity": "sha512-90s27H7FoCDcA8C8+R0GwC+ntYD3lG6S/jqcavWm3bn9RiJTmSfOvfbFa1PXx4NbBWuiGQMLfQTj/JvvqT5w6A==" - }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -2116,11 +2025,6 @@ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=" }, - "intersect": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/intersect/-/intersect-1.0.1.tgz", - "integrity": "sha1-MyZQ4QhU2MCsWMGSvcJ6i/fnoww=" - }, "is-absolute": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", @@ -2242,11 +2146,6 @@ } } }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" - }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -2326,9 +2225,9 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "jshint": { - "version": "2.10.3", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.10.3.tgz", - "integrity": "sha512-d8AoXcNNYzmm7cdmulQ3dQApbrPYArtVBO6n4xOICe4QsXGNHCAKDcFORzqP52LhK61KX0VhY39yYzCsNq+bxQ==", + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.11.1.tgz", + "integrity": "sha512-WXWePB8ssAH3DlD05IoqolsY6arhbll/1+i2JkRPpihQAuiNaR/gSt8VKIcxpV5m6XChP0hCwESQUqpuQMA8Tg==", "requires": { "cli": "~1.0.0", "console-browserify": "1.1.x", @@ -2355,14 +2254,6 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -2805,6 +2696,11 @@ "validate-npm-package-license": "^3.0.1" } }, + "normalize-scss": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/normalize-scss/-/normalize-scss-7.0.1.tgz", + "integrity": "sha512-qj16bWnYs+9/ac29IgGjySg4R5qQTp1lXfm7ApFOZNVBYFY8RZ3f8+XQNDDLHeDtI3Ba7Jj4+LuPgz9v/fne2A==" + }, "npmlog": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", @@ -3471,22 +3367,6 @@ } } }, - "sort-keys": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", - "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", - "requires": { - "is-plain-obj": "^1.0.0" - } - }, - "sort-keys-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", - "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", - "requires": { - "sort-keys": "^1.0.0" - } - }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", diff --git a/package.json b/package.json index 8bea4980..fa14ca17 100644 --- a/package.json +++ b/package.json @@ -4,28 +4,28 @@ "private": true, "scripts": { "start": "node server.js", - "test": "grunt build", - "heroku-postbuild": "grunt build" + "build": "script/build", + "heroku-postbuild": "script/build" }, "engines": { "node": "12.x" }, "dependencies": { + "bourbon": "latest", "compression": "^1.6.0", "connect-redirecthost": "^2.0.0", "ejs": "^2.3.4", "errorhandler": "^1.4.2", "express": "^4.13.3", "grunt": "latest", - "grunt-bower-task": "latest", "grunt-cli": "latest", - "grunt-contrib-jshint": "latest", "grunt-contrib-watch": "latest", "grunt-express-server": "latest", - "grunt-sass": "latest", + "jshint": "latest", "load-grunt-tasks": "latest", "morgan": "^1.6.1", "node-sass": "latest", + "normalize-scss": "latest", "static-asset": "^0.6.0", "underscore": "^1.8.3", "walk": "^2.3.9" diff --git a/public/stylesheets/_deprecated_bourbon.scss b/public/stylesheets/_deprecated_bourbon.scss new file mode 100644 index 00000000..a4695436 --- /dev/null +++ b/public/stylesheets/_deprecated_bourbon.scss @@ -0,0 +1,49 @@ +/* all of this was taken from _columns.scss in an older version + of bourbon that was a bower dependency */ +@mixin columns($arg: auto) { +// || + @include prefixer(columns, $arg, webkit moz spec); +} + +@mixin column-count($int: auto) { +// auto || integer + @include prefixer(column-count, $int, webkit moz spec); +} + +@mixin column-gap($length: normal) { +// normal || length + @include prefixer(column-gap, $length, webkit moz spec); +} + +@mixin column-fill($arg: auto) { +// auto || length + @include prefixer(columns-fill, $arg, webkit moz spec); +} + +@mixin column-rule($arg) { +// || || + @include prefixer(column-rule, $arg, webkit moz spec); +} + +@mixin column-rule-color($color) { + @include prefixer(column-rule-color, $color, webkit moz spec); +} + +@mixin column-rule-style($style: none) { +// none | hidden | dashed | dotted | double | groove | inset | inset | outset | ridge | solid + @include prefixer(column-rule-style, $style, webkit moz spec); +} + +@mixin column-rule-width ($width: none) { + @include prefixer(column-rule-width, $width, webkit moz spec); +} + +@mixin column-span($arg: none) { +// none || all + @include prefixer(column-span, $arg, webkit moz spec); +} + +@mixin column-width($length: auto) { +// auto || length + @include prefixer(column-width, $length, webkit moz spec); +} diff --git a/public/stylesheets/application.scss b/public/stylesheets/application.scss index e48c59d0..b41415f6 100644 --- a/public/stylesheets/application.scss +++ b/public/stylesheets/application.scss @@ -11,12 +11,15 @@ $sidebar-width: 300px; $header-height: 56px; $font-weight: 300; -@import "normalize-scss/_normalize.scss"; -@import "bourbon/app/assets/stylesheets/bourbon"; +@import "normalize-scss/sass/normalize"; +@import "bourbon/core/bourbon"; @import "responsive"; +@import "deprecated_bourbon"; *, *:before, *:after { - @include box-sizing(border-box); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } html { @@ -84,7 +87,7 @@ a, a:link, a:visited, a:active { padding: 0 10px; position: relative; color: $light1; - @include transition(background .2s); +/* @include transition(background .2s); */ &.toggle { float: right; @@ -130,7 +133,7 @@ a, a:link, a:visited, a:active { text-decoration: none; line-height: $header-height; text-align: center; - @include transition(color .2s, background .2s); + /* @include transition(color .2s, background .2s); */ &:hover { color: $light1; } @@ -193,7 +196,7 @@ a, a:link, a:visited, a:active { border-radius: 3px; background: $light1; color: $dark1; - @include transition(background .2s, color .2s); + /* @include transition(background .2s, color .2s); */ &>* { padding: 10px; @@ -208,7 +211,7 @@ a, a:link, a:visited, a:active { a { text-decoration: none; color: darken($dark2, 10%); - @include transition(color .2s); + /* @include transition(color .2s); */ &:hover { color: $dark3; } diff --git a/script/build b/script/build new file mode 100755 index 00000000..72d5eed4 --- /dev/null +++ b/script/build @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -e + +npm install + +node_modules/.bin/jshint \ + --filename server.js \ + --filename cluster.js \ + --filename routes/**/*.js \ + --filename data/**/*.js \ + --filename data/**/*.json + +# including all of node_modules might result in issues +# it's only included for bourbon, and normalize-scss +node_modules/.bin/node-sass \ + --output-style compressed \ + --include-path node_modules \ + public/stylesheets/application.scss \ + > public/stylesheets/application.css +