Last active
February 6, 2017 15:12
-
-
Save Deifinger/57841a854e9c636c47f284c1ac441b7b to your computer and use it in GitHub Desktop.
base project config
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
{ | |
"always-semicolon": true, | |
"color-case": "lower", | |
"block-indent": "\t", | |
"color-shorthand": true, | |
"element-case": "lower", | |
"eof-newline": true, | |
"leading-zero": false, | |
"quotes": "double", | |
"sort-order-fallback": "abc", | |
"space-before-colon": "", | |
"space-after-colon": " ", | |
"space-before-combinator": " ", | |
"space-after-combinator": " ", | |
"space-between-declarations": "\n", | |
"space-before-opening-brace": " ", | |
"space-after-opening-brace": "\n", | |
"space-after-selector-delimiter": "\n", | |
"space-before-selector-delimiter": "", | |
"space-before-closing-brace": "\n", | |
"strip-spaces": true, | |
"tab-size": true, | |
"unitless-zero": true, | |
"vendor-prefix-align": 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
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs | |
# http://editorconfig.org | |
root = true | |
[*] | |
# change these settings to your own preference | |
indent_style = tab | |
indent_size = 2 | |
# we recommend you to keep these unchanged | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true | |
[*.md] | |
trim_trailing_whitespace = false |
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
const gulp = require('gulp'), | |
pump = require('pump'), | |
postcss = require('gulp-postcss'), | |
cssnext = require('postcss-cssnext'), | |
rename = require('gulp-rename'), | |
nested = require('postcss-nested'), | |
cssnano = require('cssnano'), | |
babel = require('gulp-babel'), | |
uglify = require('gulp-uglify'), | |
atImport = require("postcss-import"); | |
const paths = { | |
css: ['src/css/*.css'], | |
scripts: ['src/js/*.js', '!src/js/lib/*'], | |
images: ['src/img/*'] | |
}; | |
gulp.task('default', [/*'lint',*/ 'bulid']); | |
gulp.task('build', ['css', 'js'/*, 'images'*/]); | |
gulp.task('build:release', ['css:release', 'js:release']); | |
gulp.task('css', () => { | |
return gulp.src(paths.css) | |
.pipe(postcss([ | |
atImport(), | |
/*nested,*/ | |
cssnext({browsers: ['> 0%']}) | |
])) | |
.pipe(gulp.dest('dist/css')); | |
}); | |
gulp.task('css:release', () => { | |
return gulp.src(paths.css) | |
.pipe(postcss([ | |
atImport(), | |
cssnext({browsers: ['> 0%']}), | |
cssnano() | |
])) | |
.pipe(gulp.dest('dist/css')); | |
}); | |
gulp.task('js', () => { | |
pump([ | |
gulp.src(paths.scripts), | |
babel({ | |
presets: ['es2015'] | |
}), | |
gulp.dest('dist/js') | |
]); | |
}); | |
gulp.task('js:release', ['js'], () => { | |
pump([ | |
gulp.src(paths.scripts), | |
uglify(), | |
gulp.dest('dist/js') | |
]); | |
}); | |
gulp.task('watch', function() { | |
gulp.watch(paths.scripts, ['js']); | |
gulp.watch(paths.css, ['css']); | |
//gulp.watch(paths.images, ['images']); | |
}); |
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
{ | |
"private": true, | |
"name": "projectname", | |
"version": "1.0.0", | |
"description": "project desc", | |
"main": "index.js", | |
"author": "Ruslan Kostikov", | |
"license": "GPL-3.0", | |
"scripts": { | |
"setup": "npm install && gulp" | |
}, | |
"dependencies": {}, | |
"devDependencies": {} | |
} |
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 --save font-awesome html5shiv | |
npm install --save-dev babel-preset-es2015 cssnano gulp gulp-babel gulp-cssnano gulp-postcss gulp-rename gulp-uglify postcss-cssnext postcss-import postcss-nested pump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment