- Seme Framework
- version 4.0.3
- Requirements
- Download & Install
- Configuration
- Tutorials
- URI Routing
- Constants
- Global Variables
- Model
- View
- Controller
- cdn_url
- config
- constructor
- getAdditional
- getAdditionalBefore
- getAdditionalAfter
- getAuthor
- getCanonical
- getContentLanguage
- getDescription
- getIcon
- getJsContent
- getJsFooter
- getJsReady
- getKey
- getKeyword
- getLang
- getRobots
- getShortcutIcon
- getThemeElement
- getTitle
- input
- lib
- load
- loadCss
- loadLayout
- putThemeContent
- putJsContent
- putJsFooter
- putJsReady
- putThemeContent
- render
- resetThemeContent
- session
- setAuthor
- setCanonical
- setContentLanguage
- setDescription
- setIcon
- setKey
- setKeyword
- setLang
- setShortcutIcon
- setTheme
- setTitle
- Library
- CLI (command line interface)
- Core
- Issue
- Deployment
The script.json
File
The script.json file contain about script tags for javascript source file. This file are required for creating a theme.
Location
The location of this file is inside a theme directory.
app/
└── view/
└── [THEME_NAME]/
├── ...
├── script.json
└── ...
How It Works
The script.json file processed by SENE_Controller class constructor and outputed by getJsFooter().
Example Usage with JSON String
Here is the example codes for script.json file using json string.
[
"<script src=\"{{base_url}}skin/front/js/nprogress.js\"></script>",
"<script src=\"{{base_url}}skin/front/js/moment.min.js\"></script>",
"<script src=\"{{base_url}}skin/front/js/moment-with-locales.min.js\"></script>"
]
Example Usage with JSON Object
Here is the example codes for script.json file using json object.
This method only supported from Seme Framework 4.0.2 above.
{
"script":
[
{
"src": "https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.js"
},
{
"src": "{{base_url}}skin/v2/css/jquery.min.js"
},
{
"src": "{{cdn_url}}assets/js/jquery.moneyFormat.min.js"
}
]
}
The {{cdn_url}}
and {{base_url}}
Keyword
script.json support {{cdn_url}}
and {{base_url}}
keyword for replacing value from Seme Framework configuration.