Skip to content

Commit

Permalink
in support of Node 10 + Chef
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Foley committed Jun 11, 2018
1 parent c15dfaa commit 60d164a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ CODE_GET=cat $(CODE_FILE)


.PHONY: \
install \
init clean build lock edit \
server server-debug server-production \
test test-debug \
Expand All @@ -52,6 +53,12 @@ CODE_GET=cat $(CODE_FILE)

# Build steps

# https://github.com/npm/npm/issues/3497
# npm postinstall "npm WARN cannot run in wd"
# because sudo
install:
@npm install --unsafe-perm

init:
@mkdir -p build

Expand Down Expand Up @@ -230,6 +237,9 @@ gh-pages: init

@rm -rf build/gh-pages

view-gh-pages:
@open http://cantremember.github.io/node-sleepbot-cgi/


# `npm run <TARGET>`

Expand Down
11 changes: 10 additions & 1 deletion bin/app.mjs
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/usr/bin/env node
/*
#!/usr/bin/env node -r esm
https://stackoverflow.com/questions/4303128/how-to-use-multiple-arguments-for-awk-with-a-shebang-i-e
"... everything after the path of the shebang gets parsed to the program as one argument."
so that's a problem ... we can't self pre-load ESModules
better alternatives going forward
`make server`
`/bin/bash -c 'make server 2>&1 >> stdio.log'`
*/
/* istanbul ignore file */
/* eslint-disable no-console */

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
"readmeFilename": "README.md",
"scripts": {
"build": "make build",
"quality": "make quality",
"doc": "make doc",
"gh-pages": "make gh-pages",
"postinstall": "make post-install",
"quality": "make quality",
"start": "make server",
"test": "make test"
},
"engines": {
Expand Down

0 comments on commit 60d164a

Please sign in to comment.