Sublime Forum

Different Build systems, based on the file location

#1

Hi.

I am trying to create a project file, which takes care of different build systems, based on file types and location.

But the case is, that both my client and server is coded in coffee script, so “select”: “source.coffee” isn’t sufficient, so I was wondering

if it is possible to make something like this:

{
	"name": "coffee-client",
	"cmd": "${project_path}/scripts/build.sh", "client"],
	"working_dir": "${project_path}/scripts",
	"shell": true,
	"selector": "${project_path}/client/scripts/(soruce.coffee|source.js)"
},
{
	"name": "coffee-server",
	"cmd": "${project_path}/scripts/build.sh", "server"],
	"working_dir": "${project_path}/scripts",
	"shell": true,
	"selector": "${project_path}/server/src/(soruce.coffee)"
}

Great editor though, keep up the good work.

// Happy developer/user.

0 Likes

#2

Anyone?

0 Likes

#3

No it’s not possible.

You can create 2 different project and specify which Build System you want:
http://www.sublimetext.com/docs/2/projects.html

I don’t think it’s possible to do what you want with a custom Build target (http://docs.sublimetext.info/en/latest/reference/build_systems.html).

However, it look possible to do you own plugin that change the current Build system based on the path before running the build command.

0 Likes

#4

Thanks will try that, and report back the result.

0 Likes