예제 #1
0
파일: compiler.go 프로젝트: devick/flynn
func main() {
	m := matrix.New(&matrix.Config{
		Paths: []*matrix.AssetRoot{
			{
				GitRepo:   "git://github.com/jvatic/marbles-js.git",
				GitBranch: "master",
				GitRef:    "50fe2ed6d530d9b695b98a775dcc28ec7c9478bc",
				Path:      "src",
			},
			{
				Path: "./src",
			},
			{
				Path: "./vendor",
			},
		},
		Outputs: []string{
			"normalize.css",
			"font-awesome.scss",
			"application.css",
			"application.js",
			"react.js",
			"*.png",
			"*.gif",
			"*.eot",
			"*.svg",
			"*.ttf",
			"*.woff",
		},
		OutputDir:      "./build",
		AssetURLPrefix: "/assets/",
	})
	if err := m.Build(); err != nil {
		log.Fatal(err)
	}
	m.RemoveOldAssets()
}
예제 #2
0
func main() {
	installerSrcDir := os.Getenv("INSTALLER_SRC_DIR")
	if installerSrcDir == "" {
		installerSrcDir = "./lib/installer"
	}
	m := matrix.New(&matrix.Config{
		Paths: []*matrix.AssetRoot{
			{
				GitRepo:   "git://github.com/jvatic/marbles-js.git",
				GitBranch: "master",
				GitRef:    "0a32d09dc73f87482fb12ce963c9385fabb0d036",
				Path:      "src",
			},
			{
				GitRepo:   "git://github.com/flynn/flynn-dashboard-web-icons.git",
				GitBranch: "master",
				GitRef:    "6633cfd02eb893407c3689da81314813f0fc489a",
				Path:      "assets",
			},
			{
				Path: filepath.Join(installerSrcDir, "images"),
			},
			{
				Path: "./lib/javascripts",
			},
			{
				Path: "./lib/stylesheets",
			},
			{
				Path: "./lib/images",
			},
			{
				Path: "./vendor/javascripts",
			},
			{
				Path: "./vendor/stylesheets",
			},
			{
				Path: "./vendor/fonts",
			},
		},
		Outputs: []string{
			"dashboard.js",
			"dashboard-*.js",
			"dashboard.scss",
			"ansiparse.js",
			"moment.js",
			"es6promise.js",
			"react.js",
			"react.dev.js",
			"*.png",
			"*.eot",
			"*.svg",
			"*.ttf",
			"*.woff",
		},
		OutputDir:      "./build/assets",
		AssetURLPrefix: "/assets/",
	})
	if err := m.Build(); err != nil {
		log.Fatal(err)
	}
	if err := compileTemplate(m.Manifest); err != nil {
		log.Fatal(err)
	}
	m.RemoveOldAssets()
}
예제 #3
0
파일: compiler.go 프로젝트: rikur/flynn
func main() {
	installerSrcDir := os.Getenv("INSTALLER_SRC_DIR")
	if installerSrcDir == "" {
		installerSrcDir = "./lib/installer"
	}
	m := matrix.New(&matrix.Config{
		Paths: []*matrix.AssetRoot{
			{
				GitRepo:   "git://github.com/jvatic/marbles-js.git",
				GitBranch: "master",
				GitRef:    "4d9bf1b2519ac87df630e8f5f3bcf4db52b4a477",
				Path:      "src",
			},
			{
				GitRepo:   "git://github.com/flynn/flynn-dashboard-web-icons.git",
				GitBranch: "master",
				GitRef:    "4d190ece9dd31a3a662cf2dc9534151d7675a338",
				Path:      "assets",
			},
			{
				Path: filepath.Join(installerSrcDir, "images"),
			},
			{
				Path: "./lib/javascripts",
			},
			{
				Path: "./lib/stylesheets",
			},
			{
				Path: "./lib/images",
			},
			{
				Path: "./vendor/javascripts",
			},
			{
				Path: "./vendor/stylesheets",
			},
			{
				Path: "./vendor/fonts",
			},
		},
		Outputs: []string{
			"dashboard.js",
			"dashboard-*.js",
			"dashboard.scss",
			"ansiparse.js",
			"moment.js",
			"es6promise.js",
			"react.js",
			"react.dev.js",
			"*.png",
			"*.eot",
			"*.svg",
			"*.ttf",
			"*.woff",
		},
		OutputDir:      "./build/assets",
		AssetURLPrefix: "/assets/",
	})
	if err := m.Build(); err != nil {
		log.Fatal(err)
	}
	if err := compileTemplate(m.Manifest); err != nil {
		log.Fatal(err)
	}
	m.RemoveOldAssets()
}