Skip to content

Commit

Permalink
add sprite closing to main.go
Browse files Browse the repository at this point in the history
  • Loading branch information
drewwells committed Jan 2, 2016
1 parent 45239a5 commit b1c447d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.go
Expand Up @@ -157,7 +157,7 @@ func (b *Build) build(path string) error {
}

if !isImportable(path) {
return errors.New("file is does not end in .sass or .scss")
return errors.New("file does not end in .sass or .scss")
}

out, bdir, err := b.bArgs.getOut(path)
Expand Down
3 changes: 2 additions & 1 deletion handlers/handlers.go
Expand Up @@ -78,6 +78,7 @@ func ImageHeight(mainctx context.Context, usv libsass.SassValue) (*libsass.SassV
glob string
name string
)

comp, err := libsass.CompFromCtx(mainctx)
if err != nil {
return nil, err
Expand Down Expand Up @@ -116,7 +117,7 @@ func ImageHeight(mainctx context.Context, usv libsass.SassValue) (*libsass.SassV
return nil, errors.New("inline payload not available")
}

if glob == "" {
if len(glob) == 0 {
exst := images.Get(name)
if exst != nil {
imgs = exst
Expand Down
2 changes: 1 addition & 1 deletion payload/payload.go
Expand Up @@ -35,5 +35,5 @@ func Sprite(ctx context.Context) Payloader {
}

func Image(ctx context.Context) Payloader {
return ctx.Value(spriteKey).(Payloader)
return ctx.Value(imageKey).(Payloader)
}
4 changes: 2 additions & 2 deletions scripts/swift.sh
Expand Up @@ -4,6 +4,6 @@ export rmnpath=$RMN_BASE_PATH
export guipath=$rmnpath/www/gui

FILES=$(find $rmnpath/www/gui/sass -name "[^_]*\.scss")
echo wt compile --gen $guipath/build/im --font $guipath/font-face -b $guipath/build/css --images-dir $guipath/im/sass $guipath/sass
echo wt compile -p $guipath/sass --gen $guipath/build/im --font $guipath/font-face -b $guipath/build/css --images-dir $guipath/im/sass $guipath/sass

time wt compile --gen $guipath/build/im --font $guipath/font-face -b $guipath/build/css --images-dir $guipath/im/sass $guipath/sass
time wt compile -p $guipath/sass --gen $guipath/build/im --font $guipath/font-face -b $guipath/build/css --images-dir $guipath/im/sass $guipath/sass
2 changes: 1 addition & 1 deletion wt/main.go
Expand Up @@ -417,7 +417,7 @@ func run(paths []string, pMap *wt.SafePartialMap, gba *wt.BuildArgs) {
// }
// }
sprites := payload.Sprite(gba.Payload)
sprites.ForEach(func(_ string, sprite *spritewell.Sprite) {
sprites.ForEach(func(k string, sprite *spritewell.Sprite) {
img.Add(1)
err := sprite.Wait()
img.Done()
Expand Down

0 comments on commit b1c447d

Please sign in to comment.