-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: samples generation #1122
Conversation
@@ -7,8 +7,8 @@ | |||
"node": ">=10.0.0" | |||
}, | |||
"scripts": { | |||
"start": "node ./web-server/server.js", | |||
"dev": "nodemon ./web-server/server.js --watch ../../../build/cjs" | |||
"start": "SIW_VERSION=6.0.1 node ./web-server/server.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
SIW_VERSION=${SIW_VERSION-6.0.1}
so that it will have a default value but also respect existing environment variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is overwrote by template, and template always load latest version from registry.
@@ -7,8 +7,8 @@ | |||
"node": ">=10.0.0" | |||
}, | |||
"scripts": { | |||
"start": "node ./web-server/server.js", | |||
"dev": "nodemon ./web-server/server.js --watch ../../../build/cjs" | |||
"start": "SIW_VERSION={{ siwVersion }} node ./web-server/server.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above,
SIW_VERSION=${SIW_VERSION-{{ siwVersion }} }
to respect existing env var
I'm not sure about this one. Some of the samples are now partially generated and partially edited in-place. How is a developer to know that package.json should be edited in samples/templates, but server.js should be edited in samples/generated? I think we should have a clear separation of generated code or we will get confused and edit the wrong file. Maybe the debugger problem could be solved with source maps? handlebars-lang/handlebars.js#902 |
cf53d09
to
8e52c19
Compare
samples/gulpfile.js
Outdated
const outDir = `${BUILD_DIR}/` + (subDir ? `${subDir}/` : '') + `${name}`; | ||
|
||
console.log('outDir', outDir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intentional log?
Codecov Report
@@ Coverage Diff @@
## master #1122 +/- ##
=======================================
Coverage 93.51% 93.51%
=======================================
Files 154 154
Lines 4147 4147
Branches 906 906
=======================================
Hits 3878 3878
Misses 253 253
Partials 16 16 Continue to review full report at Codecov.
|
OKTA-474183 <<<Jenkins Check-In of Tested SHA: 631473d for [email protected]>>> Artifact: okta-auth-js Files changed count: 99 PR Link: "#1122"
Only perform overwrite with templates for express-embedded related samples, so engineers can develop directly from the samples folder.