As well as Adding in Composer, it would be handy of other build tools were available after provisioning as well, like npm and Yarn, as well as Git. Here’s what I have to run so far:
@GaryJ Have you or have you considered creating and open-sourcing add-ons for Local which create UI toggles for installing/enabling & disabling the above-listed packages? Pretty sure this is still relevant and would help to accomplish your request:
const Component = context.React.Component
const React = context.React
const $ = context.jQuery
return class ManagePackages extends Component {
constructor( props ) {
super( props )
// init class vars
}
componentDidMount() {
// set up
}
componentWillUnmount() {
// tear down
}
render() {
return (
<div style={{ display: 'flex', flexDirection: 'column', flex: 1, padding: '0 5%' }}>
<h3>Title</h3>
</div>
);
}
}
}
getActivePackages() {
this.setState( { content: <p>loading...</p> } )
// get site object using siteID
let site = this.props.sites[ this.props.params.siteID ]
// construct command using bundled docker binary to execute 'mycommand' inside container
let command = `${context.environment.dockerPath} exec ${site.container} mycommand`
// execute command in docker env and run callback when it returns
childProcess.exec( command, { env: context.environment.dockerEnv }, (error, stdout, stderr) => {
// Display error message if there's an issue
if (error) {
this.setState( { content: <p>Error retrieving active package list: <pre>{stderr}</pre></p> } )
} else {
// split list into array
let packages = stdout.trim().split( "\n" )
// Only create unordered list if there are packages to list
if ( packages.length && packages[0].length > 1 ) {
this.setState( { content: <ul>{ packages.map( (item) => <li key={ packages.indexOf(item) }>{ item }</li> ) }</ul> } )
} else {
this.setState( { content: <p>No active packages.</p> } )
}
}
} );
}```
I’m going through and cleaning up and clarifying old feature requests.
Since this topic was created when Local Classic was being used, some of the replies that “solve” this don’t make sense under the latest version of Local. This is because the site that is created isn’t running within a Linux Virtual Machine.
Since opening a site shell under the latest version of Local is just like opening the shell regularly, do you all still want these tools bundled with Local?
I ask because my personal preference is to not have a tool try and do everything for me. I’d much rather customize my shell environment to my liking, including the versions of npm, yarn and git.
That being said – I don’t want my personal preferences to close a topic that’s important to the community!