From c11c00b7d11d332e9da6c968ef1f23bb5635232a Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Fri, 23 Oct 2020 21:50:53 -0500 Subject: [PATCH] GrafoscopioUtils as dependency and starting theme configuration. --- .../BaselineOfBrea/BaselineOfBrea.class.st | 32 ++++++++++++++++++- repository/Brea/BreaTheme.class.st | 15 +++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/repository/BaselineOfBrea/BaselineOfBrea.class.st b/repository/BaselineOfBrea/BaselineOfBrea.class.st index 5335ae2..ba506c8 100644 --- a/repository/BaselineOfBrea/BaselineOfBrea.class.st +++ b/repository/BaselineOfBrea/BaselineOfBrea.class.st @@ -16,12 +16,42 @@ BaselineOfBrea >> baseline: spec [ for: #common do: [ "Dependencies" + self grafoscopioUtils: spec. spec baseline: 'NeoJSON' with: [ spec repository: 'github://svenvc/NeoJSON/repository' ]; baseline: 'Mustache' with: [ spec repository: 'github://noha/mustache/repository' ]; baseline: 'TaskIt' with: [ spec repository: 'github://noha/taskit:add-all-future' ]. "Packages" - spec package: 'Brea' with: [ spec requires: #('NeoJSON' 'Mustache' 'TaskIt') ]. + spec package: 'Brea' with: [ spec requires: #('NeoJSON' 'Mustache' 'TaskIt' 'Grafoscopio-Utils') ]. ] ] + +{ #category : #baselines } +BaselineOfBrea >> grafoscopioUtils: spec [ + "I load the configuration of this package using a external Gitea repository." + "While more Git independient providers are implemented in Monticello, I will use Iceberg + to download the repository and load it from a local directory" + + | location localRepo | + "Dependencies" + + "Local and remote repo definition" + location := FileLocator localDirectory / 'iceberg' / 'Offray' / 'GrafoscopioUtils'. + location exists ifFalse: [ + (IceRepositoryCreator new + location: location; + remote: (IceGitRemote url: 'https://code.tupale.co/Offray/GrafoscopioUtils.git'); + createRepository) + register + ]. + "Package loading" + localRepo := 'gitlocal://', location fullName. + Metacello new + repository: localRepo; + baseline: 'GrafoscopioUtils'; + load. + spec baseline: 'GrafoscopioUtils' with: [ spec repository: localRepo ]. + spec package: 'Grafoscopio-Utils' with: [ spec repository: localRepo ]. + +] diff --git a/repository/Brea/BreaTheme.class.st b/repository/Brea/BreaTheme.class.st index 89e4526..8dc2f20 100644 --- a/repository/Brea/BreaTheme.class.st +++ b/repository/Brea/BreaTheme.class.st @@ -148,6 +148,21 @@ BreaTheme >> license: anObject [ license := anObject ] +{ #category : #'as yet unclassified' } +BreaTheme >> loadConfiguration [ + | config | + config := self folder / 'brea.yaml'. + config exists + ifTrue: [ ^ PPYAMLGrammar new parse: config contents ] + ifFalse: [ self inform: + 'No configuration file found. A "brea.yaml" file should be located in the theme root folder. + please run "#updateCustomizations" after defining a theme name from the + "BreaTheme availablePacks". + If no configuration is defined for such theme name you can create and empty configuration + file by running "#createBaseConfiguration" and filing out the "brea.yaml" fields. + For more information or help ask at https://t.me/grafoscopio .' ] +] + { #category : #accessing } BreaTheme >> name [ ^ name ifNil: [ name = 'unamed' ]