Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
FIX merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduardo Herrera authored and Eduardo Herrera committed Jan 19, 2021
1 parent c7cba4b commit f7b8747
Show file tree
Hide file tree
Showing 182 changed files with 2,755 additions and 3,235 deletions.
27 changes: 0 additions & 27 deletions .circleci/config.yml

This file was deleted.

30 changes: 14 additions & 16 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,28 @@ name: Dart CI

on:
push:
branches: [ stable, dev ]
branches: [stable, dev]
pull_request:
branches: [ stable, dev ]
branches: [stable, dev]

jobs:

build:

runs-on: ubuntu-latest
services:
sketch_asset_converter:
image: parabeac/sac
ports:
ports:
- 4000:4000

steps:
- uses: actions/checkout@v2
- name: Flutter action
uses: subosito/[email protected]
- name: Install dependencies
run: flutter pub get
- name: Run tests
run: flutter pub run test
env:
FIG_API_KEY: ${{ secrets.FIG_API_KEY }}
PB_IS_GITHUB_TEST: true
- uses: actions/checkout@v2
- name: Flutter action
uses: subosito/[email protected]

- name: Install dependencies
run: flutter pub get
- name: Run tests
run: flutter pub run test
env:
FIG_API_KEY: ${{ secrets.FIG_API_KEY }}
PB_IS_GITHUB_TEST: true
19 changes: 6 additions & 13 deletions lib/configurations/configurations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,11 @@
"widgetStyle": "Material",
"widgetType": "Stateless",
"widgetSpacing": "Expanded",
"layoutPrecedence" : ["column", "row", "stack"]
"layoutPrecedence": [
"column",
"row",
"stack"
]
},
"stack": {
"widgetStyle": "Material",
"widgetType": "Stateless",
"widgetSpacing": "Expanded",
"layoutPrecedence" : ["stack"]
},
"This will be replaced by a Object ID to determine specific configurations for each page": {
"widgetStyle": "Material",
"widgetType": "Stateless",
"widgetSpacing": "Expanded"
},
"root": "AC2E7423-4609-4F37-8BCA-7E915944FFE2"
"state-management": "provider"
}
25 changes: 21 additions & 4 deletions lib/controllers/figma_controller.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import 'package:parabeac_core/controllers/controller.dart';
import 'package:parabeac_core/generation/flutter_project_builder/flutter_project_builder.dart';
import 'package:parabeac_core/generation/generators/util/pb_generation_view_data.dart';
import 'package:parabeac_core/generation/generators/writers/pb_flutter_writer.dart';
import 'package:parabeac_core/generation/generators/writers/pb_traversal_adapter_writer.dart';
import 'package:parabeac_core/generation/pre-generation/pre_generation_service.dart';
import 'package:parabeac_core/input/figma/entities/layers/frame.dart';
import 'package:parabeac_core/input/figma/helper/figma_node_tree.dart';
import 'package:quick_log/quick_log.dart';
Expand All @@ -24,12 +28,25 @@ class FigmaController extends Controller {

Interpret().init(outputPath);

var mainTree = await Interpret().interpretAndOptimize(figmaNodeTree);
var pbProject = await Interpret().interpretAndOptimize(figmaNodeTree);

var fpb =
FlutterProjectBuilder(projectName: outputPath, mainTree: mainTree);
pbProject.forest.forEach((tree) => tree.data = PBGenerationViewData());

fpb.convertToFlutterProject();
await PreGenerationService(
projectName: outputPath,
mainTree: pbProject,
pageWriter: PBTraversalAdapterWriter(),
).convertToFlutterProject();

//Making the data immutable for writing into the file
pbProject.forest.forEach((tree) => tree.data.lockData());

var fpb = FlutterProjectBuilder(
projectName: outputPath,
mainTree: pbProject,
pageWriter: PBFlutterWriter());

await fpb.convertToFlutterProject();
}

FigmaNodeTree generateFigmaTree(var jsonFigma, var projectname) {
Expand Down
Loading

0 comments on commit f7b8747

Please sign in to comment.