-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 774ce9b
Showing
24 changed files
with
431 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = false | ||
indent_style = tab | ||
indent_size = 2 | ||
|
||
# Matches the exact files either package.json or .travis.yml | ||
[{package.json}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.DS_Store | ||
node_modules | ||
npm-debug.log | ||
dist |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"bitwise" : false, | ||
"camelcase" : false, | ||
"curly" : false, | ||
"eqeqeq" : true, | ||
"es3" : false, | ||
"forin" : true, | ||
"freeze" : true, | ||
"immed" : true, | ||
"indent" : 2, | ||
"latedef" : "nofunc", | ||
"newcap" : false, | ||
"noarg" : true, | ||
"nonbsp" : true, | ||
"nonew" : true, | ||
"plusplus" : false, | ||
"undef" : true, | ||
"unused" : true, | ||
"strict" : false, | ||
"globalstrict" : true, | ||
"trailing" : true, | ||
"lastsemic" : true, | ||
"proto" : true, | ||
"devel" : true, | ||
"node" : true, | ||
"browserify" : true, | ||
"esnext" : true, | ||
"asi" : true | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
.git | ||
npm-debug.log |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 CodingAlchemy | ||
|
||
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. | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
```bash | ||
|
||
$ git clone https://github.com/vinspee/projectologist.git | ||
$ cd projectologist | ||
$ npm i | ||
$ npm start | ||
``` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<include>partials/header.html</include> | ||
fufr | ||
<include>partials/footer.html</include> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<script type="text/javascript" src="scripts/app.js"></script> | ||
</body> | ||
</html> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Projectologist</title> | ||
<meta name="description" content="taking care of shit"> | ||
<link rel="stylesheet" type="text/css" href="styles/main.css"> | ||
</head> | ||
<body> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//var React = require('react'); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@import "dude"; | ||
|
||
:root { | ||
--red: red; | ||
} | ||
|
||
html { | ||
background: var(--red); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
var chron = require('chronic'); | ||
var paths = require('./paths'); | ||
|
||
var cssmin = require('./transforms/cssmin'); | ||
var del = require('./transforms/del'); | ||
var scripts = require('./transforms/scripts'); | ||
var html = require('./transforms/html'); | ||
var serve = require('./transforms/serve'); | ||
var minify = require('./transforms/minify'); | ||
var styles = require('./transforms/styles'); | ||
var icons = require('./transforms/icons'); | ||
|
||
chron('assemble', chron.once('html', 'styles', 'images', 'icons', 'scripts')); | ||
chron('default', chron.once('clean', 'assemble'), serve); | ||
chron('serve', serve); | ||
|
||
chron('html', chron | ||
.path(paths.src.main_html).watch(paths.src.html).watch(paths.src.main_html) | ||
.dest(paths.dest.html), | ||
html) | ||
|
||
chron('styles', chron | ||
.path(paths.src.main_style) | ||
.dest(paths.dest.styles) | ||
.watch(paths.src.styles), | ||
styles); | ||
|
||
chron('clean', chron | ||
.src(paths.dest.html), // same as .path (if used as first option) | ||
del); | ||
|
||
chron('scripts', chron | ||
.path(paths.src.main_script, 'app.js') | ||
.watch(paths.src.scripts) | ||
.dest(paths.dest.scripts), | ||
scripts); | ||
|
||
chron('images', chron | ||
.path(paths.src.images) | ||
.dest(paths.dest.images), | ||
minify.images); | ||
|
||
chron('icons', chron | ||
.path(paths.src.icons) | ||
.dest(paths.dest.images), | ||
icons); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
src: { | ||
images: './app/images/*.{png,jpg,gif,svg,webp}', | ||
icons: './app/images/icons/**/*.svg', | ||
styles: './app/styles/**/*.css', | ||
main_style: './app/styles/main.css', | ||
scripts: './app/scripts/**/*.{js,jsx}', | ||
main_script: './app/scripts/app.js', | ||
html: './app/html/*/**/*.html', | ||
main_html: './app/html/*.html' | ||
}, | ||
dest: { | ||
images: './dist/images', | ||
styles: './dist/styles', | ||
scripts: './dist/scripts', | ||
html: './dist' | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
var paths = require('../paths'); | ||
|
||
module.exports = function(t) { | ||
if (t.params.watch) { | ||
browserSync({ | ||
notify: true, | ||
logPrefix: 'PJT', | ||
server: { | ||
baseDir: paths.dest.html, | ||
index: "index.html" | ||
}, | ||
port: 1337, | ||
open: false | ||
}); | ||
} | ||
t.done(); | ||
} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
var gutil = require('gulp-util') | ||
var uncss = require('gulp-uncss'); | ||
var concat = require('gulp-concat'); | ||
var csso = require('gulp-csso'); | ||
|
||
module.exports = function(t) { | ||
t.eos( | ||
t.src() | ||
//.pipe(uncss({ | ||
//html: ['./views/index.ejs'] | ||
//})) | ||
//.on('error', gutil.log) | ||
.pipe(concat('main.min.css')) | ||
.pipe(csso()) | ||
.pipe(t.dest()) | ||
); | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
var del = require('del'); | ||
|
||
module.exports = function(t) { | ||
del(t.path, function(err) { | ||
t.done(err); | ||
}); | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var htmlInclude = require('gulp-html-tag-include'); | ||
var reload = require('browser-sync').reload; | ||
|
||
module.exports = function (t) { | ||
var dest = t.dest(); | ||
if (t.params.watch) { | ||
dest.pipe(reload({stream: true})); | ||
} | ||
t.build(t.src(), htmlInclude(), dest); | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
var svgIcons = require('gulp-svgstore'); | ||
var reload = require('browser-sync').reload; | ||
var cheerio = require('gulp-cheerio'); | ||
|
||
module.exports = function (t) { | ||
var dest = t.dest(); | ||
if (t.params.watch) { | ||
dest.pipe(reload({stream: true})); | ||
} | ||
t.build(t.src(), | ||
cheerio({ | ||
run: function($) { | ||
$('[fill]').removeAttr('fill'); | ||
} | ||
}), | ||
svgIcons({ fileName: 'icons.svg' }), | ||
dest); | ||
}; | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
var concat = require('gulp-concat'); | ||
|
||
module.exports = { | ||
scripts: function(t) { | ||
var uglify = require('gulp-uglify'); | ||
t.build(t.src(), uglify(),concat('app.min.js'), t.dest()); | ||
}, | ||
images: function(t) { | ||
var imagemin = require('gulp-imagemin'); | ||
t.build(t.src(), | ||
imagemin({ | ||
progressive: true, | ||
optimizationLevel: 5, | ||
svgoPlugins: [{ removeViewBox: false }, { removeEmptyAttrs: false }] | ||
}), | ||
t.dest()); | ||
}, | ||
styles: function(t) { | ||
var gutil = require('gulp-util') | ||
var uncss = require('gulp-uncss'); | ||
var csso = require('gulp-csso'); | ||
t.eos( | ||
t.src() | ||
.pipe(concat('main.min.css')) | ||
.pipe(csso()) | ||
.on('error', gutil.log) | ||
.pipe(t.dest()) | ||
); | ||
} | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
var derequire = require('gulp-derequire'); | ||
var gutil = require('gulp-util'); | ||
var browserify = require('browserify'); | ||
|
||
module.exports = function(t) { | ||
var b = browserify(); | ||
b.transform('envify'); | ||
b.require(t.path); | ||
t.eos( | ||
b.bundle() | ||
.on('error',gutil.log) | ||
.pipe(t.source('prebundle.js')) | ||
.pipe(derequire()) | ||
.pipe(t.dest()) | ||
); | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
var browserify = require('browserify'); | ||
var reload = require('browser-sync').reload; | ||
|
||
module.exports = function(t) { | ||
var b = browserify({debug: true}); | ||
b.add(t.path[0]); | ||
b.transform('reactify'); | ||
var bundle = b.bundle().on('error', console.log); | ||
var source = t.source(t.path[1]); | ||
var dest = t.dest(); | ||
if (t.params.watch) { | ||
dest.pipe(reload({stream: true})); | ||
} | ||
t.build(bundle, source, dest); | ||
|
||
// helps sometimes | ||
// console.log(t.path); | ||
// console.log(t.params); | ||
}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = function(t) { | ||
var paths = require('../paths'); | ||
if (t.params.watch) { | ||
var browserSync = require('browser-sync'); | ||
browserSync({ | ||
notify: true, | ||
logPrefix: 'PJT', | ||
server: { | ||
baseDir: paths.dest.html, | ||
index: "index.html" | ||
}, | ||
port: 1337, | ||
open: false | ||
}); | ||
} | ||
t.done(); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
var gutil = require('gulp-util'); | ||
var postcss = require('gulp-postcss'); | ||
var reload = require('browser-sync').reload; | ||
var sourcemaps = require('gulp-sourcemaps'); | ||
var autoprefixer = require('autoprefixer-core'); | ||
var calc = require('postcss-calc'); | ||
var colorFunction = require('postcss-color-function'); | ||
var gray = require('postcss-color-gray'); | ||
var colorHexAlpha = require('postcss-color-hex-alpha'); | ||
var customMedia = require('postcss-custom-media'); | ||
var customProperties = require('postcss-custom-properties'); | ||
var fontVariant = require('postcss-font-variant'); | ||
var inline = require('postcss-import'); | ||
var nested = require('postcss-nested'); | ||
var mincss = require('./cssmin'); | ||
|
||
module.exports = function(t) { | ||
var dest = t.dest(); | ||
if (t.params.watch) { | ||
dest.pipe(reload({stream: true})); | ||
} | ||
if (t.params.production) { | ||
dest.pipe(mincss(t)); | ||
} | ||
t.build(t.src(), | ||
sourcemaps.init(), | ||
postcss([ | ||
inline({ | ||
path: ['app/styles/'] | ||
}), | ||
nested, | ||
customProperties(), | ||
calc(), | ||
customMedia(), | ||
gray(), | ||
colorHexAlpha(), | ||
colorFunction(), | ||
fontVariant(), | ||
autoprefixer({ browsers: 'last 2 versions' }) | ||
]), | ||
sourcemaps.write('.'), | ||
dest); | ||
}; |
Oops, something went wrong.