-
Notifications
You must be signed in to change notification settings - Fork 282
feat: NPM registry package for garden
#5087
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
Changes from 1 commit
ef90b92
dc3ba15
1a5267e
87999b0
edce41d
d70e5b2
a038ed0
b6a2196
e111e12
2e899ba
c53806a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
The `garden` CLI requires a `static` dir to be in proximate location to its run path. It also requires some Node options set for performance reasons. We can do both of these within the `garden` CLI shell script. By hiding these options behind an environment flag, the Pkg `garden` we currently vend is unaffected.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,24 @@ | ||
#!/usr/bin/env node | ||
const path = require('path'); | ||
|
||
process.env.NODE_OPTIONS = "max-old-space-size=4096 max-semi-space-size=64"; | ||
process.env.STATIC_DIR = path.join(__dirname, '..', 'static'); | ||
|
||
const fs = require('fs'); | ||
const exec = require('child_process').exec; | ||
|
||
const gitDir = path.join(process.env.STATIC_DIR, '.git'); | ||
|
||
if (!fs.existsSync(gitDir)) { | ||
exec(`git init ${process.env.STATIC_DIR}`, (error, stdout, stderr) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @stefreak, where would you move this call? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should finalize and merge #5120 before merging this, so we don't have to call it at all. |
||
if (error) { | ||
console.error(`Error: ${error.message}`); | ||
} | ||
if (stderr) { | ||
console.error(`Stderr: ${stderr}`); | ||
} | ||
}); | ||
} | ||
|
||
if (process.env.GARDEN_ENABLE_PROFILING === "1" || process.env.GARDEN_ENABLE_PROFILING === "true") { | ||
// Patch require to profile module loading | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"arrowParens": "always", | ||
"printWidth": 120, | ||
"quoteProps": "consistent", | ||
"semi": false, | ||
"trailingComma": "es5", | ||
"tabWidth": 2 | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"arrowParens": "always", | ||
"printWidth": 120, | ||
"quoteProps": "consistent", | ||
"semi": false, | ||
"trailingComma": "es5", | ||
"tabWidth": 2 | ||
} |
Uh oh!
There was an error while loading. Please reload this page.