Comments (24)
This sounds like an awesome idea. I'll try to spend some time today integrating LESS, SASS and plain CSS.
from techy.
It's done. Now Techy supports plain CSS, LESS, SASS and AbsurdJS. The full documentation about this change could be found here http://krasimir.github.io/techy/docs/#css
Shortly: you have to add Techy.js
file in the main project's directory with something like that:
module.exports = function() {
return {
css: {
preprocessor: 'sass',
index: 'sass/*.scss'
}
}
}
The compiled file goes to the public
directory of the used theme.
I'll recommend checking the test cases:
Absurd, SASS, LESS, Plain CSS.
P.S.
The latest version of Techy that you should have to use the above is 0.0.21.
from techy.
Wow, that was fast. Thank You !
from techy.
You are welcome.
from techy.
After my Techy update, I still don't manage to compile plain CSS.
Here's what I did :
1- created a Techy.js file in my /themes/default with this content :
module.exports = function() {
return {
css: {
preprocessor: 'none',
index: 'css/styles.css'
}
}
}
2- changed css/styles.js to css/styles.css with plain CSS
3- lanched a techy
: everything seems OK but no styles.css is compiled in my public folder.
What did I miss ?
from techy.
The Techy.js
file should be placed in the main project's folder. I.e. the place where you run the techy
command. For example:
project
themes
default
css
a.css
b.css
js
public
styles.css
tpl
Techy.js
page.md
If you use the above file structure then the content of the Techy.js
should be:
module.exports = function() {
return {
css: {
preprocessor: 'none',
index: 'themes/default/css/*.css'
}
}
}
themes/default/public/styles.css
contains the CSS styles from a.css
and b.css
.
from techy.
Let me know if that doesn't work.
from techy.
Well, each time I place Techy.js directly in my main project folder, something weird happens : when I run the techy
command, ... it opens the Techy.js file in my sublime text editor and doesn't lanch the techy app ! :/
from techy.
Ha ... this is strange.Ok, let me provide another possible name for the file. It looks like that it is not a good idea to be with the same name as the command.
from techy.
Ok. Can you please update the Techy version. It should be the latest 0.0.22.
Now instead of Techy.js
you could use TechyFile.js
.
from techy.
Hi.
It works now with the new config file name.
But the "watch" funtion seems not not to work : even if "Techy is listening for changes", the /css/styles.css compiles only when I do a techy
command; it's not automatic when I change the CSS
from techy.
Good catch, thanks. It's because by default Techy is listening for .js
files to fire CSS compilation. I'll add the glob pattern used in the TechyFile.js
to the Gulp's watch method. Will do that probably in the next hour.
from techy.
By the way if you plan to use Techy you may be interested in this http://krasimir.github.io/techy/docs/#using-yaml-front-matter
from techy.
A new version 0.0.25 is released. It contains the fix for the missing watch.
from techy.
And works ! Thank you :)
from techy.
Oh euh now it's my .md pages (in project folder - or anywhere else) that seems not watched anymore (not automatically compiled in html)
from techy.
Can you please let me know your file structure. If possible send me your files to info(at)krasimirtsonev.com. The following code is responsible for watching .md
files and it should work.
gulp.watch([root + '/**/*.md'], function(event) {
this.compilePage(event.path);
}.bind(this));
P.S. what is your OS?
from techy.
By the way, there is a problem of Gulp's watcher. Once it is started it doesn't recognize the newly created files. I.e. when you start Techy and you add a new file it is not watched for changes. You need to restart the Techy. Or that's how it works under Windows7.
from techy.
I read a bit and found this gulpjs/gulp#269 It looks that we are all waiting for an update of Gulp in order to make the watcher sees new files.
from techy.
OK, let's wait then :)
from techy.
BTW my OS is Win8.1
from techy.
Thannks. Actually, are your markdowns properly watched if they are not created after the Techy's launch. I mean those which are on the disk when run the command.
from techy.
Yes they are (in every folders) :)
from techy.
Confirmed on windows 7 (32 bit) as well. .css
files are properly watched and concatenated, .md
files too.
Only .md
files that were created after running the techy command are not picked up by the watch task. For that I too have to run the command again.
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.