mirror of
http://git.whoc.org.uk/git/password-manager.git
synced 2025-10-28 18:07:35 +01:00
Interim synchronization with internal repository
This is an intermir commit to share what is going on with the development of the new /delta version.
This commit is contained in:
@@ -9,7 +9,10 @@ class BetaBuilder(FrontendBuilder):
|
||||
def projectResourceTypes (self):
|
||||
return ['js', 'css', 'images']
|
||||
|
||||
def copyStaticResources (self, targetFolder):
|
||||
# def copyStaticResources (self, targetFolder):
|
||||
def copyResourcesToFolder (self, targetFolder):
|
||||
self.copyResources(self.projectDir, targetFolder, 'images')
|
||||
|
||||
for file in self.filterFiles(self.settings['staticResources']):
|
||||
src = self.absolutePathForSourceFile('staticResources', file)
|
||||
dst = self.absolutePathForTargetFile(targetFolder, '', file)
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
from frontendBuilder import FrontendBuilder
|
||||
from scss import Scss
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import main
|
||||
import logging
|
||||
|
||||
|
||||
class DeltaBuilder(FrontendBuilder):
|
||||
|
||||
@@ -9,15 +15,49 @@ class DeltaBuilder(FrontendBuilder):
|
||||
def projectResourceTypes (self):
|
||||
return ['js', 'css']
|
||||
|
||||
def copyStaticResources (self, targetFolder):
|
||||
|
||||
# def copyStaticResources (self, targetFolder):
|
||||
def copyResourcesToFolder (self, targetFolder):
|
||||
#print "DELTA - copyResourcesToFolder"
|
||||
resourcesToCopy = [
|
||||
{'folder': 'properties', 'source': 'manifest.appcache', 'target': 'manifest.appcache'}
|
||||
]
|
||||
|
||||
for resource in resourcesToCopy:
|
||||
src = self.absolutePathForSourceFile(resource['folder'], resource['source'])
|
||||
#print "copying resource: " + str(resource['source'])
|
||||
content = self.loadFilesContent(resource['folder'], [resource['source']])
|
||||
content = content.replace('@application.version@', self.repositoryVersion)
|
||||
|
||||
dst = self.absolutePathForTargetFile(targetFolder, '', resource['target'])
|
||||
shutil.copy2(src, dst)
|
||||
file = open(dst, 'w')
|
||||
file.write(content.encode('utf-8'))
|
||||
file.close()
|
||||
|
||||
|
||||
def bookmarklet (self):
|
||||
return ""
|
||||
return ""
|
||||
|
||||
def preprocessCSS (self, targetFile):
|
||||
logging.basicConfig()
|
||||
scssVariables = {}
|
||||
scssCompiler = Scss(
|
||||
scss_vars = None,
|
||||
scss_opts = {
|
||||
'compress': True,
|
||||
# 'debug_info': True,
|
||||
},
|
||||
scss_files = self.loadIndividualFilesContent('scss', self.settings['scss']),
|
||||
# super_selector = None,
|
||||
# live_errors = False,
|
||||
# library = ALL_BUILTINS_LIBRARY,
|
||||
search_paths = [os.path.join(self.absolutePathForSources(), 'scss')]
|
||||
)
|
||||
|
||||
cssFileContent = scssCompiler.compile()
|
||||
|
||||
dst = targetFile
|
||||
dst = os.path.join(os.path.dirname(dst), "_" + os.path.basename(dst))
|
||||
main.createFolder(os.path.dirname(dst))
|
||||
file = open(dst, 'w')
|
||||
file.write(cssFileContent.encode('utf-8'))
|
||||
file.close()
|
||||
|
||||
@@ -9,10 +9,13 @@ class GammaBuilder(FrontendBuilder):
|
||||
def projectResourceTypes (self):
|
||||
return ['js', 'css', 'images']
|
||||
|
||||
def copyStaticResources (self, targetFolder):
|
||||
# def copyStaticResources (self, targetFolder):
|
||||
def copyResourcesToFolder (self, targetFolder):
|
||||
self.copyResources(self.projectDir, targetFolder, 'images')
|
||||
|
||||
resourcesToCopy = [
|
||||
# {'folder': 'html', 'source': 'exit_template.html', 'target': 'exit.html'},
|
||||
{'folder': 'html', 'source': 'exit_template.html', 'target': 'logout.html'},
|
||||
{'folder': 'html', 'source': 'exit_template.html', 'target': 'exit.html'},
|
||||
# {'folder': 'html', 'source': 'exit_template.html', 'target': 'logout.html'},
|
||||
{'folder': 'css', 'source': 'static.css', 'target': 'static.css'}
|
||||
]
|
||||
|
||||
|
||||
@@ -8,5 +8,6 @@ class Gamma_MobileBuilder(FrontendBuilder):
|
||||
def projectResourceTypes (self):
|
||||
return ['js', 'css', 'images']
|
||||
|
||||
def copyStaticResources (self, targetFolder):
|
||||
# def copyStaticResources (self, targetFolder):
|
||||
def copyResourcesToFolder (self, targetFolder):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user