Comments (5)
- I agree with you on testing every task by itself, like unit tests for gulp-tasks.
- 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.
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.
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.
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.
Testing is initially added to current PR #68
from biotope-build.
Related Issues (20)
- UnhandledPromiseRejectionWarning when "svgSprites" is enabled
- useref:assets breaks builds HOT 1
- Legacy script gets built twice
- Scaffolding files are not live reloaded
- Live update of preview template file HOT 1
- Add missing copy for resources
- Legacy: Add compilation of sass files
- Add versioned docs
- Traverse to github actions
- Create plugin sass
- Create plugin copy static files
- Create plugin copy node resources
- Preview app on component change run resource loader
- Add link to biotope.sh
- Using vendor libraries that have identically named entrypoints not possible
- SCSS files in bioElements do not get autoprefixed
- Build error when using biotope build 7.2.0 or higher HOT 3
- copy.js task should copy both .js and .js.map files to vendor
- copy.js task should copy both .js and .js.map files to vendor HOT 2
- Build breaks if sass.options is undefined
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 biotope-build.