Skip to content

Commit

Permalink
Removing levels of indirection
Browse files Browse the repository at this point in the history
* Removed bower. It's deprecated and its use is discouraged
* Emptied out most of the Gulpfile into script/build
* Had to copy-paste some scss mixins from the deprecated dependendcies
* Probably need to revisit the application.scss to make it less brittle
  • Loading branch information
scottmuc committed May 24, 2020
1 parent 3edf407 commit 041b5b3
Show file tree
Hide file tree
Showing 9 changed files with 100 additions and 188 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ node_js:
install:
- npm install --silent
script:
- npm test
- npm build
notifications:
email: false
deploy:
Expand Down
33 changes: 1 addition & 32 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -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: {
Expand All @@ -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']);
}
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions bower.json

This file was deleted.

144 changes: 12 additions & 132 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading

0 comments on commit 041b5b3

Please sign in to comment.