Permalink
Browse files

Make the debug target an (optional) argument, so you can do

`make studio TARGET=~/Downloads/project-to-test.framer`
  • Loading branch information...
eelco committed Sep 2, 2016
1 parent d5c63b3 commit 0d422ffa8b22da160500a47b0ea7bd9033dbe3d0
Showing with 10 additions and 3 deletions.
  1. +7 −2 Makefile
  2. +3 −1 gulpfile.coffee
View
@@ -2,6 +2,10 @@
BIN = $(CURDIR)/node_modules/.bin
DEFAULT_TARGET = extras/Studio.framer
TARGET ?= DEFAULT_TARGET
TARGET_EXPANDED = $(shell echo $(TARGET)) # For ~ in paths, gulp needs this
.PHONY: watch test debug release
default: lazy_bootstrap lazy_build test
@@ -26,7 +30,8 @@ clean:
# Building and testing
watch: lazy_bootstrap
$(BIN)/gulp watch
cp $(DEFAULT_TARGET)/index.html $(TARGET)
TARGET='$(strip $(TARGET_EXPANDED))' $(BIN)/gulp watch
build: lazy_bootstrap
$(BIN)/gulp webpack:debug
@@ -43,7 +48,7 @@ release: lazy_bootstrap
# Framer Studio
studio:
open -a "Framer Beta" extras/Studio.framer
open -a "Framer Beta" ${TARGET}
make watch
perf: debug
View
@@ -9,6 +9,8 @@ template = require("gulp-template")
gutil = require("gulp-util")
{exec} = require("child_process")
DEBUG_TARGET = process.env.TARGET ? "extras/Studio.framer"
################################################################################
# Base webpack config
@@ -71,7 +73,7 @@ gulp.task "webpack:debug", ["version"], (callback) ->
sourceMapFilename: "[file].map?hash=[hash]"
webpackDev "webpack:debug", config, ->
command "cp build/framer.debug.* extras/Studio.framer/framer/"
command "cp build/framer.debug.* '#{DEBUG_TARGET}/framer/'"
callback()
gulp.task "webpack:release", ["version"], (callback) ->

0 comments on commit 0d422ff

Please sign in to comment.