Modularizing code and improving extensions.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-01-22 10:23:56 -05:00
parent c41cb4c2d2
commit 05d2f3b182
8 changed files with 31 additions and 12 deletions

View File

@ -15,7 +15,7 @@ BaselineOfGrafoscopioUtils >> baseline: spec [
self fossil: spec. self fossil: spec.
spec baseline: 'PetitParser' with: [spec spec baseline: 'PetitParser' with: [spec
repository: 'github://moosetechnology/PetitParser/src'; repository: 'github://moosetechnology/PetitParser:v3.x.x/src';
loads: #('Minimal' 'Indent' 'YAML')]. loads: #('Minimal' 'Indent' 'YAML')].
"Packages" "Packages"

View File

@ -5,7 +5,7 @@ or other related projects.
Class { Class {
#name : #GrafoscopioUtils, #name : #GrafoscopioUtils,
#superclass : #Object, #superclass : #Object,
#category : #'Grafoscopio-Utils' #category : #'Grafoscopio-Utils-Core'
} }
{ #category : #utilities } { #category : #utilities }
@ -64,13 +64,11 @@ GrafoscopioUtils class >> exportAsSton: anObject on: aFileReference [
aFileReference ensureCreateFile. aFileReference ensureCreateFile.
aFileReference writeStreamDo: [ :stream | aFileReference writeStreamDo: [ :stream |
(STON writer on: stream) (STON writer on: stream)
newLine: String crlf; newLine: String lf;
prettyPrint: true; prettyPrint: true;
keepNewLines: true; keepNewLines: true;
nextPut: anObject ]. nextPut: anObject ].
^ aFileReference
] ]
{ #category : #'graphical interface' } { #category : #'graphical interface' }

View File

@ -14,7 +14,7 @@ Class {
'contents', 'contents',
'url' 'url'
], ],
#category : #'Grafoscopio-Utils' #category : #'Grafoscopio-Utils-Core'
} }
{ #category : #'as yet unclassified' } { #category : #'as yet unclassified' }

View File

@ -0,0 +1,19 @@
Extension { #name : #LePage }
{ #category : #'*Grafoscopio-Utils-Core' }
LePage >> asMarkdeep [
| bodyStream |
bodyStream := '' writeStream.
self preorderTraversal do: [:snippet |
bodyStream nextPutAll: snippet contentAsString; lf; lf.
].
^ Markdeep new
body: bodyStream contents
contents.
]
{ #category : #'*Grafoscopio-Utils-Core' }
LePage >> asMarkdeepInto: aFileLocator [
self preorderTraversal
]

View File

@ -11,9 +11,11 @@ Class {
'tail', 'tail',
'body', 'body',
'language', 'language',
'markdownFile' 'markdownFile',
'config',
'title'
], ],
#category : #'Grafoscopio-Utils' #category : #'Grafoscopio-Utils-Core'
} }
{ #category : #'as yet unclassified' } { #category : #'as yet unclassified' }

View File

@ -7,7 +7,7 @@ Class {
#instVars : [ #instVars : [
'file' 'file'
], ],
#category : #'Grafoscopio-Utils' #category : #'Grafoscopio-Utils-Core'
} }
{ #category : #persistence } { #category : #persistence }

View File

@ -7,7 +7,7 @@ Class {
#classInstVars : [ #classInstVars : [
'executable' 'executable'
], ],
#category : #'Grafoscopio-Utils' #category : #'Grafoscopio-Utils-Core'
} }
{ #category : #'as yet unclassified' } { #category : #'as yet unclassified' }

View File

@ -22,7 +22,7 @@ Class {
'rootFolder', 'rootFolder',
'manifests' 'manifests'
], ],
#category : #'Grafoscopio-Utils' #category : #'Grafoscopio-Utils-Core'
} }
{ #category : #utilities } { #category : #utilities }