Permalink
Browse files

init

  • Loading branch information...
0 parents commit 6ed00c7bf19c3e7405d18207f44c8387ac0ba3a8 @ragingwind ragingwind committed Sep 28, 2014
Showing with 223 additions and 0 deletions.
  1. +13 −0 .editorconfig
  2. +1 −0 .gitattributes
  3. +4 −0 .gitignore
  4. +17 −0 .jshintrc
  5. +39 −0 LICENSE
  6. +6 −0 bower.json
  7. +111 −0 gulpfile.js
  8. +23 −0 package.json
  9. +9 −0 readme.md
@@ -0,0 +1,13 @@
+# editorconfig.org
+root = true
+
+[*]
+indent_style = space
+indent_size = 4
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
@@ -0,0 +1 @@
+* text=auto
@@ -0,0 +1,4 @@
+node_modules
+dist
+.tmp
+bower_components
@@ -0,0 +1,17 @@
+{
+ "node": true,
+ "browser": true,
+ "esnext": true,
+ "bitwise": true,
+ "camelcase": true,
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "indent": 4,
+ "newcap": true,
+ "noarg": true,
+ "quotmark": "single",
+ "undef": true,
+ "unused": "vars",
+ "strict": true
+}
@@ -0,0 +1,39 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 KISA
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+gulpfile.js
+===========
+
+Web Starter Kit
+Copyright 2014 Google Inc. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License
@@ -0,0 +1,6 @@
+{
+ "name": "quickstart-extjs",
+ "private": true,
+ "dependencies": {
+ }
+}
@@ -0,0 +1,111 @@
+/**
+ *
+ * Quickstart gulpfile.js, This file based on Web Starter Kit
+ *
+ * Licensed under Apache License, Copyright 2014 Google Inc.
+ * See the LICENSE for more details of licence
+ */
+
+'use strict';
+
+var gulp = require('gulp');
+var $ = require('gulp-load-plugins')();
+var del = require('del');
+var runSequence = require('run-sequence');
+var browserSync = require('browser-sync');
+var reload = browserSync.reload;
+
+// Lint JavaScript
+gulp.task('jshint', function () {
+ return gulp.src('app/scripts/**/*.js')
+ .pipe(reload({stream: true, once: true}))
+ .pipe($.jshint())
+ .pipe($.jshint.reporter('jshint-stylish'))
+ .pipe($.if(!browserSync.active, $.jshint.reporter('fail')));
+});
+
+// Optimize Images
+gulp.task('images', function () {
+ return gulp.src('app/images/**/*')
+ .pipe($.cache($.imagemin({
+ progressive: true,
+ interlaced: true
+ })))
+ .pipe(gulp.dest('dist/images'))
+ .pipe($.size({title: 'images'}));
+});
+
+// Copy All Files At The Root Level (app)
+gulp.task('copy', function () {
+ return gulp.src([
+ 'app/*',
+ '!app/*.html',
+ ], {
+ dot: true
+ }).pipe(gulp.dest('dist'))
+ .pipe($.size({title: 'copy'}));
+});
+
+// Scan Your HTML For Assets & Optimize Them
+gulp.task('html', function () {
+ var assets = $.useref.assets({searchPath: ['app']});
+
+ return gulp.src('app/**/*.html').on('error', console.error.bind(console))
+ .pipe(assets)
+ .pipe($.if('*.js', $.uglify({preserveComments: 'some'})))
+ .pipe($.if('*.css', $.csso()))
+ .pipe(assets.restore())
+ .pipe($.useref())
+ .pipe($.if('*.html', $.minifyHtml()))
+ .pipe(gulp.dest('dist'))
+ .pipe($.size({title: 'html'}));
+});
+
+// Copy the files associated with components
+gulp.task('assets', function () {
+ return gulp.src([
+ 'bower_components/iCheck/skins/**/*',
+ '!bower_components/iCheck/skins/all.css',
+ 'bower_components/chosen/chosen-sprite@2x.png',
+ 'bower_components/chosen/chosen-sprite.png',
+ ], {
+ dot: true
+ }).pipe(gulp.dest('dist/styles'))
+ .pipe($.size({title: 'copy'}));
+});
+
+// Clean Output Directory
+gulp.task('clean', del.bind(null, ['dist']));
+
+// Watch Files For Changes & Reload
+gulp.task('serve', function () {
+ browserSync({
+ notify: false,
+ logPrefix: 'QS',
+ server: {
+ baseDir: 'app',
+ routes: {
+ "/bower_components": "./bower_components"
+ }
+ }
+ });
+
+ gulp.watch(['app/**/*.html'], reload);
+ gulp.watch(['app/styles/**/*.css'], [reload]);
+ gulp.watch(['app/scripts/**/*.js'], ['jshint']);
+ gulp.watch(['app/images/**/*'], reload);
+});
+
+// Build and serve the output from the dist build
+gulp.task('serve:dist', ['default'], function () {
+ browserSync({
+ notify: false,
+ logPrefix: 'QS',
+ server: 'dist'
+ });
+});
+
+// Build Production Files, the Default Task
+gulp.task('default', ['clean'], function (cb) {
+ runSequence(['jshint', 'html', 'images', 'copy', 'assets'], cb);
+});
@@ -0,0 +1,23 @@
+{
+ "devDependencies": {
+ "browser-sync": "^1.3.0",
+ "del": "^0.1.2",
+ "gulp": "^3.8.5",
+ "gulp-cache": "^0.2.2",
+ "gulp-csso": "^0.2.9",
+ "gulp-if": "^1.2.1",
+ "gulp-imagemin": "^1.0.0",
+ "gulp-jshint": "^1.6.3",
+ "gulp-load-plugins": "^0.6.0",
+ "gulp-minify-html": "^0.1.5",
+ "gulp-size": "^1.0.0",
+ "gulp-uglify": "^1.0.1",
+ "gulp-useref": "^1.0.1",
+ "jshint-stylish": "^0.4.0",
+ "run-sequence": "^0.3.6"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "private": true
+}
@@ -0,0 +1,9 @@
+# Quickstart for ExtJS
+
+# CONTRIBUTE
+
+See [CONTRIBUTE](https://github.com/KoreaHTML5/dev.koreahtml5.kr/blob/master/CONTRIBUTE.md) for more details
+
+# LICENSE
+
+See LICENSE for more details

0 comments on commit 6ed00c7

Please sign in to comment.