Skip to content

Commit c21bcb9

Browse files
committed
Prebuild
1 parent 7e8fa8c commit c21bcb9

12 files changed

+22
-15
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
node_modules
2-
*.css
32
.env
3+
build

Makefile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
STYLUS = ./node_modules/.bin/stylus
2+
COFFEE = ./node_modules/.bin/coffee
3+
4+
all: css script
5+
6+
before:
7+
@mkdir -p build
8+
9+
css: before
10+
@$(STYLUS) -o build -c src/*.styl
11+
12+
script: before
13+
@$(COFFEE) -co build/ src/*.coffee

index.coffee

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
express = require 'express'
22
bodyParser = require 'body-parser'
3-
stylus = require('stylus').middleware
4-
coffee = require 'coffee-middleware'
53
app = express()
64

75
http = require('http').Server app
@@ -25,11 +23,7 @@ process.globals.io = io
2523
app.set 'views', "#{__dirname}/views"
2624
app.set 'view engine', 'jade'
2725
app.use bodyParser.urlencoded({extended: true})
28-
app.use coffee
29-
src: "#{__dirname}/public"
30-
app.use stylus
31-
src: "#{__dirname}/public"
32-
app.use express.static("#{__dirname}/public")
26+
app.use express.static("#{__dirname}/build")
3327

3428
app.get '/', (req, res)-> res.render 'index'
3529
app.get '/gifs', require('./lib/gif').index

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"description": "gif jockey GJ!!!!",
55
"main": "index.coffee",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"postinstall": "make all"
89
},
910
"author": "jigsaw (http://jgs.me)",
1011
"license": "MIT",
1112
"dependencies": {
1213
"body-parser": "^1.13.1",
13-
"coffee-middleware": "^0.2.1",
1414
"coffee-script": "^1.9.3",
1515
"express": "^4.12.4",
1616
"jade": "^1.11.0",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

views/index.jade

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ extends layout
22

33
block links
44
link(href='http://fonts.googleapis.com/css?family=Syncopate:700', rel='stylesheet', type='text/css')
5-
link(href='/css/index.css', rel='stylesheet', type='text/css')
5+
link(href='/index.css', rel='stylesheet', type='text/css')
66

77
block scripts
88
script(src='//cdnjs.cloudflare.com/ajax/libs/vue/0.10.5/vue.min.js', type='text/javascript')
@@ -56,4 +56,4 @@ block body
5656
.send.button(v-on='click: send(this)')
5757
p {{status}}
5858

59-
script(src='/js/index.js', type='text/javascript')
59+
script(src='/index.js', type='text/javascript')

views/screen.jade

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ extends layout
22

33
block links
44
link(href='//rawgit.com/e-jigsaw/x-gif/size-max/dist/x-gif.html', rel='import')
5-
link(href='/css/screen.css', rel='stylesheet', type='text/css')
5+
link(href='/screen.css', rel='stylesheet', type='text/css')
66

77
block scripts
88
script(src='//cdnjs.cloudflare.com/ajax/libs/vue/0.10.5/vue.min.js', type='text/javascript')
@@ -19,4 +19,4 @@ block body
1919
x-gif(src='{{$value}}', bpm='{{bpm}}')
2020
.name
2121
p {{name}}
22-
script(src='/js/screen.js', type='text/javascript')
22+
script(src='/screen.js', type='text/javascript')

views/usage.jade

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
extends layout
22

33
block links
4-
link(href='/css/usage.css', rel='stylesheet', type='text/css')
4+
link(href='/usage.css', rel='stylesheet', type='text/css')
55

66
block body
77
header 使い方

0 commit comments

Comments
 (0)