Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Javier Carrillo Milla
    @stringparser
    @bucaran the changes will land on the runtime package this afternoon or dusk if nothing brokes in between
    Javier Carrillo Milla
    @stringparser

    I should had my mouth shut, it will take some more time. Is looking really good.

    If anyone is interested go to runtime/context.js and the manifold package

    for context.js you have a repl
    run it and after that write series one two parallel one two
    Javier Carrillo Milla
    @stringparser
    link typo, it is manifold
    anyhow thats not really important
    enjoy your holidays guys!
    :clap:
    Javier Carrillo Milla
    @stringparser
    :christmas_tree:
    Stanislav
    @DarkPark
    :smile:
    Javier Carrillo Milla
    @stringparser
    hello there
    :D
    long time no see!
    after some hard work there is a new version coming
    either this week or next
    for real this time
    :)
    Stanislav
    @DarkPark
    hi there
    looking forward for it :)
    Javier Carrillo Milla
    @stringparser
    how does this look?
    [22:37:10] Started 'default' in parallel
    [22:37:10] Started 'css jsx img default' in series from default
    [22:37:10] - Finished 'css' in 8.06 ms
    [22:37:10] 'gulp-runtime' found an error in 'jsx'
    [22:37:10] Parse Error: Unespected Identifier
        at Stack.handle (/Users/stringparser/code/gulp-runtime/example.js:8:11)
        at /Users/stringparser/code/runtime/index.js:132:32
        at b (domain.js:183:18)
        at asyncRunner (/Users/stringparser/code/runtime/node_modules/async-done/index.js:38:18)
        at process._tickDomainCallback (node.js:486:13)
    [22:37:10] - Finished 'jsx' in 2.16 ms
    [22:37:10] - Finished 'img' in 4.1 ms
    [22:37:10] - Finished 'default' in 117 μs
    [22:37:10] Finished 'css jsx img default' from default 16 ms
    that is what will happen if you use the repl
    if you are not using it the error will be throw
    Javier Carrillo Milla
    @stringparser
    oh nice! I made the prompt behave finally and only write when all is finished :)
    [22:43:55] Finished 'css jsx img default' from default 19 ms
    >
    Javier Carrillo Milla
    @stringparser
    Ok, its published
    Stanislav
    @DarkPark
    hello
    cool
    will try this now
    Javier Carrillo Milla
    @stringparser
    great ;)
    Javier Carrillo Milla
    @stringparser
    much simple approach to all of the repl use-case
    lifeispeachy301
    @lifeispeachy301
    hi @stringparser, just stumbled across your repo. nice work! I'm looking to be able to create a master project that has sub-projects (each with their own gulpfile) and use the master projects gulpfile to be able to run the build steps for each. Is this something I could do with gulp-runtime?
    Javier Carrillo Milla
    @stringparser

    Hello @lifeispeachy301, thanks! :) And apologies for the delay.

    Yes you could load the gulpfiles separately or have an instance for each sub project. You could also do this with gulp but would have to namespace the tasks yourself meaning gulp.task('sub1:css', [Function]); gulp.task('sub2:jade', [Function]); etc. Could you share the project's structure and what you want to achieve? This way a I could write you a better approach for it.

    What I'm thinking at the moment is that each sub-project should create its instance and export it, then from the main gulpfile you could run some general purpose task for each subproject.
    lifeispeachy301
    @lifeispeachy301
    ok, cool. here's a high level of what the file system looks like
    .
    ├── api
    │ ├── middleware
    │ └── routes
    ├── cms
    │ ├── img
    │ ├── js
    │ ├── sass
    │ └── views
    ├── installations
    │ └── some-sub-proj
    │ ├── assets
    │ ├── bower.json
    │ ├── css
    │ ├── gulpfile.js
    │ ├── img
    │ ├── js
    │ ├── package.json
    │ └── another-sub-proj
    │ ├── assets
    │ ├── bower.json
    │ ├── css
    │ ├── gulpfile.js
    │ ├── img
    │ ├── js
    │ ├── package.json
    ├── package.json
    ├── gulpfile.js
    ├── index.js
    well that didn't transfer too well. lol. But I think you get the idea. pretty much the main gulp file builds the cms and the api. In the installations folder I have more than one project each built using different tech
    so i'd like to refactor this so that the main gulpfile can be made to execute the builds in the nested projects
    I'd like the final result to be something like:
    ├── final-build
    │ ├── cms
    │ ├── api
    │ ├── some-sub-proj
    │ ├── another-sub-proj
    ├── package.json
    ├── index.js
    thanks for getting back to me, and let me know what you think
    Javier Carrillo Milla
    @stringparser
    ok, makes sense, so each final-build/<folder>would have its own gulpfileand the outer most folder one
    Javier Carrillo Milla
    @stringparser
    ok, this is how the ./gulpfile.js could look like
    // main instance
    var gulp = require('gulp-runtime').create();
    
    // each folder chould just export a function
    var api = require('./api/gulpfile');
    var cms = require('./cms/gulpfile');
    var installations = require('./installations/gulpfile');
    
    // stack all the exported functions (in parallel)
    var stack = gulp.stack(api, cms, installations);  
    
    // run them
    stack(/* args */);
    and here the how "each of the subprojects" could export its build process
    // ./api/gulpfile.js, ./cms/gulpfile.js, etc.
    var gulp = require('gulp-runtime').create('api');
    
    gulp.task('styles', function(){
      return gulp.src(__dirname + '/**/*.{scss,styl}')
        .pipe(gulp.dest('./build/'));
    });
    
    gulp.task('templates', function(){
      return gulp.src(__dirname + '/**/*.{jade,hbs}')
        .pipe(gulp.dest('./build/'));
    });
    
    // make a stack function (to be run in the main gulpfile)
    var stack = gulp.stack('styles templates');
    
    // and export it
    module.exports = stack;
    gulp.stack always returns a function
    in any case just ask
    lifeispeachy301
    @lifeispeachy301
    awesome, thanks so much. Quick question, would I still be able to run the gulp tasks seperately inside each project directory? like /installations $ gulp default
    Javier Carrillo Milla
    @stringparser
    from the main gulpfile? If so you will have to define the tasks there, you could do that but then it would be back again as if only was one instance
    another option would be to run the default task in each sub directory just like gulp from that snippet above you would have to change this
    var stack = gulp.stack('styles templates');
    
    stack();  // run it <--- added part
    
    // and export it
    module.exports = stackt;