Last active
August 29, 2015 14:13
-
-
Save 59naga/b24c0afc2a3e6e8cca94 to your computer and use it in GitHub Desktop.
HTML界隈の高級言語を使ってみる ref: http://qiita.com/59naga/items/90f254eefecc81702937
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone https://github.com/59naga/cjsbl.git | |
$ cd cjsbl/1.first | |
$ npm start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./ | |
.coffee | |
index.coffee | |
.jade | |
index.jade | |
.styl | |
index.styl | |
public_html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./ | |
public_html | |
index.js | |
index.html | |
index.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm start | |
$ open public_html/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public_html= 'public_html' | |
gulp= require 'gulp' | |
gulp.task 'default',['coffee-script','jade','stylus'] | |
gulp.task 'coffee-script',-> | |
coffee= require 'gulp-coffee' | |
gulp.src ".coffee/index.coffee" | |
.pipe coffee() | |
.pipe gulp.dest public_html | |
gulp.task 'jade',-> | |
jade= require 'gulp-jade' | |
gulp.src ".jade/**/*.jade" | |
.pipe jade() | |
.pipe gulp.dest public_html | |
gulp.task 'stylus',-> | |
stylus= require 'gulp-stylus' | |
gulp.src ".styl/index.styl" | |
.pipe stylus() | |
.pipe gulp.dest public_html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"coffee-script": "^1.8.0", | |
"gulp": "^3.8.10", | |
"gulp-coffee": "^2.2.0", | |
"gulp-jade": "^0.10.0", | |
"gulp-stylus": "^1.3.6" | |
}, | |
"scripts": { | |
"start": "npm install && gulp" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulp.task 'watch',-> | |
watch= require 'gulp-watch' | |
watch ".coffee/**/*.coffee",-> | |
gulp.start 'coffee-script' | |
watch ".jade/**/*.jade",-> | |
gulp.start 'jade' | |
watch ".styl/**/*.styl",-> | |
gulp.start 'stylus' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulp.task 'livereload',-> | |
livereload= require 'gulp-connect' | |
livereload.server | |
livereload: true | |
root: public_html | |
watch= require 'gulp-watch' | |
gulp.src "#{public_html}/**" | |
.pipe watch "#{public_html}/**" | |
.pipe livereload.reload() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment