Comments (7)
You are right. gulp-sass
and gulp-less
are required only if you need to use another CSS preprocessor. However, there are part of Techy's features list and we have to be careful by removing them. I'm thinking about moving gulp-sass
and gulp-less
out of the dependencies' list and if someone want to use them will promp a message saying that they should be added to the package.json
file.
from techy.
I may dig in to the code and make a more specific proposal (or possibly a pull request). I really like the way Techy feels as a Gulp plugin, and I think there's another step to take there, but I'm not 100% clear on it yet.
from techy.
Yep, it looks like using Techy as gulp plugin is better then the Techy's CLI. I'll spend some time concepting.
from techy.
One problem that I encountered while playing with Techy last night was that my files were named *.markdown
, whereas Techy was expecting *.md
. It was no big deal for me to rename my files, but another way to look at it is that in standard Gulp style, I could select whatever set of files I want and then run them through a Markdown processor.
Here's what I'm thinking... there's a Gulp plugin for reading front matter, another for generating RSS, one for processing Markdown, etc.
I see Techy offering a couple of things:
- Connection between content and templates (I like the
<% get('content') %>
and the ability to define custom functions that can go into templates) - an all-in-one static site generator
For people like me who want the flexibility of Gulp (I choose which files run through which processors), that first feature above is valuable. For people who want something that "just works", the second one (something like the current "techy" command) may be nice.
There are Gulp plugins for rendering various kinds of templates, but I'm not sure that they're as well tuned to the static site generation case as Techy.
from techy.
Sounds good. To simplify the things - the Techy's Gulp plugin should contain only the core functionalities. I.e. the API methods. The Markdown, CSS or JavaScript processing should be left for the techy
command and the original Techy module.
I could say that this will make Techy much more flexible tool and will bring new possibilities. However I should make some big changes because the current code is oriented to the Markdown conversion. I think that we should keep most of the logic in the original repository and just provide a proper API for that new Gulp plugin. It will be better for the future development.
from techy.
I started using techy on a small project and I too think the gulp plugin is great. as far as i know it's the only way to run techy in a deploy process; the techy command does not seems to have a "stop when you're done" option. and that's fine since the gulp plugin exists
however, I think the plugin should focus on the markdown/template processing. CSS & js is handle very well with other plugins, so there's no needs to have it in gulp-techy (it's fine in the techy command)
in particular, here is a few things I think techy-gulp should not do:
- create _css, _js and _tpl folder if they don"t exists
- compile and copy files from _css & _js
- run the techy command (without watch)
here is my use case, I have this folder structure:
src/
├── index.md
├── article/
│ ├── about-something.md
│ └── about-something-else.md
├── about.md
├── contact.md
www/
layout/
└── basic.html
I want gulp-techy to do one thing: compile the .md files present in src/ and put the result in www/
I'd like to do this using this gulpfile.js:
var gulp = require('gulp');
var techy = require('techy');
gulp.task('techy', function() {
gulp.src('./src/**/*.md')
.pipe(techy({
template: 'layout/basic.html'
}))
.pipe(gulp.dest('./www'));
});
gulp.task('default', ['techy']);
and here is the one I end up having
var gulp = require('gulp');
var techy = require('techy').gulp({
root: __dirname+'/techy',
dest: __dirname+'/techy/dest',
theme: 'default'
});
gulp.task('techy', function() {
gulp.src('./src/**/*.md')
.pipe(techy())
.pipe(gulp.dest('./www'));
});
gulp.task('default', ['techy']);
that's not much difference but i have to add a /techy folder at the project root to hold the _css, _js, _tpl, dest & public folder created and/or needed by techy, ideally only the _tpl would be needed and - as in the first gulpfile.js - could be anywhere
what do you guys think about it?
from techy.
I agree with your points and will probably make Techy working as you described.
from techy.
Related Issues (20)
- Change default output folder name to dist HOT 2
- Do we really need themes? HOT 25
- Default theme configuration HOT 2
- Blog layout? HOT 2
- Minifying SCSS HOT 2
- Empty SCSS files cause node to crash and burn HOT 4
- Super simple (gulp) usage? HOT 3
- code prettifying with prism.js? HOT 4
- Improvement on CSS watch HOT 2
- Unable to set custom source directory for MD pages HOT 1
- Pages() usage? HOT 3
- Setting src and dest to same path == Misery HOT 3
- Modular content HOT 4
- Using as Gulp plugin throws TypeError and packing error HOT 10
- Templates don't have access to Techy functions
- --src path still exists in --dest output
- Techy not working
- Automatically minifying css, html and js final files from _dist
- Organizing the MD source files within a folder rather than on root
- Is this project active?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from techy.