Permalink
Browse files

BootstrapのコードをGit Submoduleからbowerに変更して

・Git Submoduleをやめてbowerに変更した
・bowerに変更するにあたってHonokaのコードの位置の変更
・フォルダ位置変更に伴うGruntタスクの変更
  • Loading branch information...
1 parent 2db528e commit f15ef426d35ffa3eff8cbc5adcea70033f3b5ac7 @windyakin windyakin committed Aug 22, 2015
View
@@ -0,0 +1,3 @@
+{
+ "directory": "bower_components"
+}
View
@@ -1,4 +1,9 @@
#=============================================
+# bower
+#=============================================
+bower_components/
+
+#=============================================
# My Original Set
#=============================================
data/
View
@@ -1,3 +0,0 @@
-[submodule "src/bootstrap"]
- path = src/bootstrap
- url = git@github.com:twbs/bootstrap-sass.git
View
@@ -9,8 +9,7 @@ git:
submodules: false
before_install:
-- sed -i 's/git@github.com:/https:\/\/github.com\//' .gitmodules
-- git submodule update --init src/bootstrap
+- bower install
- gem install compass
script:
View
@@ -38,10 +38,14 @@ module.exports = function(grunt) {
},
// compassのコンパイル
compass: {
- dist: {
+ bootstrap: {
options: {
- sassDir: 'src/compass',
- config: 'src/config.rb'
+ config: 'config.rb'
+ }
+ },
+ assets: {
+ options: {
+ config: 'src/scss/config.rb'
}
}
},
@@ -50,28 +54,40 @@ module.exports = function(grunt) {
src: ['dist/css/**/*', 'dist/js/**/*', 'dist/fonts/**/*']
}
},
+ // bowerのインストール
+ bower: {
+ install: {
+ options: {
+ targetDir: 'dist/',
+ layout: function(type, component, source) {
+ return type;
+ }
+ }
+ }
+ },
copy: {
build: {
files: [
{
expand: true,
- cwd: 'src/bootstrap/assets/fonts/bootstrap/',
+ cwd: 'bower_components/bootstrap-sass-official/assets/fonts/bootstrap/',
src: ["**/*"],
dest: 'dist/fonts'
},
{
expand: true,
- cwd: "src/bootstrap/assets/javascripts/",
+ cwd: "bower_components/bootstrap-sass-official/assets/javascripts/",
src: ["bootstrap.**js"],
dest: "dist/js"
}
]
}
},
+ // バージョン情報の出力
ect: {
version: {
options: {
- root: 'src/compass/css/honoka/',
+ root: 'scss/honoka/',
variables: {
name: pkg.name,
version: pkg.version,
@@ -87,10 +103,15 @@ module.exports = function(grunt) {
},
// ファイル更新監視
watch: {
- // compassの自動コンパイル
- compass: {
- files: ['src/compass/**/*.scss'],
+ // 自動コンパイル
+ bootstrap: {
+ files: ['scss/**/*.scss'],
tasks: ['compass:dist'],
+ },
+ // 自動コンパイル
+ assets: {
+ files: ['src/scss/**/*.scss'],
+ tasks: ['compass:assets'],
}
},
// テストサーバ
@@ -155,10 +176,10 @@ module.exports = function(grunt) {
}
// 通常 (compass/connect/watch)
- grunt.registerTask('server', ['ect:version', 'compass:dist', 'connect', 'watch']);
+ grunt.registerTask('server', ['bower:install', 'ect:version', 'compass', 'connect', 'watch']);
// ミニファイ
- grunt.registerTask('build', ['clean:build', 'copy:build', 'ect:version', 'compass:dist', 'cssmin:minify', 'replace:banner']);
+ grunt.registerTask('build', ['clean:build', 'bower:install', 'ect:version', 'compass:bootstrap', 'cssmin:minify', 'replace:banner']);
// 配布用パッケージ作成
grunt.registerTask('package', ['build', 'compress:main']);
View
@@ -0,0 +1,23 @@
+{
+ "name": "Honoka",
+ "description": "Honoka is one of the Bootstrap original theme.",
+ "author": "windyakin",
+ "homepage": "http://honokak.osaka/",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/windyakin/Honoka.git"
+ },
+ "license": "MIT",
+ "devDependencies": {
+ "bootstrap-sass-official": "~3.3.5"
+ },
+ "exportsOverride": {
+ "bootstrap-sass-official": {
+ "js": "assets/javascripts/bootstrap.**js",
+ "fonts": "assets/fonts/bootstrap/**/*"
+ },
+ "jquery": {
+ "assets/js": "dist/jquery.min.js"
+ }
+ }
+}
@@ -3,15 +3,12 @@
# Set this to the root of your project when deployed:
http_path = "/"
-css_dir = "dist/"
-sass_dir = "src/compass/"
-images_dir = "dist/img/"
-javascripts_dir = "dist/js/"
+css_dir = "dist/css/"
+sass_dir = "scss/"
line_comments = false
output_style = :expanded
additional_import_paths = [
# Bootstrap Core
- "src/bootstrap/assets/stylesheets/",
- "src/compass/css/"
+ "bower_components/bootstrap-sass-official/assets/stylesheets/"
]
Oops, something went wrong.
View
@@ -17,7 +17,9 @@
"url": "https://github.com/windyakin/honoka.git"
},
"devDependencies": {
+ "bower": "^1.4.1",
"grunt": "^0.4.5",
+ "grunt-bower-task": "^0.4.0",
"grunt-cli": "^0.1.13",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-compass": "^0.9.1",
File renamed without changes.
File renamed without changes.
File renamed without changes.
Submodule bootstrap deleted from d64d48
View
@@ -0,0 +1,15 @@
+# Require any additional compass plugins here.
+
+# Set this to the root of your project when deployed:
+
+http_path = "/"
+css_dir = "dist/assets/css/"
+sass_dir = "src/scss/"
+line_comments = false
+output_style = :expanded
+
+additional_import_paths = [
+ # Bootstrap Core
+ "bower_components/bootstrap-sass-official/assets/stylesheets/",
+ "scss/"
+]
File renamed without changes.

0 comments on commit f15ef42

Please sign in to comment.