How zhenbinjing/i-cut works
Project type and purpose
• i‑Cut is a front‑end mono‑repo showcasing three related but distinct pipelines:
• A Sass/CSS framework (FlexGrid, OpenColor) with static demos
• A Gulp‑driven static site build (rev folder, PWA support)
• A Webpack/Vue single‑page app (v‑dist folder)
• It also includes CI via Travis, unit & E2E tests, and code coverage.
File structure
• Top‑level files: build configs (.babelrc, eslint, gulpfile.js, webpack/rollup/karma configs)
• src/: Sass source, static templates, PWA fragments → built by Gulp into rev/
• rev/: revisioned static site output (cache‑busted assets, manifest, service worker)
• v‑src/: Vue SPA source (App.vue, components, router, Vuex, main.js, index.html)
• v‑dist/: Webpack production build of SPA (hashed JS/CSS, manifest, service worker, Workbox)
• test/:
• test/es5 & test/es6 – unit tests via Karma
• test/e2e – end‑to‑end scripts and specs
Pull insights from README
• Personal tech‑stack demo integrating Sass, Gulp automation, Webpack/Vue SPA, CI (Travis), codecov.
a. Main components
1. Developer Workstation (source repos + build configs)
2. Build Pipelines
• Gulp tasks: Sass → CSS, asset rev, PWA injection → rev/
• Webpack: dev server for v‑src; prod bundler (with Rollup plugin) → v‑dist/
3. Artifacts
• rev/ – static site with versioned assets + service worker
• v‑dist/ – Vue SPA bundles + PWA files
4. Testing & CI
• Unit (Karma) & E2E tests
• Travis CI orchestrating lint → build → test → codecov → deploy
5. Hosting
• Static file host (GitHub Pages, Netlify, custom) serving rev/ and v‑dist/
b. Relationships & data flow
• Code changes → Gulp builds static → Webpack builds SPA → outputs → tests run → CI uploads coverage → deploy
• Both pipelines generate PWA assets (manifest, service worker) via Workbox or custom scripts
• Vuex & Router operate entirely in‑browser within the SPA bundle
c. Architectural patterns
• Monorepo with parallel front‑end pipelines
• Build‑time asset revisioning (cache busting)
• Progressive Web App integration
• Separation of concerns: style framework vs static demo vs dynamic SPA
d. Key technologies
• Node.js, Gulp, Webpack, Rollup, Babel
• Sass (FlexGrid, OpenColor)
• Vue.js, Vue Router, Vuex
• Karma, custom E2E scripts
• Travis CI, Codecov
• Workbox for service worker