This commit is contained in:
@@ -4,7 +4,7 @@ date: 2015-09-07 09:00:00 +09:00
|
||||
redirect_from: "/blog/2015/09/07/alfred-qiita-workflow-in-go"
|
||||
---
|
||||
|
||||

|
||||

|
||||
|
||||
Ruby で書かれている [Alfred Qiita Workflow](https://github.com/uetchy/alfred-qiita-workflow) を[バグ修正](https://github.com/uetchy/alfred-qiita-workflow/issues/3)のついでに Go で書き直した。
|
||||
|
||||
|
@@ -11,7 +11,7 @@ Atom にインストールしているパッケージと[Atom.io](https://atom.i
|
||||
npm 経由でインストールする。
|
||||
|
||||
```bash
|
||||
$ npm install -g atom-package-diff
|
||||
npm install -g atom-package-diff
|
||||
```
|
||||
|
||||
# インストール済みパッケージとスターの diff
|
||||
@@ -19,7 +19,7 @@ $ npm install -g atom-package-diff
|
||||
`apd status`コマンドでインストール済みパッケージとスターしているパッケージの diff を見ることができる。
|
||||
|
||||
```bash
|
||||
$ apd status
|
||||
apd status
|
||||
36 packages installed
|
||||
30 packages starred
|
||||
|
||||
@@ -37,7 +37,7 @@ Sublime-Style-Column-Selection atom-fuzzy-grep douglas language-babel language-i
|
||||
`apd sync --remote`でその逆の処理を行う。つまり、スターされているパッケージを全部インストールし、それ以外をアンインストールする。
|
||||
|
||||
```bash
|
||||
$ apd sync --local
|
||||
apd sync --local
|
||||
Unstaring ... project-manager
|
||||
Unstaring ... react
|
||||
Staring ... Sublime-Style-Column-Selection
|
||||
|
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'gulp + decomposer: Best way to sassy-@import bower components'
|
||||
title: "gulp + decomposer: Best way to sassy-@import bower components"
|
||||
date: 2015-02-26 09:00:00 +09:00
|
||||
redirect_from: "/blog/2015/02/26/gulp-decomposer-bower-import"
|
||||
---
|
||||
@@ -9,13 +9,13 @@ gulp + Browserify(+ debowerify)という構成で Web サイトを作ってい
|
||||
ちなみに、**debowerify** というのは、
|
||||
|
||||
```js
|
||||
var Velocity = require('velocity')
|
||||
var Velocity = require("velocity");
|
||||
```
|
||||
|
||||
という JavaScript を、
|
||||
|
||||
```js
|
||||
var Velocity = require('./../../bower_components/velocity/velocity.js')
|
||||
var Velocity = require("./../../bower_components/velocity/velocity.js");
|
||||
```
|
||||
|
||||
という風に、bower_components 内のパスに解決してくれる Browserify transform だ。
|
||||
@@ -32,17 +32,17 @@ var Velocity = require('./../../bower_components/velocity/velocity.js')
|
||||
**gulpfile.js** はこのように定義しておく。
|
||||
|
||||
```js
|
||||
var gulp = require('gulp')
|
||||
var sass = require('gulp-sass')
|
||||
var decomposer = require('decomposer')
|
||||
var gulp = require("gulp");
|
||||
var sass = require("gulp-sass");
|
||||
var decomposer = require("decomposer");
|
||||
|
||||
gulp.task('styles', function() {
|
||||
gulp.task("styles", function () {
|
||||
gulp
|
||||
.src('src/styles/**/*.sass')
|
||||
.src("src/styles/**/*.sass")
|
||||
.pipe(decomposer())
|
||||
.pipe(sass({ indentedSyntax: true }))
|
||||
.pipe(gulp.dest('dist/css'))
|
||||
})
|
||||
.pipe(gulp.dest("dist/css"));
|
||||
});
|
||||
```
|
||||
|
||||
ポイントは`sass` **よりも前** に`decomposer`を挟むこと。なぜなら、外部から@import した mix-ins や変数は SASS コンパイル時に解決されるからだ。`sass`よりも後に置くと、SASS が@import を解決出来ずにエラーが発生する。
|
||||
@@ -50,7 +50,8 @@ gulp.task('styles', function() {
|
||||
続けて SASS を書こう。
|
||||
|
||||
```scss
|
||||
@import normalize.sass @import styles/font body font-family: $ff-gothic;
|
||||
@import normalize.sass;
|
||||
@import styles/font body font-family: $ff-gothic;
|
||||
```
|
||||
|
||||
> `$ff-gothic`は [uetchy/styles](https://github.com/uetchy/styles) の _font.sass_ で定義されている font-family だ。
|
||||
|
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'Hugo Paper: well-simplified theme for Hugo'
|
||||
title: "Hugo Paper: well-simplified theme for Hugo"
|
||||
date: 2015-07-05 09:00:00 +09:00
|
||||
redirect_from: "/blog/2015/07/05/hugo-paper"
|
||||
---
|
||||
@@ -11,5 +11,5 @@ When I created my blog, there are no well simplified [Hugo](http://gohugo.io) th
|
||||
Just run following oneliner and you will be ready to start using Hugo Paper.
|
||||
|
||||
```bash
|
||||
$ git submodule add https://github.com/uetchy/hugo-paper.git themes/hugo-paper && git submodule update
|
||||
git submodule add https://github.com/uetchy/hugo-paper.git themes/hugo-paper && git submodule update
|
||||
```
|
||||
|
Reference in New Issue
Block a user