This file contains hidden or 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
| page = (require 'webpage').create() | |
| url = '#' | |
| page.open "http://localhost:3000/", -> | |
| page.evaluate (url) -> | |
| $.ajax url: url, success: (str) -> window.ajaxResult = str | |
| , url | |
| timer = -> | |
| result = page.evaluate -> window.ajaxResult | |
| unless result |
This file contains hidden or 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
| Modernizr = require 'browsernizr' # npm経由 | |
| $ = require 'jquery' # bower経由 | |
| require './yourscript' # サイト用のスクリプト | |
| # ここに書き足してもOK | |
| console.log 'This page is ' + $('H1').text() |
This file contains hidden or 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 = require 'gulp' | |
| less = require 'gulp-less' | |
| cssimport = require 'gulp-cssimport' | |
| autoprefixer = require 'gulp-autoprefixer' | |
| concat = require 'gulp-concat' | |
| minifyCss = require 'gulp-minify-css' | |
| streamqueue = require 'streamqueue' | |
| gulp.task 'css', -> | |
| streamqueue objectMode: true, |
This file contains hidden or 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
| { | |
| <略> | |
| "devDependencies": { | |
| "coffee-script": "*", | |
| } | |
| } |
This file contains hidden or 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
| { | |
| "browserify": { | |
| "transform": [ | |
| "coffeeify", | |
| "browserify-shim" | |
| ] | |
| }, | |
| "browser": { | |
| "jquery": "./bower_components/jquery/dist/jquery.js", | |
| "angular": "./bower_components/angular/angular.js", |
This file contains hidden or 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
| require 'angular' | |
| require 'angular-sanitize' | |
| angular.module 'app', ['ngSanitize'] | |
| .directive 'marked', require './marked' |
This file contains hidden or 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
| .controller 'SampleController', ($scope, $http) -> | |
| $scope.data = [] | |
| $http | |
| method: 'post' | |
| url: 'https://api.parse.com/1/functions/sample_function' | |
| headers: | |
| 'X-Parse-Application-Id': APP_ID | |
| 'X-Parse-REST-API-Key': API_KEY | |
| 'Content-Type': 'application/json' | |
| data: {} |
This file contains hidden or 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
| var gulp = require("gulp"); | |
| gulp.task('watch', function(){ | |
| gulp.watch('coffee/*.coffee', ['coffee']); | |
| }); |
This file contains hidden or 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
| var gulp = require('gulp'); | |
| var browserify = require('browserify'); | |
| var source = require('vinyl-source-stream'); |
This file contains hidden or 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 install |