- Added basic sipa compontents
- Replace
app/assets/lib
with the latest version from repo atlib/templates/project/desktop/app/assets/lib
.- Check if you had already included one of these libs in
lib/<lib-folder>
in another folder and if, then remove them
- Check if you had already included one of these libs in
- Copy folder
lib/templates/project/desktop/app/assets/components
from repo toapp/assets
. - Add in your
app/index.html
after<!---------------===== /LAYOUTS =====--------------->
the following lines:
<!---------------===== COMPONENTS =====--------------->
<!-- section for your layouts -->
<!-- COMPONENT-JS -->
<script type="text/javascript" src="assets/components/example-component/example-component.js"></script>
<!-- /COMPONENT-JS -->
<!-- COMPONENT-CSS -->
<link rel="stylesheet" href="assets/components/example-component/example-component.css">
<!-- /COMPONENT-CSS -->
<!---------------===== /COMPONENTS =====--------------->
- Add the following line in the block of
SipaHooks.beforeInitPage() {}
inapp/config/hooks.js
:
SipaHooks.beforeInitPage('on', () => {
// add this line to your beforeInitPage hook
SipaComponent.init();
});
- Add
"assets/components"
to"sass_watch_paths"
in yoursipa.json
# sipa.json
{
"development_server": {
...
"sass_watch_paths": [
"assets/style",
# add the following line:
"assets/components",
"views"
]
}
...
}
- Add
"type": "desktop",
at the first line after the opening brackets{}
in yoursipa.json
. - Run
sipa i
in your project root to add the new assets
We had a lot of pain using the word simpartic compared to sipa. So we switch back once again. Hopefully the last time. ;-D
{
"hooks": {
"before_all": "",
"after_all": "",
"before_build": "npm version patch",
"after_build": "",
"before_generate": "",
"after_generate": "",
"before_indexer": "",
"after_indexer": "",
"before_server": "",
"after_server": ""
}
}
{
"development_server": {
"mount": "/"
}
}
- Fix reload issue that occurred coincidentally.
- Replace
app/assets/lib/sipa/sipa.js
with the latest version from repo atlib/templates/project/default/app/assets/lib/sipa
.
As sipa
is not very uniq - about 50 million search results on Google - we go back to its original long version sipa
while the shortcut sipa
will remain for the CLI and class names.
Simpartic has only about 200 search results on Google today, where many of them are typos, except our real sipa itself of course!
Rename sipa.json
in the project root to sipa.json
.
- Now all paths in
sipa.json
are based on the directory/app
. - New block in
index.html
for very custom assets.
In sipa.json
the SASS watch paths are now relativ to /app
and not to the project root /
anymore, as paths outside app
could not be accessed by index.html
anyway. On the other hand, then all paths inside sipa.json
have the base dir /app/
consistently.
So adjust the paths and remove the prefixed app
at the sass_watch_paths
, for example:
// before
"sass_watch_paths": [
"app/assets/style",
"app/views"
]
// after
"sass_watch_paths": [
"assets/style",
"views"
]
There is a new custom block in index.html
to link very custom assets there.
In your index.html
after the line
<!---------------===== /LIBS =====--------------->
add the following lines:
<!---------------===== CUSTOM =====--------------->
<!-- Section for your very custom content, e.g. if you want to embed Sipa into another framework -->
<!-- Here are only files included, that are defined in sipa.json at 'custom_assets_paths' -->
<!-- CUSTOM-JS -->
<!-- /CUSTOM-JS -->
<!-- CUSTOM-CSS -->
<!-- /CUSTOM-CSS -->
<!---------------===== /CUSTOM =====--------------->
- Support to configure minification of JavaScript and Stylesheets (CSS).
Add the following lines inside your build: { }
attribute in sipa.json
:
"minify": {
"css": {
"remove_comments": true,
"compress": true
},
"js": {
"remove_comments": true,
"compress": true
}
}
The path app/lib
has been moved to app/assets/lib
.
So there can now be stored .js
files as well as .css
files of included libraries.
The old path is no longer valid and will lead to errors, so move your libraries to the new path and rerun sipa i
.
Ignored indexer files are not backward compatible and may need to be ignored once again when running sipa i
New default config file looks like this now - copy the parts that are missing in your configuration:
{
"development_server": {
"host": "0.0.0.0",
"port": "7000",
"sass_watch_paths": [
"app/assets/style",
"app/views"
]
},
"build": {
"auto_fix_font_paths_in_css": true,
"static_files_to_copy": {
"files": "files",
"assets/img": "assets/img"
}
},
"indexer": {
"ignored_files": [
]
}
}
... inside the app folder. There you can store any special files, downloads for example.
Create folder app/files/
if you need it, otherwise remove the line
"files": "files",
in your sipa.json
.
Rename the two occurences of META-TITLE-ICON
into HEADER
.
Copy lib/templates/project/default/app/assets/lib/sipa/sipa.js
from the Github repository and replace your app/assets/lib/sipa/sipa.js
in your actual Sipa project.