Code Monkey home page Code Monkey logo

Comments (5)

alxbenz avatar alxbenz commented on August 16, 2024 1
  1. I agree with you on testing every task by itself, like unit tests for gulp-tasks.
  2. I think every tasks should get its own demo content. Maybe this doesn't need to be a full repo, but rather small snippets, that are included in the build-framework.

An interesting reading resource I found is: https://snugug.com/musings/unit-testing-gulp-tasks/

Another topic to discuss is the testing framework which we should use for these tests and general unit testing future components.

from biotope-build.

janrembold avatar janrembold commented on August 16, 2024

Question 1) I would like to test each and every task by itself. This would include something like

  • copy content from some demo content repo
  • run task
  • compare output with fixtures

The comparison should be done in a logical way. In the past we had lots of trouble with bit-by-bit comparison because of compilation differences between Windows and Mac.

Question 2) This is a little bit tricky. We need demo content for different places:

  • Demo Repository (currently the demo-5.x branch)
  • Testing fixtures
  • Documentation

I see multiple problems with that because the demo repo and documentation code should be tightly coupled. Both should be placed somewhere around the frontend-framework. Testing (and the resulting fixtures) should be related to the build framework. I don't like the idea of keeping demo content up2date in 3 or more different places

from biotope-build.

janrembold avatar janrembold commented on August 16, 2024

Interesting article about the lazypipe plugin. We already started to extract methods into the /lib modules. This might be the next step to divide gulp tasks from business logic.

As another side-effect of this modular approach we should integrate some lazy loading of node modules. This is still a big pain, especially on Windows. I think about moving most require calls into the modules or use some kind of node lazy loading plugins.

from biotope-build.

janrembold avatar janrembold commented on August 16, 2024

I did a major p-o-c refactoring that ended up with a complete lazy loading for each task and two examples of lazypipes (sass and cleanCss). Those lazy pipes are tested in an exemplary Ava test that is already successfully tested within Travis CI. See https://github.com/frontend-framework/build-framework/tree/lazy-load-plugins

I also added a pre-release tag "5.2.0-rc1" to this current branch state. You can test this branch for each >= 5.1.x frontend framework.

Next step would be to refine the modules to allow injecting of custom configurations and move all relevant pipes to lazypipe.

from biotope-build.

janrembold avatar janrembold commented on August 16, 2024

Testing is initially added to current PR #68

from biotope-build.

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.