GithubHelp home page GithubHelp logo

Comments (24)

krasimir avatar krasimir commented on June 1, 2024

This sounds like an awesome idea. I'll try to spend some time today integrating LESS, SASS and plain CSS.

from techy.

krasimir avatar krasimir commented on June 1, 2024

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.

raphaelgoetter avatar raphaelgoetter commented on June 1, 2024

Wow, that was fast. Thank You !

from techy.

krasimir avatar krasimir commented on June 1, 2024

You are welcome.

from techy.

raphaelgoetter avatar raphaelgoetter commented on June 1, 2024

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.

krasimir avatar krasimir commented on June 1, 2024

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.

krasimir avatar krasimir commented on June 1, 2024

Let me know if that doesn't work.

from techy.

raphaelgoetter avatar raphaelgoetter commented on June 1, 2024

Well, each time I place Techy.js directly in my main project folder, something weird happens : when I run the techycommand, ... it opens the Techy.js file in my sublime text editor and doesn't lanch the techy app ! :/

from techy.

krasimir avatar krasimir commented on June 1, 2024

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.

krasimir avatar krasimir commented on June 1, 2024

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.

raphaelgoetter avatar raphaelgoetter commented on June 1, 2024

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.

krasimir avatar krasimir commented on June 1, 2024

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.

krasimir avatar krasimir commented on June 1, 2024

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.

krasimir avatar krasimir commented on June 1, 2024

A new version 0.0.25 is released. It contains the fix for the missing watch.

from techy.

raphaelgoetter avatar raphaelgoetter commented on June 1, 2024

And works ! Thank you :)

from techy.

raphaelgoetter avatar raphaelgoetter commented on June 1, 2024

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.

krasimir avatar krasimir commented on June 1, 2024

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.

krasimir avatar krasimir commented on June 1, 2024

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.

krasimir avatar krasimir commented on June 1, 2024

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.

raphaelgoetter avatar raphaelgoetter commented on June 1, 2024

OK, let's wait then :)

from techy.

raphaelgoetter avatar raphaelgoetter commented on June 1, 2024

BTW my OS is Win8.1

from techy.

krasimir avatar krasimir commented on June 1, 2024

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.

raphaelgoetter avatar raphaelgoetter commented on June 1, 2024

Yes they are (in every folders) :)

from techy.

ismay avatar ismay commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.